How to change id in fasta file
Hi all,
I think I have a simple question for you. I need to change the id of my sequences in fasta because they are too long:
>CAEGAH010000001.1 genome assembly, contig: scaffold9796, whole genome shotgun sequence
How can I change/reduce all the ids in my fasta file to something simple:
>CAEGAH010000001.1
Thanks all!!
• 2,359 views
•
link
2 answers
gzip -cd old.fa.gz | cut -d' ' -f1 | gzip > new.fa.gz
• 0 views
•
link
I ended up using the package seqkit:
cat myfile.fna | seqkit replace -p "\s.+" > newfile.fna
• 0 views
•
link
Log in to answer this question.
This is a routine question. Please utilize the available search functionality.
replace fasta headers with another name in a text file
Help for changing fasta seq ID
Renaming fasta headers according to a matching name list