[Bioperl-l] Should Bio::SeqIO::interpro 'use XML::DOM::XPath'?
Chris Fields
cjfields at uiuc.edu
Tue Jul 17 21:04:44 UTC 2007
On Jul 17, 2007, at 1:23 PM, Mark Johnson wrote:
> I'm tinkering with parsing iprscan reports with BioPerl. I noticed
> that this:
>
> my $seqio = Bio::SeqIO->new(-file => $iprscan_file, -format =>
> 'interpro');
>
> while (my $seq = $seqio->next_seq()) {
> ...
> }
>
> Does not work unless I first 'use XML::DOM::XPath'. I get this error:
>
> Can't locate object method "findnodes" via package
> "XML::DOM::Document" at
> bioperl-cvs/bioperl-live//Bio/SeqIO/interpro.pm line 136, <GEN0> line
> 30.
>
> I see that Bio::SeqIO has 'use XML::DOM', but that doesn't seem to
> suck in XML::DOM::Xpath. I see that t/interpro.t requires
> XML::DOM::XPath:
>
> test_begin(-tests => 17,
> -requires_module => 'XML::DOM::XPath');
>
> Is suppose the reason the test specs a require XML::DOM::XPath is so
> that tests can be skipped if XML::DOM::XPath is not available.
> Shouldn't Bio::SeqIO::interpro 'use XML::DOM::XPath', though?
You're right; I think tests passed b/c XML::DOM::XPath (if present),
was eval'd as a required module. When I commented out the spot where
it is eval'd in the test suite I can replicate this error. I have
added 'use XML::DOM::XPath' to SeqIO::interpro now in CVS and it
passes fine.
Thanks for the heads up!
chris
More information about the Bioperl-l
mailing list