readFasta: Read a fasta file.

View source: R/functions.R

readFastaR Documentation

Read a fasta file.

Description

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

Usage

readFasta(infile)

Arguments

infile

'character(1)' with the name of the fasta file to read.

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

See Also

GenericSeq, DnaSeq and RnaSeq.

Examples

## 2 fasta files
f <- dir(system.file("extdata", package = "sequences"),
         pattern = "fasta", full.names = TRUE)
f

## read first fasta file
x <- readFasta(f[1])
x

lgatto/sequences documentation built on Dec. 2, 2024, 1:57 a.m.