[Bioperl-l] Re: Weird efetch problem.

Siddhartha Basu sidd.basu at gmail.com
Thu Apr 5 10:31:47 UTC 2012


On Wed, 04 Apr 2012, shalabh sharma wrote:

> 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);
Could you send the ids here.

-siddhartha


> 
> 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
> _______________________________________________
> 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