data(thermo)
## count nucleobases in a sequence
nucleicacids("ACCGGGTTT")
# the DNA complement of that sequence
nucleicacids("ACCGGGTTT", comp="DNA")
# the RNA complement of the DNA complement
n <- nucleicacids("ACCGGGTTT", comp="DNA", comp2="RNA")
# the formula of the RNA complement
(nf <- nucleicacids(n, type="RNA"))
stopifnot(identical(nf, "C40H42N32O11"))
Run the code above in your browser using DataLab