| tbl_fastq | R Documentation |
Streams a FASTQ file as rows: one row per record with columns id, desc,
seq, and qual (the raw quality string, same length as seq). id and
desc are split from the header as in tbl_fasta(). Records stream one
batch at a time, so a read set larger than RAM never fully materializes.
Gzip-compressed files (.fastq.gz, .fq.gz) are read transparently. No data
is read until collect() is called.
tbl_fastq(path, batch_size = .DEFAULT_BATCH_SIZE, quiet = FALSE)
path |
Path to a |
batch_size |
Number of records per batch (default 65536). |
quiet |
If |
Records are parsed in the standard four-line form (header, sequence, +
separator, quality). A record cut short — a missing sequence, separator, or
quality line, or a quality string whose length does not match the sequence
— is a loud error, not a silent drop. When the scan reaches the end of the
file it reports the number of records read (suppress with quiet = TRUE).
A vectra_node object representing a lazy scan of the FASTQ file.
tbl_fasta(), seq_expressions
f <- tempfile(fileext = ".fastq")
writeLines(c("@r1 read one", "ACGT", "+", "IIII",
"@r2 read two", "GGCC", "+", "!!!!"), f)
node <- tbl_fastq(f, quiet = TRUE)
node |> mutate(len = seq_length(seq)) |> collect()
unlink(f)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.