THanks so much for your answer, what I need is to make a new fasta that have sequences that have a length range between 50-100. those links are aproached to filter a fasta rather than extracting sequences by length
How to extract sequences from fasta that have a certain length ?
lets say that I have a fasta file which have reads with different sizes and I want to create a new fasta that have reads with lengths ranging from 50bp to 100bp is there any tool for doing this? I checked this one:
but I got an error message ):
readline() on unopened filehandle at extractfasta.pl line 7
this is the command that I used:
perl extractfasta.pl /path-to/BAC4A_L00M_R1_001.fasta 50 100 > 100_maxln.fasta
• 5,044 views
•
link
1 answer
See solutions in: How To Filter Multi Fasta By Length??
Remove sequences <300 bases from FASTA file
https://stackoverflow.com/questions/62066578/filter-out-fasta-files-by-specified-sequence-length-in-bash
All said and done this seqkit solution is likely the easiest to understand and modify:
Selecting defined length fasta sequence and excluding them from a dataset
• 0 views
•
link
Log in to answer this question.