Sunday, January 9, 2011

Open dictionary with command-control-d in Mac OS X

In a recent MacMost Newsletter, I came across the following handy trick in Mac OS X: while the cursor is over a word (not necessarily selected), one can press command-control-d to open dictionary which pops up a little window with the word's definition. This works in Safari and Mail, but not in Preview (unfortunately).

Previously, when I need to check the definition of a word, I right-click on it and then follow the link "Look Up in Dictionary". This will launch or pop up Dictionary with detailed information about the word (Dictionary/Thesaurus/wikipedia).

The right-click method seems to integrate better with other Mac OS X applications. For example, it works with Preview as well. However, now that I know it, I sometimes prefer the command-control-d approach better; it is quick and non-obstructive.

IUPAC nucleotide symbols and their complements

Recently, I was interested in knowing the complements of all the IUPAC nucleotide symbols. As blogged previously, I am quite familiar with the "meaning of nucleotide IUPAC codes" (namely A/C/G/T, and R/Y/N etc). However, when I first check the Gene Infinity website on nucleotide symbols, it still puzzled me for awhile to figure out the meaning of the DNA alphabet (with complements), as except below:
A  C  G  T    M  R  W  S  Y  K    B  D  H  V    N
|  |  |  |    |  |  |  |  |  |    |  |  |  |    |
T  G  C  A    K  Y  W  S  R  M    V  H  D  B    N
For example, some degenerated IUPAC symbols are complemented to themselves (e.g., W–W and S–S), while others are seemingly "hard" to apprehend (e.g., B–V and D–H).

After thinking it for a bit, things begin to become clear. They are based on the complementarity of Watson-Crick base-pairs (A–T and G–C) and the meaning of each degenerated IUPAC nucleotide symbol. For example,
  • W represents A/T, meaning weak (with only two hydrogen-bonds). The complements of A/T are T/A respectively, which is W again.
  • B (not A) represents C/G/T, and their complements are G/C/A respectively, which is V (not U/T).
It is easy to verify that all other complementary pairs follow exactly the same basic principle.