Enhance tests for sam_to_bam conversion

This demonstrates that the `sam_to_bam` converter will be used for an input
with `format="bam"`, and not `sam_to_bam_native`.
This commit is contained in:
mvdbeek
2018-01-13 14:17:59 +01:00
parent c2328e32eb
commit a36ebe3552
+15 -6
View File
@@ -8,30 +8,39 @@
-b
-h
-@ \${GALAXY_SLOTS:-2}
-o '${output}'
-o '$bam_native_output'
'$input1'
#else
cp '$input2' '$output'
#elif $input2:
cp '$input2' '$bam_native_output'
#elif $input3:
cp '$input3' '$bam_output'
#end if
]]>
</command>
<inputs>
<param name="input1" type="data" format="sam" label="SAM file" optional="true"/>
<param name="input2" type="data" format="bam_native" label="Unsorted BAM file" optional="true"/>
<param name="input3" type="data" format="bam" label="Sorted BAM file" optional="true"/>
</inputs>
<outputs>
<data name="output" format="bam_native"/>
<data name="bam_native_output" format="bam_native"/>
<data name="bam_output" format="bam"/>
</outputs>
<tests>
<!-- Test that bam native output won't be sorted-->
<test>
<param name="input1" value="sam_with_header.sam" ftype="sam"/>
<output name="output" file="bam_native_from_sam.bam" ftype="bam_native"/>
<output name="bam_native_output" file="bam_native_from_sam.bam" ftype="bam_native"/>
</test>
<!-- Test that sam input is properly converted to bam native -->
<test>
<param name="input2" value="sam_with_header.sam" ftype="sam"/>
<output name="output" file="bam_native_from_sam.bam" ftype="bam_native"/>
<output name="bam_native_output" file="bam_native_from_sam.bam" ftype="bam_native"/>
</test>
<!-- Test that sam input is properly converted to bam -->
<test>
<param name="input3" value="sam_with_header.sam" ftype="sam"/>
<output name="bam_output" file="bam_from_sam.bam" ftype="bam"/>
</test>
</tests>
<help>