Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses

Re: simple perl script to trim a FASTA file

by RabidMortal (Initiate)
on Apr 09, 2010 at 14:59 UTC ( #833836=note: print w/ replies, xml ) Need Help??

in reply to simple perl script to trim a FASTA file

Thank you thank you.

So far, I have not been able to get either script to run. I keep getting a missing semicolon error--I am not sure what that means but that seems like something I can figure out on my own.

What I cannot figure out is if there an easy way I can get these scripts to run on a specified FASTA file? Again, my files are very very large (gigabytes) and I'd prefer not to edit them manually...

Again, I really appreciate the help.

Comment on Re: simple perl script to trim a FASTA file
Replies are listed 'Best First'.
Re^2: simple perl script to trim a FASTA file
by erix (Vicar) on Apr 09, 2010 at 15:52 UTC

    You should indeed not edit the sequence files.

    The previous answers (by almut and BrowserUK) just use __DATA__ because that makes it easy to show as compact example. And to use the examples they'll need a little editing.

    For instance, in almut's script, replace the line:

    while( <DATA> ) {
    while( <> ) {

    and invoke the script as:

    perl sequences.fa > sequences_cleaned.fa

    Replacing <DATA> with <> means it will not read the __DATA__ section of the program-file itself, but instead read from STDIN (aka standard input).


Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://833836]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (5)
As of 2015-11-29 16:12 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (751 votes), past polls