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

Re: Counting overlapping dimers for multiple sequences

by flexvault (Monsignor)
on Mar 26, 2012 at 08:14 UTC ( [id://961608]=note: print w/replies, xml ) Need Help??


in reply to Counting overlapping dimers for multiple sequences

sally123,

Two things immediately jump out!

  • You need to loop on reading your data.
  • You need to initialize your variables before you loop.

Untested, this should get you started.
#!/usr/bin/perl -w use strict; open my $FH, "<", "./sample.txt"; my %count = (); while ( my $genome = <$FH> ) { .... }

A good practice is to define the scope of your variables (my, local, our).

Good Luck

"Well done is better than well said." - Benjamin Franklin

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (6)
As of 2024-04-25 14:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found