utpalmtbi has asked for the wisdom of the Perl Monks concerning the following question:
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..
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: file header change
by tmharish (Friar) on Feb 05, 2013 at 09:52 UTC | |
by utpalmtbi (Acolyte) on Feb 05, 2013 at 10:30 UTC | |
by tmharish (Friar) on Feb 05, 2013 at 10:42 UTC | |
by utpalmtbi (Acolyte) on Feb 05, 2013 at 11:20 UTC | |
|
Re: file header change
by Anonymous Monk on Feb 05, 2013 at 09:50 UTC | |
by utpalmtbi (Acolyte) on Feb 05, 2013 at 10:20 UTC | |
by Anonymous Monk on Feb 05, 2013 at 11:27 UTC | |
by utpalmtbi (Acolyte) on Feb 05, 2013 at 10:17 UTC | |
|
Re: file header change
by newbie1991 (Acolyte) on Feb 05, 2013 at 10:23 UTC | |
|
Re: file header change
by Kenosis (Priest) on Feb 05, 2013 at 15:26 UTC | |
by utpalmtbi (Acolyte) on Feb 05, 2013 at 16:36 UTC | |
by Kenosis (Priest) on Feb 05, 2013 at 17:07 UTC |