[Bioperl-l] How (from where) to retrieve FieldInfo objects?

Brian Osborne bosborne11 at verizon.net
Wed Jun 29 21:13:04 UTC 2011


Carne, something like:

#!/usr/bin/perl

use Bio::DB::EUtilities;

# Get all the fields for a db:
#
my $factory = Bio::DB::EUtilities->new(-eutil => 'einfo',
                                        -db => 'genomeprj', );
$factory->print_all;



On Jun 29, 2011, at 4:53 PM, Carnë Draug wrote:

> Hi
> 
> By using the einfo script that comes with bioperl I get a list of
> fields of info that I want to access
> 
> $ einfo --database=gene
> 
> If I understood correctly the man page of the script, this returns the
> list of info I should be able to obtain when searching the 'gene'
> database. As such, I tried to use EUtilities esearch to access this
> info.
> 
> Using the deobfuscator, I understood that I should create a
> Bio::Tools::EUtilities::Query EUtitlities object with
> Bio::DB::EUtilities esearch. With this object I could use the
> get_FieldInfo method to obtain an array of FieldInfo objects or the
> next_FieldInfo method to obtain one of them. However, I'm failing
> miserably at this. My search returns no FieldInfo objects whatsoever.
> 
> my $factory = Bio::DB::EUtilities->new(
>                                       -eutil  => 'esearch',
>                                       -db     => 'gene',
>                                       -term   => 'h2afx[sym] AND
> human[organism]',
>                                       -retmax => 5,
>                                       );
> 
> ## this returns nothing
> my @fields = $factory->get_FieldInfos;
> 
> ## it also never gets into this loop
> while (my $field = $factory->next_FieldInfo) {
>  say "hello";
> }
> 
> My question is how to I access the info fields mentioned when I use
> the einfo script. I can't find any info on this.
> 
> Thanks in advance,
> Carnë
> 
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l





More information about the Bioperl-l mailing list