readFastq {microseq} | R Documentation |
Reads and writes files in the FASTQ format.
readFastq(in.file, Sanger = FALSE) writeFastq(fdta, out.file)
in.file |
url/directory/name of FASTQ file to read. |
Sanger |
logical indicating if old, multi-line Sanger format is used (default = FALSE). |
fdta |
FASTQ object to write. |
out.file |
url/directory/name of FASTQ file to write. |
These functions handle input/output of sequences in the commonly used FASTQ format, typically used for storing DNA sequences (reads) after sequencing.
The sequences are stored in a Fastq
object. This is an extension of a data.frame
containing three text-columns named Header, Sequence and Quality. If
other columns are present, these will be ignored by writeFastq
.
The Fastq
object can be treated as a data.frame
, but the generic functions
plot.Fastq
and summary.Fastq
are defined. The data.frame
property makes it straightforward to manipulate all headers or all sequences, or to extract
or delete entries (rows), or to merge several data sets using rbind
.
A Fastq
object can also be treated as a Fasta
object. Using writeFasta
will write the Fastq
object to a file in Fasta
format.
readFastq
returns a Fastq
object with the contents of the FASTQ file.
This is an extension to a data.frame
and contains three columns of text. The first,
named Header, contains the headerlines and the second, named Sequence, contains
the sequences and the third, named Quality, contains the base quality scores.
readFastq
returns a Fastq
object with the header, sequence and
quality part of the FASTQ file.
Lars Snipen and Kristian Hovde Liland.
codereadFasta, plot.Fastq
, summary.Fastq
.
## Not run: ex.file <- file.path(file.path(path.package("microseq"),"extdata"),"small.fastq") fdta <- readFastq(ex.file) summary(fdta) ## End(Not run)