haotu : an open lab notebook

2011/06/23

Incomplete nucleic acid nomenclature contrast object for R to use with phangorn

Filed under: phylogeny, R — S @ 08:47

Nomenclature

http://www.chem.qmul.ac.uk/iubmb/misc/naseq.html

see

vignette("phangorn-specials")

in R for a description of why this contrast is needed for phylogenetic analyses in phangorn

 
contrast = matrix(data = c(
# a  c  g  t  -
  1, 0, 0, 0, 0, #a
  0, 1, 0, 0, 0, #c
  0, 0, 1, 0, 0, #g
  0, 0, 0, 1, 0, #t
  1, 0, 1, 0, 0, #r
  0, 1, 0, 1, 0, #y
  1, 1, 0, 0, 0, #m
  0, 0, 1, 1, 0, #k
  0, 1, 1, 0, 0, #s
  1, 0, 0, 1, 0, #w
  1, 1, 0, 1, 0, #h
  0, 1, 1, 1, 0, #b
  1, 1, 1, 0, 0, #v
  1, 0, 1, 1, 0, #d
  0, 0, 0, 0, 1, #-
  1, 1, 1, 1, 0, #n
  1, 1, 1, 1, 1  #?
  ), ncol = 5, byrow = TRUE)

dimnames(contrast) = list(c(
"a",
"c",
"g",
"t",
"r",
"y",
"m",
"k",
"s",
"w",
"h",
"b",
"v",
"d",
"-",
"n",
"?"
), c(
"a",
"c",
"g",
"t",
"-"
))

Create a free website or blog at WordPress.com.