RabidMortal has asked for the wisdom of the Perl Monks concerning the following question:
i need help finding/writing a simple script to edit a very large FASTA (text) file.
the text format of the FASTA file is simple:
>HWI-EAS158_40_3_1_46_535
GTGAATGCGTGATACAGGAATGTTCGTTGTGACCAT
>HWI-EAS158_40_3_1_47_579
AAAGTGAATGCGTGATACAGGAATGTTCGTTGTGAC
>HWI-EAS158_40_3_1_46_731
GTGTCATGCGTGATACAGGAATGTTCGTTGTGAAAA
each file has 6000000 lines, all with the exact same format. i need a script that will go through and trim off x nucleotides from the beginning, and y nucleotides from the end, of each and every sequence in the file. so, the script should not touch anything on the lines beginning with ">"
i would really really appreciate any help.
thank you.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: simple perl script to trim a FASTA file
by BrowserUk (Patriarch) on Apr 08, 2010 at 23:01 UTC | |
|
Re: simple perl script to trim a FASTA file
by almut (Canon) on Apr 08, 2010 at 22:10 UTC | |
|
Re: simple perl script to trim a FASTA file
by RabidMortal (Initiate) on Apr 09, 2010 at 14:59 UTC | |
by erix (Prior) on Apr 09, 2010 at 15:52 UTC | |
|
Re: simple perl script to trim a FASTA file
by RabidMortal (Initiate) on Apr 09, 2010 at 16:18 UTC | |
|
Re: simple perl script to trim a FASTA file
by silver_steve (Initiate) on Jan 26, 2012 at 20:15 UTC | |
by toolic (Bishop) on Jan 26, 2012 at 20:45 UTC |