Entering edit mode
2.1 years ago
hollyannj7
•
0
Hiya,
I have ordered my contigs by sequence length and wish to extract all of the contigs up to 310 (L50) or >000310F into a separate file.
Can this be done with grep?
Thanks!
I'm not sure I understand whether you want the shorter or the longer than L50 contigs.
Anyhow, provided your contigs are ordered by contig length as you wrote, you can simply get the last line of the contig at L50 and
head
/tail
the file, for exampleHi! Give a try to
reformat.sh
usingmaxlenght
option (see BBMap reformat from BBMap toolkit).