Skip to content

Latest commit

 

History

History
13 lines (10 loc) · 452 Bytes

fastaman.md

File metadata and controls

13 lines (10 loc) · 452 Bytes

Tools and commands to manipulate fasta files

Subsetting sequences based on fasta headers

tool seqtk

Get a list of all sequence IDs

Example: get all fasta headers from a fasta file
bash grep '^>' file_name.fasta | grep 'filter_group' | sed 's/>//g' > list_of_fastaheaders.txt

Extract subset of selected fasta headers from the fasta file

seqtk subseq   file_name.fasta  list_of_fastaheaders.txt   > subset_file_name.fasta