[Bioperl-l] StandAloneBlast and blast->to_html etc
Dan Kortschak
kortschak at rsbs.anu.edu.au
Fri Feb 7 10:37:28 EST 2003
Hi All, I am having befuddlement trying to get a micro local blast server
set up for our lab.
I have looked through StandAloneBlast.pm and can see that all the
appropriate paramters are being passed and that a blast report is being
generated (at least the hash ref is there), but I get no HTML output. I am
not sure that blastall is actually being called (there is no indication of
load when jobs are submitted), but the parts do work in other CL scripts
that I have written.
I'm using bioperl release 1.0.2 (yeah I know, but there are things I've
written which will break if I upgrade - I just know it).
Any help/suggestions were to look would be appreciated.
Dan
#!/usr/bin/perl -w
use CGI qw (:standard);
use Bio::Seq;
use Bio::Tools::Run::StandAloneBlast;
use Bio::Tools::Blast qw(:obj);
my $sequence=param('SEQUENCE');
my $program=param('PROGRAM');
my $matrix=param('MATRIX');
my $filter=param('FILTER');
my $expect=param('EXPECT');
my $strand=param('STRAND');
my $desc=param('DESCRIPTIONS');
my $align=param('ALIGNMENTS');
my $advanced=param('ADVANCED');
print header,start_html("Blast Results"),h1("Blast Results");
my $fasta=1 if $sequence=~/^>/;
$sequence=~s/^>(.*)/$1/;
my @sequence=split('>',$sequence);
my @query;
foreach (@sequence) {
my ($id, at seq);
if ($fasta) {
($id, at seq)=split(" ");
} else {
($id, at seq)=('',split(" "));
}
my $query=new Bio::Seq(-id=>$id,-seq=>join('', at seq));
push (@query,$query);
}
my @params = ('program' => $program,
'd' => '/usr/share/ncbi/data/coral.EST.clusters',
'b' => $align,
'v' => $desc,
'expect' => $expect,
'_READMETHOD' => 'Blast');
my $blastfactory = new Bio::Tools::Run::StandAloneBlast (@params);
if ($strand eq 'both') {
$blastfactory->S(3);
} elsif ($strand eq 'top') {
$blastfactory->S(1);
} elsif ($strand eq 'bottom') {
$blastfactory->S(2);
}
if ($filter eq 'default') {
$blastfactory->F(T);
} elsif ($filter eq 'none') {
$blastfactory->F(F);
} elsif ($filter eq 'SEG') {
$blastfactory->F(T);
}
unless ($matrix eq 'BLOSUM62') {
$blastfactory->M($matrix);
}
my $report=$blastfactory->blastall(@query);
$report->to_html;
print end_html;
--
_____________________________________________________________ .`.`o
o| ,\__ `./`r
Dan Kortschak kortschak at rsbs.anu.spanner.edu.au <\/ \_O> O
"|`...'.\
Rejecting the primacy of appearance over ` :\
substance for more than thirty years. : \
The address above will not work, remove the spanner from the works.
See headers for PGP public key.
By replying to this email you implicitly accept that your response
may be forwarded to other recipients.
More information about the Bioperl-l
mailing list