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

Nathan S. Haigh n.haigh at sheffield.ac.uk
Tue Nov 28 13:10:45 UTC 2006


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.
>
> I haven't got around to figuring out how to process the returned data 
> from this yet, just trying to get the function to run first!
> Thanks for any help that anyone can offer me with this...
>
> Samantha Thompson
>
> #********************************
>
>
> use Bio::Seq;
> use Bio::SeqIO;
>
> use Bio::Tools::Run::RemoteBlast;
> use Bio::SearchIO;
>
> #seq bit
>
> $seq_obj = Bio::Seq->new(-format => 'fasta');
>
> $seqio_obj = Bio::SeqIO->new(-file => 
> "/biol/people/mres/st537/MalEfasta.txt", -format => 'fasta');
>
> $seq_obj = $seqio_obj->next_seq;
>
>
>
> #blast bit
>
> $remote_blast = Bio::Tools::Run::RemoteBlast->new (
>          -prog => 'blastp', -db => 'nr', -expect => '1e-15' );
>
> $blastreturn_obj = $remoteBlast->submit_blast($seq_obj->seq);
>
>
>
>
> #end
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l
>   


Hi Samantha,

At first glance and without running any code, the first thing I can see
that is incorrect is:

$blastreturn_obj = $remoteBlast->submit_blast($seq_obj->seq);

I believe that submit_blast() would be likely to take the actual
sequence object ($seq_obj) as the argument and not the actual sequence
string itself (e.g. "ACTGCTG") that you get by calling $seq_obj->seq. So
swap this line for:

$blastreturn_obj = $remoteBlast->submit_blast($seq_obj);

And see how you get on.

Nath




More information about the Bioperl-l mailing list