[Bioperl-l] BLASTing BioSeq objects

Shawn shawnh@fugu-sg.org
11 Dec 2002 08:07:21 +0800


You probably want to do:

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);

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
>