cjfields at uiuc.edu
Thu Oct 11 22:14:21 EDT 2007
On Oct 11, 2007, at 7:51 PM, Joshua Udall wrote:
> Bioperl -
> I'm parsing an XML blast output using SearchIO and the usual fields
> seem to
> work fine.
> print $result->query_name . "\t" . $hit->name . "\n";
> However, I'm curious as to the 5' position distribution of my
> hits. So I'd
> like to access this data field <Hsp_query-from> in the xml output
> file. I
> searched both the mailing lists and the Search docs including
> *but I can't seem to find an example of someone accessing this data
> Perhaps, I missed it, but do any of you have any suggestions as to
> how I
> might get at the <Hsp_query-from> for each hit? Thanks.
That tag (as well as related tags) are mapped to start(), end(), and
strand() in the HSP objects. To access the relevant data pass
'query' or 'hit' to the method, so for the query use: $hsp->start
('query') or $hsp->end('query').
Note: in BioPerl all location starts are less than the end (strand
determines the orientation for DNA).
More information about the Bioperl-l