getSequence | R Documentation |
getSequence returns the sequence either as vector of single chararacters or as a single string of multiple characters.
getSequence(object, as.string = FALSE, ...)
## S3 method for class 'SeqAcnucWeb'
getSequence(object, as.string = FALSE, ..., socket = autosocket())
object |
an object of the class |
as.string |
if TRUE sequences are returned as strings of multiple characters instead of a vector of single characters |
socket |
an object of class |
... |
further arguments passed to or from other methods |
For a single sequence an object of class character
containing the characters
of the sequence, either of length 1 when as.string
is TRUE, or of the length
of the sequence when as.string
is FALSE. For many sequences, a list of these.
D. Charif, J.R. Lobry, L. Palmeira
citation("seqinr")
SeqAcnucWeb
, SeqFastadna
,
SeqFastaAA
, SeqFrag
#
# List all available methods for getSequence generic function:
#
methods(getSequence)
#
# SeqAcnucWeb class example:
#
## Not run: # Need internet connection
choosebank("emblTP")
fc <- query("fc", "sp=felis catus et t=cds et o=mitochondrion")
getSequence(fc$req[[1]])
getSequence(fc$req[[1]], as.string = TRUE)
closebank()
## End(Not run)
#
# SeqFastaAA class example:
#
aafile <- system.file("sequences/seqAA.fasta", package = "seqinr")
sfaa <- read.fasta(aafile, seqtype = "AA")
getSequence(sfaa[[1]])
getSequence(sfaa[[1]], as.string = TRUE)
#
# SeqFastadna class example:
#
dnafile <- system.file("sequences/someORF.fsa", package = "seqinr")
sfdna <- read.fasta(file = dnafile)
getSequence(sfdna[[1]])
getSequence(sfdna[[1]], as.string = TRUE)
#
# SeqFrag class example:
#
sfrag <- getFrag(object = sfdna[[1]], begin = 1, end = 10)
getSequence(sfrag)
getSequence(sfrag, as.string = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.