next up previous
Next: util.stat Up: CHNOSZ examples Previous: util.misc

util.seq

utl.sq>   ## Don't show: 
utl.sq> data(thermo)
thermo$obigt has 1800 aqueous, 2925 total species

utl.sq> ## End Don't show
utl.sq>   ## count amino acids in a sequence
utl.sq>   aminoacids("GGSGG")
  A C D E F G H I K L M N P Q R S T V W Y
1 0 0 0 0 0 4 0 0 0 0 0 0 0 0 0 1 0 0 0 0

utl.sq>   aminoacids("WhatAmIMadeOf?")
  A C D E F G H I K L M N P Q R S T V W Y
1 3 0 1 1 1 0 1 1 0 0 2 0 0 0 0 0 1 0 1 0

utl.sq>   ## count nucleobases in a sequence
utl.sq>   nucleicacids("ACCGGGTTT")
  A C G T
1 1 2 3 3

utl.sq>   # the DNA complement of that sequence
utl.sq>   nucleicacids("ACCGGGTTT",comp="DNA")
  T G C A
1 1 2 3 3

utl.sq>   # the RNA complement of the DNA complement
utl.sq>   n <- nucleicacids("ACCGGGTTT",comp="DNA",comp2="RNA")

utl.sq>   # the formula of the RNA complement
utl.sq>   nucleicacids(n,type="RNA")
info: uracil (C4H4N2O2) available in aq, cr.
info: guanine (C5H5N5O) available in aq, cr.
info: cytosine (C4H5N3O) available in aq, cr.
info: adenine (C5H5N5) available in aq, cr.
info: 1595 refers to uracil, C4H4N2O2 aq (LH06a, 3.Feb.03)
info: 1592 refers to guanine, C5H5N5O aq (LH06a, 3.Feb.03)
info: 1593 refers to cytosine, C4H5N3O aq (LH06a, 3.Feb.03)
info: 1591 refers to adenine, C5H5N5 aq (LH06a, 3.Feb.03)
[1] "C41H44N36O7"


next up previous
Next: util.stat Up: CHNOSZ examples Previous: util.misc