if (FALSE) {
# We need a FASTA-file to read, here is one example file:
fa.file <- file.path(file.path(path.package("microseq"),"extdata"),"small.ffn")
# Read and write
fdta <- readFasta(fa.file)
ok <- writeFasta(fdta[4:5,], out.file = "delete_me.fasta")
# Make use of dplyr to copy parts of the file to another file
readFasta(fa.file) %>%
filter(str_detect(Sequence, "TGA$")) %>%
writeFasta(out.file = "TGAstop.fasta", width = 80) -> ok
}
Run the code above in your browser using DataLab