readFasta: Read fasta files.

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/functions.R

Description

Reads sequences data in fasta and create DnaSeq and RnaSeq instances.

Usage

1
readFasta(infile)

Arguments

infile

the name of the fasta file which the data are to be read from.

Details

This funtion reads DNA and RNA fasta files and generates valid "DnaSeq" and "RnaSeq" instances.

Value

an instance of DnaSeq or RnaSeq.

Author(s)

Laurent Gatto lg390@cam.ac.uk

See Also

GenericSeq, DnaSeq and RnaSeq.

Examples

1
2
3
4
f <- dir(system.file("extdata",package="sequences"),pattern="fasta",full.names=TRUE)
f
aa <- readFasta(f[1])
aa

Example output

Loading required package: Rcpp
This is package 'sequences'

[1] "/usr/local/lib/R/site-library/sequences/extdata/aDnaSeq.fasta"    
[2] "/usr/local/lib/R/site-library/sequences/extdata/moreDnaSeqs.fasta"
Object of class DnaSeq 
 Id: example dna sequence 
 Length: 132 
 Alphabet: A C G T 
 Sequence: AGCATACGACGACTACGACACTACGACATCAGACACTACAGACTACTACGACTACAGACATCAGACACTACATATTTACATCATCAGAGATTATATTAACATCAGACATCGACACATCATCATCAGCATCAT 

sequences documentation built on May 2, 2019, 6:45 a.m.