[Bioperl-l] Problem in using BioPerl module through Strawberry Perl Professional 5.10.1.3 alpha 2

Tao Zhu tzhu at mail.bnu.edu.cn
Tue Jan 18 05:32:47 UTC 2011


Dear friend,
In my opinion, there exist two major problems in your script:

First, have you noticed that you've written "use strict;" at the
beginning line? Delete it, please! If you write down "use strict;",you
should explicitly declare all the variables in your script, and this
could be very confusing to new learners.

Second, the website http://etutorials.org/Programming/perl
+bioinformatics/ has been outdated. I recommend the tutorial script on
http://www.bioperl.org/wiki/Bptutorial.pl#Quick_getting_started_scripts.
It should be like this:

-----------------------------
use Bio::Perl; 
 
# this script will only work if you have an internet connection on the
# computer you're using, the databases you can get sequences from 
# are 'swiss', 'genbank', 'genpept', 'embl', and 'refseq'
 
$seq_object = get_sequence('genbank',"ECORHO");
 
write_sequence(">ecorho.fasta",'fasta',$seq_object);
-----------------------------

Please run this script and I hope it should work. Good luck!



> Hi all,
> 
> I am new to Perl and Bioperl, but I am trying to do something with
> Perl and Bioperl. I tried to install Perl and BioPerl module
> separately but didn't worked for me. Then I installed Strawberry Perl
> Professional 5.10.1.3 alpha 2 which has inbuilt Bioperl module and
> Padre IDE.
> 
> To check whether perl is working or not I put these command
> 
> c:\perl -v
> 
> It seems working
> 
> Then I wanted to check whether Bioperl is working
> 
> In Padre I put
> 
> use Bio::Perl; ## It seems working because it didn't complain
> 
> Then I wanted to check further more according to
> 
> http://etutorials.org/Programming/perl+bioinformatics/Part+II+Perl+and
> +Bioinformatics/Chapter+9.+Introduction+to+Bioperl/9.3+Testing
> +Bioperl/
> 
> I used following examples to test
> 
>   #!C:\strawberry\perl\bin -w
> use strict;
> use warnings;
> use Bio::Perl;
> 
>   # this script will only work with an internet connection
>   # on the computer it is run on
> $seq_object = get_sequence('swissprot',"ROA1_HUMAN");
> write_sequence(">roa1.fasta",'fasta',$seq_object);
> 
> But it doesn't seems working
> 
> I got following erros
> 
> Global symbol "$seq_object" requires explicit package name at C:
> \......
> \Perl\2.pl line 8.
> Global symbol "$seq_object" requires explicit package name at C:
> \.........\Perl\2.pl line 9.
> Execution of C:\.................\Perl\2.pl aborted due to compilation
> errors.
> 
> Further I checked in command line perldoc::Seq
> 
> It seems working too
> 
> Can anyone point out what stupid mistakes I am doing?
> 
> Thank you

-- 
Tao Zhu, College of Life Sciences, Beijing Normal University, Beijing
100875, China
Email: tzhu at mail.bnu.edu.cn
Website: http://bnuzt.org (mainly written in Chinese)







More information about the Bioperl-l mailing list