formatting output from a java tool

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

formatting output from a java tool

Hi all,

  I am trying to integrate a tool written in java into galaxy. The tool opens a GUI window to output a graph and also writes a text file. 

I want to know how to output that graph in the middle pane and
     how to output the text file so that the user will be able to download it.

public class Sample 
public static void main(String[] args)
int length = args.length;
FileWriter fw = new FileWriter(args[length-1]+".txt");
fw.write("length = " + args.length);
for(int i=0;i<args.length;i++)
catch (Exception e) 


<tool id="sample" name="Compute correlation">
  <description> for the given BAM file </description>
  <command>java -jar sample.jar $sample_type $window_frame_size $iteration $resolution $correlation_window_size $no_of_CPUs $output</command>
<param name="sample_type" type="select" label="Choose type of sampling">
<option value="random">Random Sampling</option>
        <option value="whole">Whole Genome</option>
<param name="window_frame_size"  type="text" area="true" size="1x10" label="Frame size for extraction"  help="Default:50000"/> 
<param name="iteration"  type="text" area="true" size="1x10" label="Number of iterations per chromosome" help="Default:10"/> 
<param name="resolution"  type="text" area="true" size="1x10" label="Resolution"  help="Default:1"/> 
<param name="correlation_window_size" type="text" area="true" size="1x10" label="Correlation window Size"  help="Default:1001"/> 
<param name="no_of_CPUs"  type="text" area="true" size="1x5"  label="Number of CPUs required"  help="Default:1"/> 

    <data format="txt" name="output" size="1x30" area="true" label="output"/>

  This tool helps plot the correlation function for the given input file



Please keep all replies on the list by using "reply all"
in your mail client.  To manage your subscriptions to this
and other Galaxy lists, please use the interface at:

To search Galaxy mailing lists use the unified search at: