Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: how do i obtain blast result from the given file

by hbm (Hermit)
on Jun 17, 2013 at 19:45 UTC ( #1039457=note: print w/replies, xml ) Need Help??


in reply to how do i obtain blast result from the given file

Another way:

... my @seq; # read past the header while(<IN>){ last if /^Sequences producing/; } # assuming remaining data is fixed while(<IN>){ chomp; next if /^\s*$/; # capture the score /^.{67}\s*(\d+)/; # push anonymous array - [score,line] push @seq, [$1,$_]; } close IN; print join $/, ( map { $_->[1] } # print original line sort { $b->[0] <=> $a->[0] } # sorted by score @seq )[0..9]; # top ten

Replies are listed 'Best First'.
Re^2: how do i obtain blast result from the given file
by bingalee (Acolyte) on Jun 18, 2013 at 19:58 UTC

    thank you!

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2022-05-22 23:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (81 votes). Check out past polls.

    Notices?