This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Installing BioPerl and using Bio/SeqIO.pm

Hi there,

I am trying to run, generate_gc.pl followed by, wigToBigWig (UCSC Genome Browser script), to determine GC content and TATA boxes:

generate_gc.pl is located at: https://gist.githubusercontent.com/andrewyatz/fe8f4478d9127696d90bc4804c292056/raw/02c400f0022fd593bebc7d74a8d53ade9823c182/generate_gc.pl

WigToBigWig at: http://hgdownload.soe.ucsc.edu/admin/exe/linux.x86_64.v369/wigToBigWig

When I run the following command I get the following error:

$ perl generate_gc.pl 5 tomato.fa tomatoGC5.wig

Can't locate Bio/SeqIO.pm in @INC (you may need to install the Bio::SeqIO module) (@INC contains: /home/user/perl5/lib/perl5/5.26.1/x86_64-linux-gnu-thread-multi /home/user/perl5/lib/perl5/5.26.1 /home/user/perl5/lib/perl5/x86_64-linux-gnu-thread-multi /home/user/perl5/lib/perl5 /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.26.1 /usr/local/share/perl/5.26.1 /usr/lib/x86_64-linux-gnu/perl5/5.26 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.26 /usr/share/perl/5.26 /home/user/perl5/lib/perl5/5.26.0 /home/user/perl5/lib/perl5/5.26.0/x86_64-linux-gnu-thread-multi /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at generate_gc.pl line 5. BEGIN failed--compilation aborted at generate_gc.pl line 5.

Here is my PATH: PATH=/home/user/perl5/bin:/home/user/miniconda3/bin:/home/user/miniconda3/condabin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin

So it appears perl5 is in my path, perl works I run a basic perl script & I have also run:

cpanm Bio::Perl

However, I still get this error...

Is there a specific way to install or set my path to find Bio/SeqIO.pm? I don't believe I've installed it correctly. I think this is probably due to the improper installation of BioPerl but I cannot find any good documentation.

Anything helps! Thank you!!

bioperl seqio ucsc genome browser

1 answer

Learn about how perl finds its modules. Hints: read about @INC and 'use lib ...'. To see where your modules live, do:

perl -e 'print qq(@INC)'

which should give what's printed in the error message.

Thank you very much!

I feel so silly now...such is learning The initial cpanm installation command was incorrect. Looking through the $ perl -e 'print qq(@INC)' output helped. I realized I needed to look in the perl5 dir for the Bio dir. Once I was there I saw that SeqIO wasn't present and noticed I was using the incorrect cpanm command.

cpanm Bio::Perl ---> cnanm Bio::SeqIO

Cheers!

Log in to answer this question.