[Bioperl-l] StandAloneBlast : 2 newbie questions
Alexandre Irrthum
irrthum@bchm.ucl.ac.be
Sat, 16 Jun 2001 19:20:47 +0200
Hello,
Two naive questions about the StandAloneBlast module. If it helps,
I am using Bioperl 0.7.0. with Perl 5.005_03.
Question 1.
In the following script, the call to blastall doesn't seem to work
because I modify the input record separator variable $/. The fields of
the BPlite object $blast_report are undef. No problem if let $/="\n".
Is there a way to use StandAloneBlast while still changing $/ ?
TEST SCRIPT :
#!/usr/bin/perl -w
use strict;
use Bio::Seq;
use Bio::Tools::Run::StandAloneBlast;
my @params = (program => 'blastx', database => 'SPEns');
my $factory = Bio::Tools::Run::StandAloneBlast->new(@params);
$/ = "..";
open(SEQS, 'seqs') || die "Can't open : $!\n";
while(<SEQS>) {
chomp;
if (/([acgtn]{40,})/) {
my $seq = Bio::Seq->new(-id => "test", -seq => $1);
print "Sequence: ", $seq->seq(), "\n";
my $blast_report = $factory->blastall($seq);
print $blast_report->query, "\n";
}
}
close(SEQS);
TEST INPUT FILE (seqs) :
..
catcagctaaacttgctggaggcaacccaatgaatgttccagcagccaagaagaggagggg
..
catcagcttcacttgctgtttgcaacccaatgagggttccagcagccaagtagaggagtgg
..
catcagcttcacttgctggagacaacccaatccgcagttccagcagccaagaagagggggg
Question 2.
I have to perform a large number a blast iterations and would like
to avoid accumulation of temporary input sequence files in /tmp.
Can I get the name of these files after each iteration to unlink them,
or is there another way ?
Thank you for your help.
Alexandre Irrthum