how to sort fasta file according to a header file
Hi!
I have two files: one is protein fasta file (a.fa) & another is header.txt. I want to get my sequences in the same order as the header file. How can I do this?
• 2,135 views
•
link
2 answers
Use seqkit fx2tab and seqkit fx2tab to convert between fasta and tsv. See:
- format conversion - How to convert fasta file to tab delimited file - Bioinformatics Stack Exchange
- bioinformatics - Sort FASTA file according to length of sequences - Stack Overflow
Use awk or Perl to sort the resulting tsv file based on another file. See:
• 0 views
•
link
Log in to answer this question.
This is a type of a question where the only appropriate response is "Would you like fries with your order?"
You are not showing any previous effort to solve this problem. There is also a search function which you don't seem to have tried.
This is not a service website where you simply come and make an order, and assume that someone will jump right at it and do your work for free.
That is not a simple sort then? Are you selecting specific sequences or just want to sort based on an external file?
this is the one I tried, but it is not giving the dersired output I want
Your response does not answer GenoMax's question. "Are you selecting specific sequences or just want to sort based on an external file?"