Andreas Tille <[email protected]> writes:
> However, besides t-coffee I think that are probably more
> tools around which are expecting the .pl extensions on those prominent
> tools from ncbi-blast.
Perhaps, but please bear in mind that ncbi-blast+ primarily ships
compiled C++ binaries and blast2 historically shipped compiled C
binaries -- the scripts in question are just compatibility shims, and
ncbi-blast+-legacy uses the consolidated legacy-blast Perl script to
provide drop-in replacements for the old C binaries under their original
names, with no extensions needed.
blastpgp is one such original name, though AFAICT from a closer look at
t-coffee, the blastpgp.pl t-coffee tries to run is an EBI client script
with which I'm unfamiliar, apparently the one from its example/ subtree.
> BTW, I do not understand your third suggestion ("Better yet ..."). It
> seems you are proposing a real enhancement but I just don't get it.
> Would you mind providing a patch for t-coffee implementing this?
Sure, see below. Please note that, per the above comment about
blastpgp.pl, this approach turned out to apply only to t-coffee's
legacy-blast(.pl) usage, which AFAICT comes solely from the
tc_generic_method.pl example, even though the C code explicitly checks
for this script's existence in some circumstances:
https://salsa.debian.org/med-team/t-coffee/-/blob/master/t_coffee_source/util_lib/aln_convertion_util.c#L5767
At any rate, legacy_blast's --print_only option helps translate command
lines like
legacy_blast(.pl) blastpgp --path $path -d $cl_db -i $infile -o $outfile -m7
-j1
(https://salsa.debian.org/med-team/t-coffee/-/blob/master/example/tc_generic_method.pl#L2623):
$ legacy_blast blastpgp --print_only --path \$path -d \$cl_db -i \$infile -o
\$outfile -m7 -j1
$path/psiblast -db $cl_db -query $infile -num_iterations 1 -out $outfile
-outfmt 5
... where it should be safe to drop the explicit leading $path/ altogether.
I've attached a full patch.
--
Aaron M. Ucko, KB1CJC (amu at alum.mit.edu, ucko at debian.org)
http://www.mit.edu/~amu/ | http://stuff.mit.edu/cgi/finger/[email protected]
--- a/example/tc_generic_method.pl
+++ b/example/tc_generic_method.pl
@@ -1183,7 +1183,7 @@ sub pg_is_installed
if ($r eq ""){$r=0;}
else {$r=1;}
- if ($r==0 && is_blast_package ($p)){return pg_is_installed ("legacy_blast.pl");}
+ if ($r==0 && is_blast_package ($p)){return pg_is_installed ("blastn");}
else {return $r;}
}
}
@@ -2611,26 +2611,20 @@ sub run_blast
$cl_db=$db;
}
- ##
## BLAST+ provide different binaries names and CLI options
- ## Use the 'legacy_blast.pl' to keep compatibility with old blast commands
- ##
- $path=`which legacy_blast.pl 2>/dev/null`;
- $path=`dirname $path`;
- chomp($path);
if ($method eq "blastp"){
- &check_configuration("legacy_blast.pl");
- $command="legacy_blast.pl blastpgp --path $path -d $cl_db -i $infile -o $outfile -m7 -j1";
+ &check_configuration("psiblast");
+ $command="psiblast -db $cl_db -query $infile -num_iterations 1 -out $outfile -outfmt 5";
}
elsif ($method eq "psiblast")
{
- &check_configuration("legacy_blast.pl");
- $command="legacy_blast.pl blastpgp --path $path -d $cl_db -i $infile -o $outfile -m7 -j5";
+ &check_configuration("psiblast");
+ $command="psiblast -db $cl_db -query $infile -num_iterations 5 -out $outfile -outfmt 5";
}
elsif ($method eq "blastn")
{
- &check_configuration("legacy_blast.pl");
- $command="legacy_blast.pl blastall --path $path -p blastn -d $cl_db -i $infile -o $outfile -m7 -W6";
+ &check_configuration("blastn");
+ $command="blastn -task blastn -db $cl_db -query $infile -word_size 6 -out $outfile -outfmt 5";
}
print "$command\n";
&safe_system ($command);