[Bioperl-l] GenericResult.pm and HMMERResult.pm question
Jason Stajich
jason at cgt.mc.duke.edu
Fri Mar 14 13:10:38 EST 2003
query_length isn't a component of the HMMPFAM report so that won't be
there.
query_accession also will only be filled in if your report
contained it, if you look at the top of your report and the accession
field reads '[none]' that will explain why there is no accession. You
would have to read the HMMer manual to see what format your input id needs
to be in in order for HMMPFAM to pull this into the accession slot.
Alternatively if you know which part of the ID corresponds to the
accession number you can pull this out of the query_name by writing your
own regexp for this.
-jason
On Fri, 14 Mar 2003, Diane Benz (CCGB) wrote:
> Hello,
> I am trying to parse and extract some information from a hmmpfam report
> using bioperl. I have a list of fields that I would like to extract, but
> I am having problems extracting fields such as the accession number
> through methods $result->query_accession(), $result->query_length() and
> others. Should I be able to extract these fields? This is in essence how
> I am using bioperl:
>
> use Bio::SearchIO;
>
> .
> .
> .
> my $report = new Bio::SearchIO(-format => 'hmmer',
> -fh =>
> \*filehandle);
>
> while (my $result = $report->next_result) {
> while (my $hit = $result->next_hit) {
> while (my $hsp = $hit->next_hsp) {
> print $result->query_accession();
> print $result->query_length();
> }
> }
> }
>
>
> I would appreciate any suggestions.
> Thanks, Diane Benz
>
>
>
>
>
>
>
>
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at bioperl.org
> http://bioperl.org/mailman/listinfo/bioperl-l
>
--
Jason Stajich
Duke University
jason at cgt.mc.duke.edu
More information about the Bioperl-l
mailing list