[Bioperl-l] Allowing a list of ids for -id of Bio::DB::EUtilities->new()?

Peng Yu pengyu.ut at gmail.com
Wed Jun 17 01:36:45 UTC 2015


Hi,

To allow multiple ids, I have to manually concatenate ids in the form
of a string '19008417,19008416'. Would it be better to allow it take
the form of a list ('19008417', '19008416').


#!/usr/bin/env perl

use strict;
use warnings;
use Bio::DB::EUtilities;
use XML::Simple;
use Data::Dumper;

my $factory = Bio::DB::EUtilities->new(
  -eutil => 'efetch',
  -db => 'pubmed',
  -email => 'mymail at foo.bar',
  -id => '19008417,19008416',
  -retmode => 'xml',
);

#print $factory->get_Response->content;

my $string=$factory->get_Response->content;
print $string, "\n";
my $xml=new XML::Simple;
my $data = $xml->XMLin($string);
print Dumper($data);


-- 
Regards,
Peng


More information about the Bioperl-l mailing list