Hello! I have a FASTA file and I want to change their headers into a new name. Through searching here on this platform I have found some relevant questions and answers to my problem. Hence I decided to perform this purpose using some certain scripts which are recommended. E.g
awk '/^>/{print ">ASV" ++i; next}{print}' < file.fasta
and sed 's/>.*//g' filename.fasta
The problem with them is that changes are made, but not saved. Also a huge portion of sequences is removed...and I do the first sequences their headers are not named..any idea what could be the problem. I am using Linus konsol. My input sequences
> LTR-12
ATTGGAAAACAAACTATCCTACCTTCATCATACACTAGTGGTGCATATCACATGTATCAG
TAATATTTAGATGCAATAGCTATTGCCTAGTACTTTCATAAAGTAAACATCTTTATGACC
>Hmmer-14
ATGAAGGTAATAGAGCCTCAGGGTATACAATATTCAATGTATTTGTACCTTTTTCTGTAT
CTGGAAAGAGAACTCGAATCTGTTGTCCAGAAGTGCAATGGCTAAGTGCTATATAGAGTT
Expected output
> RLX-incomp-chim
ATTGGAAAACAAACTATCCTACCTTCATCATACACTAGTGGTGCATATCACATGTATCAG
TAATATTTAGATGCAATAGCTATTGCCTAGTACTTTCATAAAGTAAACATCTTTATGACC
>RLX-comp
ATGAAGGTAATAGAGCCTCAGGGTATACAATATTCAATGTATTTGTACCTTTTTCTGTAT
CTGGAAAGAGAACTCGAATCTGTTGTCCAGAAGTGCAATGGCTAAGTGCTATATAGAGTT
I have been followed all these question to try to solve my problem, but nothing works.
Question: Renaming Entries In A Fasta File
Question: How To Rename FASTA Headers
Question: Editing header of a fasta file
how to rename fasta file headers using sed
Modifying FASTA headers with Unix command line tools
Any script to parse fasta headers?
Renaming commands have no built in logic. How will the command know that
LTR-12
needs to be changed toRLX-incomp-chim
? Similarly what is the correlation betweenHmmer-14
andRLX-comp
? Is it based on order of the sequences in the file or some other condition?So you have you new headers in a file or you just want your headers to be like ASV1, ASV2... ?