[Biojava-l] blast on multiple databases

Laurence Hummel lhummel at pasteur.fr
Wed Feb 4 10:48:01 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";
             dOption = " -d \"" + db + "\"";
             iOption = " -i " + query;
             eOption = " -e " + eValue;
             oOption = " -o " + outFilePath;

             blastCommandLine = exePath + pOption + dOption + tOption + 
iOption + eOption + oOption;

             System.out.println("blastcommandLine = " + 
blastCommandLine);

             blastRun = Runtime.getRuntime().exec(blastCommandLine);
             System.out.println("ErrorStream = " + 
blastRun.getErrorStream().read());
             errorBuff = new BufferedReader(new 
InputStreamReader(blastRun.getErrorStream()));
             System.out.println("errorBuff = ");
             while ((line = errorBuff.readLine()) != null) {
                 System.out.println(line);
             }
         }

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"')


The exactly same command line copy/pasted in a terminal works very 
well...
Is someone has an idea?

Laurence

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 1735 bytes
Desc: not available
Url : http://portal.open-bio.org/pipermail/biojava-l/attachments/20040204/47614390/attachment.bin


More information about the Biojava-l mailing list