NucleotideString {Biostrings} | R Documentation |
The function NucleotideString
expects a character string
representing either an RNA or DNA sequence, and converts it to a
BioString object with the appropriate alphabet.
The function DNAString
expects a character string
representing either a DNA sequence, and converts it to a
BioString object with the standard DNA alphabet.
NucleotideString(src, type = c("DNA", "RNA"), srctype = c("character", "connection"), alphabet = if (type == "DNA") DNAPatternAlphabet() else RNAPatternAlphabet(), gap = alphabet@gap) DNAString(src, gap="-")
src |
A character string |
type |
Either "DNA" (the default) or "RNA". |
srctype |
Currently the only valid value (and the default) is
"character". In future, we may allow "connection" as another valid
value denoting that the src argument is a file name. |
alphabet |
Alphabet to be used for the string - usually one of DNAAlphabet() or RNAAlphabet(). |
gap |
The character in the input that represents a gap. All occurences of this character in the input is converted to the gap character of the alphabet (which is usually ‘-’). |
An object of class "BioString".
Saikat DebRoy
BioString-class
for the class of the return
value.
DNAAlphabet
and RNAAlphabet
alphabet for
creating the standard DNA and RNA alphabets.
NucleotideString("ACTGAACT") DNAString("ACTGAACT-GC") DNAString("ACTGAACTNGC", gap="N")