[Bioperl-l] Example code in Bioperl Tutorial

L Xu ryanx07 at hotmail.com
Wed Jun 13 08:16:15 EDT 2007


Thanks so much, Chris, it works now.
All the codes I tested were copied from Bioperl Tutorial. Why did they have 
such problems, because of the platform issue or different versions of 
BioPerl? I tested so far 6 scripts, three work and three don't.

Here is the problem for the 3rd failed script:
=================================
use strict;
use Bio::Tools::Run::RemoteBlast;
my $remote_blast = Bio::Tools::Run::RemoteBlast->new (
         -prog => 'blastn', -data => 'ecoli', -expect => '1e-10' );
my $r = $remote_blast->submit_blast("d1.fa");
my $rc;
while ( my @rids = $remote_blast->each_rid ) {
    for my $rid ( @rids ) {
       $rc = $remote_blast->retrieve_blast($rid);
    }
}
print "$rc\n"; #I just want to print sth here before parsing the result
=========================================================d1.fa
>example
CCCTTCAGGTACCCCGAGGTAACACGAGACACTCGGGATCTGGGAAGGGGACTGGGGCTTCTTTAAAAGCGCTCAGTTTAAAAAGCTTCTATGCCTGAATAGGTGACCGGAGGCCGGCACC
=========================================================result
C:\>perl t13.pl

-------------------- WARNING ---------------------
MSG: <HTML>
<HEAD><TITLE>An Error Occurred</TITLE></HEAD>
<BODY>
<H1>An Error Occurred</H1>
500 Can't connect to www.ncbi.nlm.nih.gov:80 (connect: Unknown error)
</BODY>
</HTML>

---------------------------------------------------

-------------------- WARNING ---------------------
MSG: <HTML>
<HEAD><TITLE>An Error Occurred</TITLE></HEAD>
<BODY>
<H1>An Error Occurred</H1>
500 Can't connect to www.ncbi.nlm.nih.gov:80 (connect: Unknown error)
</BODY>
</HTML>

---------------------------------------------------
Terminating on signal SIGINT(2)

C:\>


Please help me to correct the problem, thanks.







= = = Original message = = =

Bio::Restriction::EnzymeCollection holds Bio::Restriction::Enzyme? objects, 
each with its own name().? Using grouped methods like? 
'$collection->cutters(6)' will retrieve a new EnzymeCollection? containing 
all six-cutters from the original collection.? You should? use one of the 
EnzymeCollection accessor methods to retrieve the? enzyme that you wanted 
first or iterate through them all.? This works? for me:

use Bio::Restriction::EnzymeCollection;
my $all_collection = Bio::Restriction::EnzymeCollection->new();
my $six_cutter_collection = $all_collection->cutters(6);
for my $enz ($six_cutter_collection->each_enzyme)
?? print $enz->name,"\t",$enz->site,"\t",$enz->overhang_seq,"\n";


chris

On Jun 12, 2007, at 1:11 PM, L Xu wrote:


   Thank you very much, it did make the script advanced a bit but I? got the 
following error:

C:\~Scripts>perl t9.pl
Can't locate object method "name" via package? 
"Bio::Restriction::EnzymeCollectio
n" at t9.pl line 5, <DATA> line 532.

I checked the documentation , there is no "name" method for the? package. 
Thanks.

___________________________________________________________
Sent by ePrompter, the premier email notification software.
Free download at http://www.ePrompter.com.

_________________________________________________________________
Make every IM count. Download Messenger and join the i’m Initiative now. 
It’s free. http://im.live.com/messenger/im/home/?source=TAGHM_June07



More information about the Bioperl-l mailing list