[Bioperl-l] How (from where) to retrieve FieldInfo objects?
Carnë Draug
carandraug+dev at gmail.com
Wed Jun 29 20:53:42 UTC 2011
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ë
More information about the Bioperl-l
mailing list