[Biojava-l] blastparsing

dkabic01 dkabic01 at athena.louisville.edu
Fri Mar 21 16:12:31 EST 2003


hi there
I am using Ht-Blast and i am calling JAVA servlet which invokes HT-BLAST 
command but the output which I am getting is right but not in the format as 
you get with other blast programs. It seems BLAST2HTML program does not work 
with that format.I am taking output from HT_BLAST and writing it in the file 
using JAVA servlet.
here is the code for that:

Process proc=null;
    Runtime rt = Runtime.getRuntime();
    proc = rt.exec(new String[] 
{"/vol1/people/dinesh/htblast/blockhead_64","-stdout","/vol1/people/dinesh/htb
last/testfile.fsa","/vol1/people/dinesh/htblast/rules_file","1"});

    BufferedReader in = new BufferedReader(new 
InputStreamReader(proc.getInputStream()));
    BufferedReader err = new BufferedReader(new 
InputStreamReader(proc.getErrorStream()));

    File file2= new File("/vol1/people/dinesh/htblast/test.out");
    boolean success2=file2.exists();
    if(success2)
    {
                 file2.delete();
    }
    BufferedWriter writer3= new BufferedWriter(new 
FileWriter("/vol1/people/dinesh/htblast/test.out"));



    String line = null;
    while ( ( line = in.readLine() ) != null )
    {
     writer3.write(line);
    }
    writer3.close();
   while ( ( line = err.readLine()) != null)
   out.println( line);

I think output is in this format due to the way i am writing it to the file. 
is there anyway to correct this problem.

please advice
Dinesh




More information about the Biojava-l mailing list