Hello, Perl Monks;
I have a multi fasta file (with header > and sequence) in the following format:
>contig_1 # 498 # 1826 # 1 # ID=1_1;partial=00;start_type=ATG;rbs_motif=AGxAGG/AGGxGG;rbs_spacer=5-10bp;gc_cont=0.406
MNLTFDYTKEPSRDVLCIDVKSFYASVECVERG
LDPLKTMLVVMSNSENSGGLVLAASPM
>contig_2 # 1823 # 2173 # 1 # ID=1_2;partial=00;start_type=ATG;rbs_motif=GGA/GAG/AGG;rbs_spacer=5-10bp;gc_cont=0.311
MKQNRKEFSSYFSRSIKQNKPLYLLLMSSETNPF
PRPVIGTFRGYVEENKIIIGEDSYSI
....
...
and i want to edit the header lines as just a simple number count:
>1
MNLTFDYTKEPSRDVLCIDVKSFYASVECVERG
LDPLKTMLVVMSNSENSGGLVLAASPM
>2
MKQNRKEFSSYFSRSIKQNKPLYLLLMSSETNPF
PRPVIGTFRGYVEENKIIIGEDSYSI
....
...
may be it's a too simple questions, but I only started to learn perl and got stuck..
thanks in advance..
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.