Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

BLAST XML file searching for Highest Score for every species

by perll12 (Initiate)
on Apr 29, 2013 at 03:42 UTC ( #1031149=perlquestion: print w/replies, xml ) Need Help??
perll12 has asked for the wisdom of the Perl Monks concerning the following question:

at a loss as to where to start! thoughts: script to open XML file, put it in an array, search the array for a certain species (STDIN) and somehowwww find the highest bit score for that species (multiple species-specific entries are in the file). My confusion is, how do you find the score for a species, when, the XML file looks like, as a sample:
<Hit_def>PREDICTED: CREB-regulated transcription coactivator 2 [Papio + anubis]</Hit_def> <Hit_accession>XP_003892745</Hit_accession> <Hit_len>694</Hit_len> <Hit_hsps> <Hsp> <Hsp_num>1</Hsp_num> <Hsp_bit-score>833.558</Hsp_bit-score>
I do not know how to retrieve the high score from the species name when there are so many lines in between! Can someone please explain how to get to the score from just the species name? I'm sure this is childsplay for many of you! Thank you ~~~~

Replies are listed 'Best First'.
Re: BLAST XML file searching for Highest Score for every species
by davido (Archbishop) on Apr 29, 2013 at 04:54 UTC
      already checked out all of those.

        Then why is your original post still not formatted?

        And why not post a small example of the code you have already tried? Specific questions get specific answers. Questions that ask for some vague task to be solved, without showing any attempt to get started on your own generally meet with disinterest.


Re: BLAST XML file searching for Highest Score for every species
by Anonymous Monk on Apr 29, 2013 at 07:01 UTC

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1031149]
Approved by Corion
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (10)
As of 2018-06-20 19:47 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (117 votes). Check out past polls.