Question: error while executing code for parsing genbank file
0
gravatar for sharmatina189059
2.5 years ago by
United States
sharmatina18905940 wrote:

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 • 659 views
ADD COMMENTlink modified 2.5 years ago by Michael Dondrup47k • written 2.5 years ago by sharmatina18905940

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 REPLYlink written 2.5 years ago by shenwei3565.1k
1
gravatar for Michael Dondrup
2.5 years ago by
Bergen, Norway
Michael Dondrup47k wrote:

you may need to install the Bio::GenBankParser module

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

ADD COMMENTlink written 2.5 years ago by Michael Dondrup47k

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

ADD REPLYlink written 2.5 years ago by sharmatina18905940

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 REPLYlink written 2.5 years ago by Michael Dondrup47k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1418 users visited in the last hour