write.fastq {LocaTT} | R Documentation |
Write FASTQ Files
Description
Writes FASTQ files.
Usage
write.fastq(names, sequences, quality_scores, file, comments)
Arguments
names |
A character vector of sequence names. |
sequences |
A character vector of sequences. |
quality_scores |
A character vector of quality scores. |
file |
A string specifying the path to a FASTQ file to write. |
comments |
An optional character vector of sequence comments. |
Value
No return value. Writes a FASTQ file.
See Also
read.fastq
for reading FASTQ files.
write.fasta
for writing FASTA files.
read.fasta
for reading FASTA files.
Examples
# Get path to example sequences CSV file.
path_to_CSV_file<-system.file("extdata",
"example_query_sequences.csv",
package="LocaTT",
mustWork=TRUE)
# Read the example sequences CSV file.
df<-read.csv(file=path_to_CSV_file,stringsAsFactors=FALSE)
# Create a temporary file path for the FASTQ file to write.
path_to_FASTQ_file<-tempfile(fileext=".fastq")
# Write the example sequences as a FASTQ file.
write.fastq(names=df$Name,
sequences=df$Sequence,
quality_scores=df$Quality_score,
file=path_to_FASTQ_file,
comments=df$Comment)
[Package LocaTT version 1.1.1 Index]