I've written a simple tool to downsample files with a script I am running. It appears to run successfully from the std.err output, but it gives a fail when I run it in Galaxy. I'm trying to figure out what's going on.
Here's the code:
<tool id="downsample_sam" name="Downsample Sam" version="0.1.0">
<description>Downsamples a SAM file</description>
<command interpreter="python">downsample_sam.py '$pvalue' '$input' </command>
<inputs>
<param type="data" format="sam" name="input" label="Select uploaded SAM file" />
<param type="text" name="pvalue" label="P-value" />
</inputs>
<outputs>
<data name="output1" format="sam" />
</outputs>
<help>
Downsamples a SAM file.
</help>
</tool>
And the stderr output from my job:
[Tue Apr 24 14:22:04 EDT 2018] net.sf.picard.sam.DownsampleSam INPUT=/usr/local/apps/galaxy/database/files/000/dataset_23.dat OUTPUT=A1_downsampled.sam PROBABILITY=0.1 RANDOM_SEED=1 VERBOSITY=INFO QUIET=false VALIDATION_STRINGENCY=STRICT COMPRESSION_LEVEL=5 MAX_RECORDS_IN_RAM=500000 CREATE_INDEX=false CREATE_MD5_FILE=false
[Tue Apr 24 14:22:04 EDT 2018] Executing as root@bn16-189.dcs.mcnc.org on Linux 3.10.0-693.11.6.el7.x86_64 amd64; OpenJDK 64-Bit Server VM 1.8.0_161-b14; Picard version: 1.100(1571)
INFO 2018-04-24 14:22:04 DownsampleSam Finished! Kept 84 out of 826 reads.
[Tue Apr 24 14:22:04 EDT 2018] net.sf.picard.sam.DownsampleSam done. Elapsed time: 0.01 minutes. Runtime.totalMemory()=62390272