if (FALSE) {
# We need a FASTQ-file to read, here is one example file:
fq.file <- file.path(file.path(path.package("microseq"),"extdata"),"small.fastq.gz")
# Read and write
fdta <- readFastq(fq.file)
ok <- writeFastq(fdta[1:3,], out.file = "delete_me.fq")
# Make use of dplyr to copy parts of the file to another file
readFastq(fq.file) %>%
mutate(Length = str_length(Sequence)) %>%
filter(Length > 200) %>%
writeFasta(out.file = "long_reads.fa") # writing to FASTA file
}
Run the code above in your browser using DataLab