[Biojava-l] Run blast on multiple databases
Laurence Hummel
lhummel at pasteur.fr
Tue Feb 3 13:09:33 EST 2004
Hi,
I want to run blastall on several databases, so I run it with -d
"dbName1 dbName2"...
This work well if I launch the command line in a terminal, but not if I
launch it from my java program...
It seems like the "" are not reconized.
Here is what I've done :
Process blastRun;
String pOption, dOption, oOption, iOption, eOption, tOption,
blastCommandLine, line;
BufferedReader errorBuff;
File outFile;
try {
pOption = " -p " + program;
tOption = " -T"; // out file in html format
dOption = " -d \"" + db + "\"";
iOption = " -i " + query;
eOption = " -e " + eValue;
oOption = " -o " + outFilePath;
blastCommandLine = exePath + pOption + dOption + tOption +
iOption + eOption + oOption;
System.out.println("\nblastcommandLine = " +
blastCommandLine);
// Call external blastall programm
blastRun = Runtime.getRuntime().exec(blastCommandLine);
// Catch blast error
System.out.println("\nErrorStream = " +
blastRun.getErrorStream().read());
errorBuff = new BufferedReader(new
InputStreamReader(blastRun.getErrorStream()));
System.out.println("\nerrorBuff = ");
while ((line = errorBuff.readLine()) != null) {
System.out.println(line);
}
System.out.println("\nOutputStream = " +
blastRun.getOutputStream());
} catch (IOException ex) {
System.out.println("BLAST NOT RUN");
System.out.println("IOException : " + ex.toString());
}
And here is the error :
blastcommandLine = /Applications/blast/blastall -p blastp -d "db1 db2"
-T -i query.faa -e 10.0 -o /out.html
ErrorStream = 91
errorBuff =
blastall] ERROR: Arguments must start with '-' (the offending argument
#5 was: db2"')
OutputStream = java.io.BufferedOutputStream at 629355
The exactly same command line copy/pasted in a terminal works very
well...
Is someone has an idea?
Laurence
--
Laurence HUMMEL
Génopole - Plate-Forme 4 "Intégration et Analyse Génomiques"
Institut Pasteur
28 rue du docteur Roux - 75015 PARIS
Tel : 01.44.38.95.36
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 3246 bytes
Desc: not available
Url : http://portal.open-bio.org/pipermail/biojava-l/attachments/20040203/42ac6ad8/attachment.bin
More information about the Biojava-l
mailing list