rtracklayer (version 1.32.1)

FastaFile-class: FastaFile objects

Description

These functions support the import and export of the Fasta sequence format, using the Biostrings package.

Usage

"import"(con, format, text, type = c("DNA", "RNA", "AA", "B"), ...)
"export"(object, con, format, ...) "export"(object, con, format, ...)

Arguments

con
A path or FastaFile object. URLs and connections are not supported. If con is not a FastaFile, either the file extension or the format argument needs to be “fasta”. Compressed files (“gz”, “bz2” and “xz”) are handled transparently.
object
The object to export, should be an XStringSet or something coercible to a DNAStringSet, like a character vector.
format
If not missing, should be “fasta”.
text
If con is missing, a character vector to use as the input
type
Type of biological sequence.
...
Arguments to pass down to writeXStringSet (export) or the readDNAStringSet family of functions (import).

FastaFile objects

The FastaFile class extends RTLFile and is a formal represention of a resource in the Fasta format. To cast a path, URL or connection to a FastaFile, pass it to the FastaFile constructor.

See Also

These functions are implemented by the Biostrings writeXStringSet (export) and the readDNAStringSet family of functions (import).

See export-methods in the BSgenome package for exporting a BSgenome object as a FASTA file.