Mercurial > repos > devteam > picard1106
diff picard_DownsampleSam.xml @ 143:b2ca2d181fb4 draft
fixed downsample sam in picard1106 (accept bam)
author | Rayan Chikhi <chikhi@psu.edu> |
---|---|
date | Mon, 16 Jun 2014 17:38:15 -0400 |
parents | 876ea92b5c28 |
children | b6662c2c8d64 |
line wrap: on
line diff
--- a/picard_DownsampleSam.xml Thu Feb 27 13:15:52 2014 -0500 +++ b/picard_DownsampleSam.xml Mon Jun 16 17:38:15 2014 -0400 @@ -1,30 +1,37 @@ -<tool name="Downsample SAM" id="picard_DownsampleSam" version="1.106.0"> +<tool name="Downsample SAM/BAM" id="picard_DownsampleSam" version="1.106.0"> <!-- found on https://bitbucket.org/bwlang/galaxy-dist/src/ca5ded2e18a9ef802c31429e3cb861e8775b24d0/tools/picard/picard_DownsampleSam.xml --> <description>Down-sample a file to retain a subset of the reads</description> <requirements><requirement type="package" version="1.106.0">picard</requirement></requirements> <command interpreter="python"> picard_wrapper.py - --input=$inputFile - --output=$outFile + --input "$inputFile" + --output "$outFile" --probability=$probability + --output-format $outputFormat --seed=$seed -j "\$JAVA_JAR_PATH/DownsampleSam.jar" </command> <inputs> - <param format="sam" name="inputFile" type="data" label="SAM dataset to be downsampled" - help="If empty, upload or import a SAM dataset." /> + <param format="sam,bam" name="inputFile" type="data" label="SAM/BAM dataset to be downsampled" + help="If empty, upload or import a SAM or BAM dataset." /> <param name="probability" type="float" size="5" label="Probability (between 0 and 1) that any given read will be kept" help="specify 1 to keep all reads, 0.1 to keep 10% of the reads" value="1" /> <param name="seed" type="integer" size="5" label="Random seed value" help="(same seed + same probability = same set of reads kept)" value="1" /> + <param name="outputFormat" type="boolean" checked="True" truevalue="bam" falsevalue="sam" label="Output BAM instead of SAM" help="Uncheck for SAM output" /> </inputs> <outputs> - <data name="outFile" format="sam" label="${tool.name} on ${on_string}"> + <data name="outFile" format="bam" label="${tool.name} on ${on_string}: downsampled ${outputFormat}"> + <change_format> + <when input="outputFormat" value="sam" format="sam" /> + </change_format> </data> </outputs> + <tests> <test> - <param name="inputFile" value="cleansamtestinput.sam" /> + <param name="inputFile" value="cleansamtestinput.sam" ftype="sam" /> <param name="probability" value="0.1" /> <param name="seed" value="2" /> + <param name="outputFormat" value="False" /> <output name="outFile" file="downsamplesamoutput.sam" ftype="sam" /> </test> </tests> @@ -54,4 +61,4 @@ </help> -</tool> \ No newline at end of file +</tool>