View source: R/parse_methylation_from_fastq.R
| write_fastq | R Documentation |
This function simply writes a FASTQ file from a dataframe containing
columns for read ID, sequence, and quality scores.
See fastq_quality_scores for an explanation of quality.
Said dataframe can be produced from FASTQ via read_fastq().
To read/write a modified FASTQ containing modification information
(SAM/BAM MM and ML tags) in the header lines, use
read_modified_fastq() and write_modified_fastq().
write_fastq(
dataframe,
filename = NA,
read_id_colname = "read",
sequence_colname = "sequence",
quality_colname = "quality",
return = FALSE
)
dataframe |
|
filename |
|
read_id_colname |
|
sequence_colname |
|
quality_colname |
|
return |
|
character vector. The resulting FASTQ file as a character vector of its constituent lines (or invisible(NULL) if return is FALSE). This is probably mostly useful for debugging, as setting filename within this function directly writes to FASTQ via writeLines(). Therefore, defaults to returning invisible(NULL).
## Write to FASTQ (using filename = NA, return = FALSE
## to view as char vector rather than writing to file)
write_fastq(
example_many_sequences,
filename = NA,
read_id_colname = "read",
sequence_colname = "sequence",
quality_colname = "quality",
return = TRUE
)
## quality_colname = NA fills in quality with "B"
write_fastq(
example_many_sequences,
filename = NA,
read_id_colname = "read",
sequence_colname = "sequence",
quality_colname = NA,
return = TRUE
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.