Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Extract multiple lists od Identifiers from a FASTA file

by mr_mischief (Monsignor)
on Aug 04, 2022 at 20:01 UTC ( [id://11145957]=note: print w/replies, xml ) Need Help??


in reply to Extract multiple lists od Identifiers from a FASTA file

Never mind any of the following. I didn't notice after reading your description that you're setting new output names for new files over and over.

Are you sure you're getting the first sequence and not the last?

open OUT,'>'."$path/$name.out" or die "ERROR: Unable to open $file $! +\n";

open says about the MODE:

If MODE is ">", the file is opened for output, with existing files first being truncated ("clobbered") and nonexisting files newly created. If MODE is ">>", the file is opened for appending, again being created if necessary.

I would guess after looking a little closer at that line and that documentation you'll realize what's happening in your loop. There are other issues people have mentioned and even hammered upon, but truncating a file over and over is not going to get you cumulative output.

Replies are listed 'Best First'.
Re^2: Extract multiple lists od Identifiers from a FASTA file
by joluito (Novice) on Aug 05, 2022 at 07:28 UTC

    Thank you for your insight mr.mischief!

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (5)
As of 2024-04-25 12:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found