Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

Re^2: simple perl script to trim a FASTA file

by erix (Parson)
on Apr 09, 2010 at 15:52 UTC ( #833851=note: print w/replies, xml ) Need Help??

in reply to Re: simple perl script to trim a FASTA file
in thread simple perl script to trim a FASTA file

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://833851]
[Corion]: Discipulus: Nah, I'm thinking of posting more short stuff, but not all of it is fit for, more something a bit longer than Twitter but shorter than my usual b.p.o module posts
[Corion]: But Google+ is tedious and I'd like to keep my posts on an open platform instead, which can be followed via RSS

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (6)
As of 2017-05-26 07:45 GMT
Find Nodes?
    Voting Booth?