Creating Unique Fasta Headers
1
0
Entering edit mode
6.2 years ago
peerlesshm • 0

hi,

I have a fast file similar to below; I have already run sed -n and down a regular expression in text wrangler to remove the headers leaving just a ">" followed by the sequence. The file is pretty massive and i want to know how to make each identifier unique either by using a simple python script or some other command (Not including awk due to assignment restrictions) - I've considered using linenumber = linenumber +1 for a count but I'm unsure.

I want each header to be something like s1234 with the being s1235, s1236 etc or something rather.

Thanks!

> AGCTCAGATGCTGATCGATAGACTAG > GATGCTAGCTAGCTAGATCGATCGAT > ACGACTACAGATAGTAGATGATAGAC

bioinformatics python shell fasta • 2.2k views
ADD COMMENT
0
Entering edit mode
6.2 years ago
igor 12k

I think fastx_renamer from the FASTX-Toolkit will do that: http://hannonlab.cshl.edu/fastx_toolkit/commandline.html#fastx_renamer_usage

ADD COMMENT

Login before adding your answer.

Traffic: 1530 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6