worked great, thanks!
How To Add A Unique Identifier For Fasta File To A Long List Of Sequences
I have a long list of sequences and I want to convert this list to a fasta file. How do I add > and a unique identifier to each line?
thanks!
• 8,619 views
•
link
2 answers
Awk is a possibility. Assuming one sequence per line in a file called sequencefile.txt:
awk '{print ">" NR; print $0}' sequencefile.txt
NR is the line number, so it will be unique relative to the sequences in sequencefile.txt.
• 71 views
•
link
That is nice, but a little overkilling.
• 0 views
•
link
If you are using biopieces for further steps downstream then what you call slight overkill does make sense. Granted it doesn't look like stevebob was already using biopieces but maybe this gave him a push towards discovering it..
• 0 views
•
link
biopieces is a very convenient toolbox. It works very well, thanks Maasha!
• 0 views
•
link
Log in to answer this question.