NucleotideString {Biostrings}R Documentation

Functions to convert a character string to a BioString object

Description

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.

Usage

NucleotideString(src, type = c("DNA", "RNA"),
                 srctype = c("character", "connection"),
                 alphabet = if (type == "DNA")
                            DNAPatternAlphabet() else RNAPatternAlphabet(),
                 gap = alphabet@gap)
DNAString(src, gap="-")

Arguments

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 ‘-’).

Value

An object of class "BioString".

Author(s)

Saikat DebRoy

See Also

BioString-class for the class of the return value.

DNAAlphabet and RNAAlphabet alphabet for creating the standard DNA and RNA alphabets.

Examples

NucleotideString("ACTGAACT")
DNAString("ACTGAACT-GC")
DNAString("ACTGAACTNGC", gap="N")

[Package Biostrings version 1.4.0 Index]