getLength | R Documentation |
getLength returns the total number of bases or amino-acids in a sequence.
getLength(object, ...)
object |
an object of the class |
... |
further arguments passed to or from other methods |
getLength
returns a numeric vector giving the length of the
sequences.
D. Charif, J.R. Lobry, L. Palmeira
citation("seqinr")
SeqAcnucWeb
, SeqFastadna
,
SeqFastaAA
, SeqFrag
#
# List all available methods for getLength generic function:
#
methods(getLength)
#
# Example with seven DNA sequences from a FASTA file:
#
ff <- system.file("sequences/someORF.fsa", package = "seqinr")
fs <- read.fasta(file = ff)
stopifnot(all(getLength(fs) == c(5573, 5825, 2987, 3929, 2648, 2597, 2780)))
#
# Example with 49 sequences from an ACNUC server:
#
## Not run:
# Need internet connection
choosebank("emblTP")
fc <- query("fc", "sp=felis catus et t=cds et o=mitochondrion")
getLength(fc)
closebank()
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.