Skip to content

Commit

Permalink
[WIP] fixing planemo tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pavanvidem committed Jan 24, 2025
1 parent b7ef67e commit 5b63e42
Show file tree
Hide file tree
Showing 7 changed files with 41 additions and 38 deletions.
7 changes: 0 additions & 7 deletions galaxy/wrapper/alignmentSieve.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
<expand macro="requirements"/>
<command>
<![CDATA[
#import re
#set label = re.sub('[^\.\s\w\-]', '_', str($bamfile.element_identifier))
ln -s '$bamfile' one.bam &&
#if $bamfile.ext == 'bam':
ln -s '${bamfile.metadata.bam_index}' one.bam.bai &&
Expand All @@ -18,13 +16,10 @@
@BINARY@
@THREADS@
-b one.bam
--label '$label'
#if $filterRNAstrand:
--filterRNAstrand '$filterRNAstrand'
#end if
$ignoreDuplicates
#if $minMappingQuality:
--minMappingQuality $minMappingQuality
#end if
Expand Down Expand Up @@ -104,8 +99,6 @@
<option value="forward">forward</option>
<option value="reverse">reverse</option>
</param>

<expand macro="ignoreDuplicates"/>
<expand macro="minMappingQuality"/>
<expand macro="samFlags"/>
<expand macro="fragLength"/>
Expand Down
52 changes: 34 additions & 18 deletions galaxy/wrapper/bamCompare.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
#end if
#end if
--operation $comparison.type
--operation '$comparison.type'
$exactScaling
#if $comparison.type in ['ratio','log2']:
Expand Down Expand Up @@ -187,25 +187,30 @@
<param name="outFileFormat" value="bedgraph"/>
<param name="binSize" value="5"/>
<param name="type" value="ratio"/>
<output name="outFileName" file="bamCompare_result1.bg" ftype="bedgraph"/>
<output name="outFileName" ftype="bedgraph">
<assert_contents>
<has_text_matching expression="chrM\t0\t16569\t1"/>
</assert_contents>
</output>
</test>
<test expect_num_outputs="1">
<param name="bamFile1" value="bowtie2 test1.bam" ftype="bam"/>
<param name="bamFile2" value="bowtie2 test1.bam" ftype="bam"/>
<param name="showAdvancedOpt" value="yes"/>
<param name="outFileFormat" value="bigwig"/>
<param name="binSize" value="10"/>
<param name="type" value="ratio"/>
<conditional name="comparison">
<param name="type" value="ratio"/>
</conditional>
<output name="outFileName" file="bamCompare_result2.bw" ftype="bigwig"/>
</test>
<!-- Test with BAM and CRAM file as input-->
<test expect_num_outputs="1">
<param name="bamFile1" value="testA.bam" ftype="bam"/>
<param name="bamFile2" value="testA.cram" ftype="cram"/>
<param name="showAdvancedOpt" value="yes"/>
<param name="outFileFormat" value="bedgraph"/>
<param name="binSize" value="10"/>
<param name="type" value="ratio"/>
<conditional name="comparison">
<param name="type" value="ratio"/>
</conditional>
<output name="outFileName" ftype="bedgraph">
<assert_contents>
<has_text_matching expression="3R\t0\t200\t1"/>
Expand All @@ -217,10 +222,15 @@
<test expect_num_outputs="1">
<param name="bamFile1" value="testA.bam" ftype="bam"/>
<param name="bamFile2" value="testA.cram" ftype="cram"/>
<param name="showAdvancedOpt" value="yes"/>
<param name="outFileFormat" value="bedgraph"/>
<param name="binSize" value="10"/>
<param name="type" value="substract"/>
<conditional name="scaling">
<param name="method" value="own"/>
<param name="scaleFactor1" value="1"/>
<param name="scaleFactor2" value="1"/>
</conditional>
<conditional name="comparison">
<param name="type" value="subtract"/>
</conditional>
<output name="outFileName" ftype="bedgraph">
<assert_contents>
<has_text_matching expression="3R\t0\t200\t0"/>
Expand All @@ -232,10 +242,11 @@
<test expect_num_outputs="1">
<param name="bamFile1" value="testA.bam" ftype="bam"/>
<param name="bamFile2" value="testB.bam" ftype="bam"/>
<param name="showAdvancedOpt" value="yes"/>
<param name="outFileFormat" value="bedgraph"/>
<param name="binSize" value="10"/>
<param name="type" value="ratio"/>
<conditional name="comparison">
<param name="type" value="subtract"/>
</conditional>
<param name="pseudocount" value="1 1"/>
<output name="outFileName" ftype="bedgraph">
<assert_contents>
Expand All @@ -250,10 +261,13 @@
<test expect_num_outputs="1">
<param name="bamFile1" value="testA.bam" ftype="bam"/>
<param name="bamFile2" value="testB.bam" ftype="bam"/>
<param name="showAdvancedOpt" value="yes"/>
<conditional name="scaling">
<param name="method" value="own"/>
<param name="scaleFactor1" value="1"/>
<param name="scaleFactor2" value="1"/>
</conditional>
<param name="outFileFormat" value="bedgraph"/>
<param name="binSize" value="10"/>
<param name="type" value="ratio"/>
<param name="showAdvancedOpt" value="yes"/>
<param name="skipZeroOverZero" value="--skipZeroOverZero"/>
<output name="outFileName" ftype="bedgraph">
<assert_contents>
Expand All @@ -267,10 +281,12 @@
<test expect_num_outputs="1">
<param name="bamFile1" value="testA.bam" ftype="bam"/>
<param name="bamFile2" value="testB.bam" ftype="bam"/>
<param name="showAdvancedOpt" value="yes"/>
<param name="method" value="own"/>
<param name="scaleFactor1" value="1"/>
<param name="scaleFactor2" value="1"/>
<param name="type" value="subtract"/>
<param name="outFileFormat" value="bedgraph"/>
<param name="binSize" value="10"/>
<param name="type" value="ratio"/>
<param name="showAdvancedOpt" value="yes"/>
<param name="skipNAs" value="true"/>
<output name="outFileName" ftype="bedgraph">
<assert_contents>
Expand Down
17 changes: 6 additions & 11 deletions galaxy/wrapper/deepTools_macros.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
<token name="@GALAXY_VERSION@">23.2</token>
<xml name="requirements">
<requirements>
<!-- <requirement type="package" version="@TOOL_VERSION@">deeptools</requirement> -->
<requirement type="package" version="1.21">samtools</requirement>
<container type="docker">quay.io/biocontainers/deeptools:4.0.0--h004ce86_0</container>
<!--requirement type="package" version="@TOOL_VERSION@">deeptools</requirement>
<requirement type="package" version="1.21">samtools</requirement-->
</requirements>
<expand macro="stdio"/>
<version_command>@BINARY@ --version</version_command>
Expand Down Expand Up @@ -552,21 +553,15 @@ is vital to you, select Yes below.">
</token>

<xml name="blacklist">
<param argument="--blackListFileName" type="data" format="bed,gtf" multiple="true" optional="true" min="0"
<param argument="--blackListFileName" type="data" format="bed,gtf" optional="true" min="0"
label="Blacklisted regions in BED/GTF format"
help="One or more files containing regions to exclude from the analysis"/>
</xml>

<token name="@blacklist@">
<![CDATA[
#if ' '.join( map(str, $advancedOpt.blackListFileName) ) != 'None':
#set blfiles=[]
#for $f in $advancedOpt.blackListFileName:
#silent $blfiles.append("'%s'" % $f)
#end for
#if $blfiles != ["'None'"]:
--blackListFileName #echo ' '.join($blfiles)#
#end if
#if $advancedOpt.blackListFileName:
--blackListFileName '$advancedOpt.blackListFileName'
#end if
]]>
</token>
Expand Down
2 changes: 1 addition & 1 deletion galaxy/wrapper/plotPCA.xml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
<param name="plotTitle" value="Test Plot" />
<param name="outFileFormat" value="png" />
<param name="outFileNameData" value="True" />
<output name="outFileName" file="plotPCA_result2.png" ftype="png" compare="sim_size" delta="12000" />
<output name="outFileName" file="plotPCA_result1.png" ftype="png" compare="sim_size" delta="12000" />
<output name="output_outFileNameData" file="plotPCA_result2.tabular" ftype="tabular" lines_diff="2" />
</test>
</tests>
Expand Down
1 change: 0 additions & 1 deletion galaxy/wrapper/test-data/bamCompare_result1.bg

This file was deleted.

Binary file modified galaxy/wrapper/test-data/bamCompare_result2.bw
Binary file not shown.
Binary file removed galaxy/wrapper/test-data/plotPCA_result2.png
Binary file not shown.

0 comments on commit 5b63e42

Please sign in to comment.