loadFasta: Read or write a FASTA File

loadFastaR Documentation

Read or write a FASTA File

Description

Read/write a FASTA file from/to disk

Usage

loadFasta( file = "file.fasta", verbose = TRUE, short.desc = TRUE)
writeFasta( fasta, file = NULL, line.width = 80)
writeLongFasta( desc, seq, file = NULL)

Arguments

file

complete path name to an existing FASTA file for loadFasta, or new file name for writing

short.desc

logical, should the descriptor text be truncated at the first blank character

fasta

a fasta object, with 'desc' and 'seq' named elements

desc

character vector of descriptors

seq

character vector of sequences

line.width

integer value, the maximum line wrap length for written FASTA files

Details

loadFasta is a wrapper around the Biostrings function 'readBStringSet'.

The 'LongFasta' is a faster version that bypasses the line wrapping step, writing the entire sequence on a single line

Value

For loadFasta, a list of length 2, with:

desc

character vector of descriptors, from the '>' lines of the FASTA file

seq

character vector of sequences

See Also

as.Fasta for making fasta objects getFastaSeqFromFilePath, for getting the genomic sequence for a specific chrmosome.


robertdouglasmorrison/DuffyTools documentation built on May 6, 2024, 8:26 p.m.