in reply to Re: Statistics via hash- NCBI BLAST Tab Delimited file
in thread Statistics via hash- NCBI BLAST Tab Delimited file
while (<DATA>) { chomp; my ($organism, @vals) = (split /\t/)[2..5]; $freq{ $organism }++;
The line sfter the read needs to be chomped. And, the split should occur on tabs, not on whitespace. (When I ran the test program above, I split on whitespace instead of tabs because the sample data I copied into the program was separated by spaces, not tabs).
As long as $organism itself doesn't contain spaces you could split on whitespace. But I don't know enough about your data.
Chris
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Statistics via hash- NCBI BLAST Tab Delimited file
by Paragod28 (Novice) on Dec 16, 2009 at 15:27 UTC | |
|
Re^3: Statistics via hash- NCBI BLAST Tab Delimited file
by Paragod28 (Novice) on Dec 16, 2009 at 20:37 UTC | |
by Cristoforo (Curate) on Dec 17, 2009 at 01:33 UTC |