[Bioperl-l] Why Bio::DB::EUtilities->new( -eutil => $eutil, -email => 'mymail at foo.bar') with no extra argument only works for egquery?

Fields, Christopher J cjfields at illinois.edu
Wed Jun 3 20:22:13 UTC 2015


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 cjfields at illinois.edu
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 <pengyu.ut at gmail.com> 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 => 'mymail at foo.bar',
> );
> 
> 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
> Bioperl-l at mailman.open-bio.org
> http://mailman.open-bio.org/mailman/listinfo/bioperl-l




More information about the Bioperl-l mailing list