in reply to Re^2: Get Fasta file with Protein Sequences given a file with Genbank Ids using Perl
in thread Get Fasta file with Protein Sequences given a file with Genbank Ids using Perl
Sure you do.
If something stops working, go back and look at what worked. Your OP had:
Now this is actually deprecated syntax and should be written as:my $gb=new Bio::DB::GenBank;
... but either style shows the point: you need to call the new() method to get an instance of the class Bio::DB::GenBank, aka, an object, and store it in $gb. Your existing code just assigns the bareword 'Bio::DB::GenBank' to $gb -- or tries to, but barewords are not allowed in your script because you're sensibly using strict. This is a great example of why to use strict: it tells you exactly what the problem is and where to find it.my $gb = Bio::DB::GenBank->new();
Also, don't use File::Slurp, it's broken. Use File::Slurper or Path::Tiny.
Hope this helps!
|
|---|