lh3 / seqtk

Toolkit for processing sequences in FASTA/Q formats
MIT License
1.35k stars 311 forks source link

Extract Sequences in a Defined Order #152

Open perryguog opened 4 years ago

perryguog commented 4 years ago

I'm attempting to extract out a series of contigs from a list of names. While the output is created, the results are sorted in ascending order according to the name. As these sequences are going to be combined into a preliminary pseudochromosome, the order is essential.

Command:

seqtk subseq input.fasta list_ids.txt > output.fasta

The names in list_ids.txt are not sorted, and are in the correct order based on a series of analyses.

How can I have the contig order preserved in the output file?