Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

SeqFastadna

Class for DNA sequence in Fasta Format


Description

as.SeqFastadna is called by many functions as read.fasta. It creates an object of class SeqFastadna. is.SeqFastadna returns TRUE if the object is of class SeqFastadna. summary.SeqFastadna gives the base composition of an object of class SeqFastadna.

Usage

as.SeqFastadna(object, name = NULL, Annot = NULL)
is.SeqFastadna(object)
## S3 method for class 'SeqFastadna'
summary(object, alphabet = s2c("acgt"), ...)

Arguments

object

a vector of chars representing a biological sequence

name

NULL a character string specifying a name for the sequence

Annot

NULL a character string specifying some annotations for the sequence

...

additional arguments affecting the summary produced

alphabet

a vector of single characters

Value

as.SeqFastadna returns an object sequence of class SeqFastadna. summary.SeqFastadna returns a list which the following components:

length

the legth of the sequence

compo

the base counting of the sequence

GC

the percentage of G+C in the sequence

Author(s)

D. Charif

References

citation("seqinr")

Examples

s <- read.fasta(system.file("sequences/malM.fasta",package="seqinr"))
 is.SeqFastadna(s[[1]])
 summary(s[[1]])
 myseq <- s2c("acgttgatgctagctagcatcgat")
 as.SeqFastadna(myseq, name = "myseq", Annot = "blablabla")
 myseq

seqinr

Biological Sequences Retrieval and Analysis

v4.2-16
GPL (>= 2)
Authors
Delphine Charif [aut], Olivier Clerc [ctb], Carolin Frank [ctb], Jean R. Lobry [aut, cph], Anamaria Necşulea [ctb], Leonor Palmeira [ctb], Simon Penel [cre], Guy Perrière [ctb]
Initial release
2022-05-19

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.