[Bioperl-l] BLASTing with a seqio/seq object...

Samantha Thompson st537 at york.ac.uk
Thu Nov 30 16:52:27 UTC 2006


Hi,
Thanks for helping me with the BLAST code, when I made the corections in 
ran fine, I'm assuming the returned object $blast_result is a kind of 
searchio object, although I'm not sure. I tried the code on the bioperl 
tutorial page for processing a searchio object returned from blast....
http://www.bioperl.org/wiki/Bptutorial.pl#Parsing_BLAST_and_FASTA_reports_with_Search_and_SearchIO
this seems to be the next stage after blasting in the bioperl tutorial 
but I'm sure how to process it correctly to get hit and alignment 
information
regards,

Samantha Thompson



Sendu Bala wrote:

>Samantha Thompson wrote:
>  
>
>>Hi,
>>I am trying to learn bioperl and I'm attempting a few basic thing! I 
>>seem to be ok with reading in and outputting sequences and files now I 
>>am trying to do a simple BLAST search using a sequence (a sequence 
>>object in fact). The code I am attempting to run is at the bottom of the 
>>message...
>>I am probably making a dumb mistake and don't understand the 
>>capabilities of the objects well enough, but the info for the 
>>remoteblast->submit_blast function says that it can take sequences as an 
>>argument, I've also tried sending the fasta file name containing my 
>>sequence as an argument to submit_blast,  with the same result.... I 
>>have also tried sending $seqio_obj->next_seq...........  i.e the 
>>following error message displayed on my terminal:
>>
>>Can't call method "submit_blast" on an undefined value at bioptest2.pl 
>>line 22, <GEN0> line 1.
>>    
>>
>
>Always start your perl scripts with 'use strict;'. This will help you 
>find and fix the main problem with your script, that you made a 
>RemoteBlast object and stored it as $remote_blast, but then tried to use 
>submit_blast() on $remoteBlast which doesn't exist.
>
>I've rewritten your code below:
>
>use strict;
>  
>
>>use Bio::Seq;
>>use Bio::SeqIO;
>>
>>use Bio::Tools::Run::RemoteBlast;
>>use Bio::SearchIO;
>>
>>#seq bit
>>
>>    
>>
># $seq_obj = Bio::Seq->new(-format => 'fasta');
># above line doesn't do anything, $seq_obj gets overwritten below
>  
>
>my $seqio_obj = Bio::SeqIO->new(-file => 
>"/biol/people/mres/st537/MalEfasta.txt", -format => 'fasta');
>  
>
>my $seq_obj = $seqio_obj->next_seq;
>  
>
>>
>>#blast bit
>>
>>    
>>
>my $remote_blast = Bio::Tools::Run::RemoteBlast->new(-prog => 'blastp', 
>-db => 'nr', -expect => '1e-15' );
>
># submit_blast takes the sequence object, not the sequence string
>my $blastreturn_obj = $remote_blast->submit_blast($seq_obj);
>
>_______________________________________________
>Bioperl-l mailing list
>Bioperl-l at lists.open-bio.org
>http://lists.open-bio.org/mailman/listinfo/bioperl-l
>  
>




More information about the Bioperl-l mailing list