[Bioperl-l] BLASTing BioSeq objects

James Wasmuth james.wasmuth@ed.ac.uk
Tue, 10 Dec 2002 16:38:32 +0000


>my $seq = new Bio::Seq(-seq=>$query_str,-id=>"blast_seq");
>my $fact = Bio::Tools::Run::StandAloneBlast->new('program'=>'blastn',
>	                                        'database'=>"mydb",
>		                               'outfile'=>'tmp/xxx');
>my $blast_report = $fact->blastall($seq);
>  
>


Unfortunately I've tried something along these lines.  The problem seems 
to caused by the query sequence being in fasta format.  In the error log 
I get a message...

"MSG: Attempting to set the sequence to [>GLBH_CAEEL
<--some aa-->] which does not look healthy"

I know that this is because entering a sequence using '-seq' it has to 
be raw and so have no fasta header or "\n" characters, so I am trying to 
get round this.  I've done it by storing the query sequence as a file 
and using this to blast with but had been hoping to avoid this...

James



Shawn wrote:

>You probably want to do:
>
>
>cheers,
>
>shawn
>
>On Tue, 2002-12-10 at 23:40, James Wasmuth wrote:
>  
>
>>Hi all,
>>
>>I'm trying to blast a sequence which is introduced to the program as a 
>>string all implemented as a CGI userinterface.  The sequence is in fasta 
>>format, though I hope to extend this to any.
>>
>>I thought I had been able to create a Bio::Seq object from the string, 
>>which StandAloneBlast requires,  by doing...
>>
>>my $stringfh = new IO::String($query_str);
>>my $bioSeq_obj = new Bio::Seq(-fh => $stringfh, -format => 'fasta');
>>
>>however a check on the length of the sequence in the object reveals it 
>>to be zero in length.
>>
>>Anyone any ideas?  Should I first create a SeqIO object and convert this 
>>to a Bio::Seq object and then BLAST.  If so, how is this conversion done?
>>
>>I'm sure the answers are in the archive but have been unable to locate 
>>them...
>>
>>Many Thanks
>>James
>>
>>_______________________________________________
>>Bioperl-l mailing list
>>Bioperl-l@bioperl.org
>>http://bioperl.org/mailman/listinfo/bioperl-l
>>
>>    
>>
>
>
>  
>

-- 

Nematode Bioinformatics
Blaxter Nematode Genomics Group
Institute of Cell, Animal and Population Biology
Ashworth Labs
University of Edinburgh
King's Buildings
Edinburgh
EH9 3JT

0131 650 7403