writeFASTQ {ChIPsim} | R Documentation |
This is intended to produce the final output of the simulation by providing a fastq file that may then be used in an analysis pipeline.
writeFASTQ(read, quality, name, file, append = FALSE)
read |
List of read sequences. |
quality |
List of read quality scores. |
name |
Read names. |
file |
File name. If this is “” results will be printed to the standard output connection. |
append |
Logical indicating the reads should be appended to an existing file. |
The first three arguments should have the same length but will be recycled if necessary.
Called for its side effect.
Peter Humburg
readSequence
, readQualitySample
, writeReads
set.seed(1) ## generate sequence read and quality quality <- paste(sample(unlist(strsplit(rawToChar(as.raw(33:126)),"")), 36, replace = TRUE), collapse="") read <- paste(sample(c("A", "C", "G", "T"), 36, replace = TRUE), collapse = "") ## write a fastq record writeFASTQ(read, quality, "read_1", file="")