write.fastq | R Documentation |
Writes FASTQ files.
write.fastq(names, sequences, quality_scores, file, comments)
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. |
No return value. Writes a FASTQ file.
read.fastq
for reading FASTQ files.
write.fasta
for writing FASTA files.
read.fasta
for reading FASTA files.
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.