This is a test version of Biostars. For the public version, visit https://www.biostars.org.
extract first and last n bp from fasta file from multiple fasta file in R

Hi,

I would like to extract first and last n bp from multiple fasta file in R. Let me know if you guys have any suggestion.

Many thank for your time.

comparative-genomics

Its not an answer but suggestion. Seqkit's subseq command does this. e.g. https://bioinf.shenwei.me/seqkit/tutorial/#play-with-mirna-hairpins

If you really want to do it in R you would want to loop over as you stream the file or else it would hog your memory really bad. Or you can call seqkit with system :).

  1. https://stackoverflow.com/questions/42492351/stream-processing-large-csv-file-in-r

  2. https://stackoverflow.com/questions/12626637/read-a-text-file-in-r-line-by-line

0 answers

No answers yet.

Log in to answer this question.