error while executing code for parsing genbank file
1
0
Entering edit mode
7.2 years ago

hello can anyone tell me what does this line mean? I am executing this script on Mac

use strict; use warnings; use feature 'say'; use Bio::GenBankParser;

my $file = shift; my $parser = Bio::GenBankParser->new( file => $file ); while ( my $seq = $parser->next_seq ) { my $feat = $seq->{'FEATURES'}; for my $f (@$feat) { my $tag = $f->{'feature'}{'locus_tag'}; my $prod = $f->{'feature'}{'product'}; if (defined $tag and defined $prod) { say join "\t", $tag, $prod; } } }

and I got an error like this: @INC (you may need to install the Bio::GenBankParser module) (@INC contains: /Library/Perl/5.18/darwin-thread-multi-2level /Library/Perl/5.18 /Network/Library/Perl/5.18/darwin-thread-multi-2level /Network/Library/Perl/5.18 /Library/Perl/Updates/5.18.2/darwin-thread-multi-2level /Library/Perl/Updates/5.18.2 /System/Library/Perl/5.18/darwin-thread-multi-2level /System/Library/Perl/5.18 /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level /System/Library/Perl/Extras/5.18 .) at script.pl line 4. BEGIN failed--compilation aborted at script.pl line 4.

can anyone tell me how can I parse genbank file if i want to get location product and locus_tag information. I am unable to execute this code.

ganbank file • 1.5k views
ADD COMMENT
0
Entering edit mode

Please format your code using 101010 button. People won't read a mess of code.

Didn't you see what it likes like after creating this post?

ADD REPLY
1
Entering edit mode
7.2 years ago
Michael 55k

you may need to install the Bio::GenBankParser module

(In addition you need to read the error message ;)

ADD COMMENT
0
Entering edit mode

I have already install Bio::GenBankParser module, but while executing this code it is showing error.

ADD REPLY
0
Entering edit mode

Perl thinks otherwise, how did you install the module? EIther you used cpan or you are out of luck, so try:

cpan Bio::GenBankParser

possibly add a sudo if you need it.

ADD REPLY

Login before adding your answer.

Traffic: 1594 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6