[Bioperl-l] Weird efetch problem.
shalabh sharma
shalabh.sharma7 at gmail.com
Wed Apr 4 21:24:08 UTC 2012
Hi All,
I am facing a really weird problem using efetch. I am getting
different outputs if i am using different method of passing values.
Like if i am using this method:
#!/usr/bin/perl -w
use Bio::DB::EUtilities;
use Bio::SeqIO;
my $factory = Bio::DB::EUtilities->new(-eutil => 'efetch',
-db => 'protein',
-rettype => 'fasta',
-email => 'ssharmai at uga.edu',
-id => '256009369');
my $file = 'genome.fasta';
$factory->get_Response(-file => $file);
I am getting correct protein sequence but if i am passing values (same id)
via an array i am getting nucleotide sequences.
use Bio::DB::EUtilities;
use Bio::SeqIO;
my @ids;
my $c = 0;
open(IN,"$ARGV[0]");
while(<IN>){
my $id = $_;
chomp($id);chop($id);
$ids[$c] = $id;
print "$id\n";
$c++;
}
close(IN);
my $factory = Bio::DB::EUtilities->new(-eutil => 'efetch',
-db => 'protein',
-rettype => 'fasta',
-email => 'ssharmai at uga.edu',
-id => \@ids);
my $file = 'genome.fasta';
Thanks
Shalabh
--
Shalabh Sharma
Scientific Computing Professional Associate (Bioinformatics Specialist)
Department of Marine Sciences
University of Georgia
Athens, GA 30602-3636
More information about the Bioperl-l
mailing list