Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have installed Active Perl in Windows XP. Through Perl Package Manager I have installed BioPerl repositories. But while trying to execute this BioPerl program:

#!/usr/bin/env perl
use Bio::Seq;
use Bio::SeqIO;

# create a sequence object of some DNA
my $seq = Bio::Seq->new(-id => 'testseq', -seq => 'CATGTAGATAG');

# print out some details about it
print "seq is ", $seq->length, " bases long\n";
print "revcom seq is ", $seq->revcom->seq, "\n";

# write it to a file in Fasta format 
my $out = Bio::SeqIO->new(-file => '>testseq.fsa', -format => 'Fasta');
$out->write_seq($seq);

The following error is occurring

Cant locate Bio/Seq.pm in @INC at C:\Perl\bin\Sequence.pl line1. BEGIN failed--compilation aborted at C:\Perl\bin\Sequence.pl line1.

What is the problem here? How can I identify whether BioPerl is installed or not?

share|improve this question
add comment

1 Answer 1

to find out what modules you have installed, open a terminal and type:

ppm query

This is a tool that comes with Active Perl (see the CPAN FAQ).

Also, bear in mind that the "shebang" (#!/usr/bin/env perl) you are using will not work on a windows system. Can't be sure since I have never used windows for coding but that is a thing of the UNIX world unless active perl actively (sorry) translates it to whatever windows can deal with.

So, either bioperl is not installed or your Perl is not set up correctly. Perl will search for modules and the like in the directories defined by the @INC variable. A simple way of checking if the relevant directory is in the list is running this little one liner:

perl -e "do{print \"$_\n\"}for(@INC)"

It will print all directories where Perl will search for its modules.

PS. This may be a good time to check out linux...

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.