Re: Why Bio::DB::EUtilities->new( -eutil => $eutil, -email => '[email protected]') with no extra argument only works for egquery?
"Fields, Christopher J" <[email protected]>
| Newsgroups | gmane.comp.lang.perl.bio.general |
|---|---|
| Message-ID | <[email protected]> |
Actually, if you read the error message it does work but you will need to grab the raw output using the get_Response() method. However, if you are using it this way you will run into problems, primarily b/c each eutil has different required/optional parameters. If you installed Bio-EUtilities from CPAN there is a script called ‘bp_einfo’ that you can use (it’s a simple wrapper around einfo), which will list the databases and other tidbits of information as needed: bp_einfo -e [email protected] pubmed protein nuccore nucleotide nucgss nucest structure genome assembly bioproject biosample blastdbinfo books cdd clinvar clone gap gapplus grasp dbvar epigenomics gene gds geoprofiles homologene medgen journals mesh ncbisearch nlmcatalog omim orgtrack pmc popset probe proteinclusters pcassay biosystems pccompound pcsubstance pubmedhealth seqannot snp sra taxonomy toolkit toolkitall toolkitbook unigene gencoll chris > On Jun 3, 2015, at 12:00 PM, Peng Yu <[email protected]> wrote: > > The following code works for egquery but not efetch. I want to find > out what databases are available for an eutil. Do anybody know what is > the correct way? Thanks. > > $ cat main.pl > #!/usr/bin/env perl > > use strict; > use warnings; > > use Bio::DB::EUtilities; > > my $eutil=$ARGV[0]; > my $factory = Bio::DB::EUtilities->new( > # -eutil => 'egquery', > -eutil => $eutil, > -email => '[email protected]', > ); > > print join("\n", $factory->get_databases), "\n"; > $ ./main.pl egquery > pubmed > pmc > mesh > books > pubmedhealth > omim > ncbisearch > nuccore > nucgss > nucest > protein > genome > structure > taxonomy > snp > dbvar > epigenomics > gene > sra > biosystems > unigene > cdd > clone > popset > geoprofiles > gds > homologene > pccompound > pcsubstance > pcassay > nlmcatalog > probe > gap > proteinclusters > bioproject > biosample > $ ./main.pl efetch > > ------------- EXCEPTION ------------- > MSG: No parser defined for efetch; use get_Response() directly > STACK Bio::DB::EUtilities::get_Parser > /Users/xxx/perl5/lib/perl5/Bio/DB/EUtilities.pm:57 > STACK Bio::DB::EUtilities::get_databases > /Users/xxx/perl5/lib/perl5/Bio/DB/EUtilities.pm:157 > STACK toplevel ./main.pl:15 > ------------------------------------- > > > -- > Regards, > Peng > _______________________________________________ > Bioperl-l mailing list > [email protected] > http://mailman.open-bio.org/mailman/listinfo/bioperl-l _______________________________________________ Bioperl-l mailing list [email protected] http://mailman.open-bio.org/mailman/listinfo/bioperl-l