Question: error while executing code for parsing genbank file
0
gravatar for sharmatina189059
14 months ago by
United States
sharmatina18905930 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 • 415 views
ADD COMMENTlink modified 14 months ago by Michael Dondrup45k • written 14 months ago by sharmatina18905930

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 14 months ago by shenwei3564.3k
1
gravatar for Michael Dondrup
14 months ago by
Bergen, Norway
Michael Dondrup45k wrote:

you may need to install the Bio::GenBankParser module

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

ADD COMMENTlink written 14 months ago by Michael Dondrup45k

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

ADD REPLYlink written 14 months ago by sharmatina18905930

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 14 months ago by Michael Dondrup45k
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: 991 users visited in the last hour