Skip to content

[WIP] fixing planemo tests #1375

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: 4.0.0
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 2 additions & 15 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 All @@ -45,14 +40,8 @@
--maxFragmentLength $maxFragmentLength
#end if

#if ' '.join( map(str, $blackListFileName) ) != 'None':
#set blfiles=[]
#for $f in $blackListFileName:
#silent $blfiles.append("'%s'" % $f)
#end for
#if $blfiles != ["'None'"]:
--blackListFileName #echo ' '.join($blfiles)#
#end if
#if $blackListFileName:
--blackListFileName '$blackListFileName'
#end if

#if $filterMetrics:
Expand Down Expand Up @@ -104,8 +93,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
66 changes: 44 additions & 22 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 @@ -157,10 +157,8 @@
<when value="yes">
<expand macro="smoothLength"/>
<expand macro="read_processing_options"/>

<expand macro="skipNAs"/>
<expand macro="skipZeroOverZero"/>

<param argument="--ignoreForNormalization" type="text" value="" size="50"
label="regions that should be excluded for calculating the scaling factor"
help="Sometimes it makes sense to exclude certain regions when calculating the scaling factor.
Expand All @@ -186,26 +184,35 @@
<param name="showAdvancedOpt" value="no"/>
<param name="outFileFormat" value="bedgraph"/>
<param name="binSize" value="5"/>
<param name="type" value="ratio"/>
<output name="outFileName" file="bamCompare_result1.bg" ftype="bedgraph"/>
<conditional name="comparison">
<param name="type" value="ratio"/>
</conditional>
<output name="outFileName" ftype="bedgraph">
<assert_contents>
<has_text_matching expression="chrM\t0\t16569\t1"/>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why did you choose to drop the file comparison?

Its a pretty good test to see the differences between both versions.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is only one line in the output :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

then please add an assert for the line_counts as well :)

<has_n_lines n="1"/>
</assert_contents>
has_n_lines
</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 +224,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 +244,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,11 +263,14 @@
<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="skipZeroOverZero" value="--skipZeroOverZero"/>
<param name="showAdvancedOpt" value="yes"/>
<param name="skipZeroOverZero" value="true"/>
<output name="outFileName" ftype="bedgraph">
<assert_contents>
<has_text_matching expression="3R\t50\t100\t0.571429"/>
Expand All @@ -267,10 +283,16 @@
<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>
<conditional name="comparison">
<param name="type" value="subtract"/>
</conditional>
<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
25 changes: 10 additions & 15 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,16 @@ 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"
<!-- the current rust-based function supports only a single blacklist file. Hence removed the multiple="true" attribute -->
<param argument="--blackListFileName" type="data" format="bed,gtf" optional="true"
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 Expand Up @@ -663,10 +659,9 @@ is vital to you, select Yes below.">
</xml>

<xml name="skipZeroOverZero">
<param argument="--skipZeroOverZero" type="select" label="Skip bins of no coverage"
help="Skip bins where BOTH files lack coverage.">
<option value="" selected="true">No</option>
<option value="--skipZeroOverZero">Yes, skip them.</option>
<param argument="--skipZeroOverZero" type="boolean" truevalue="--skipZeroOverZero" falsevalue="" checked="False"
label="Skip bins of no coverage"
help="Skip bins where BOTH files lack coverage.">
</param>
</xml>

Expand Down
13 changes: 3 additions & 10 deletions galaxy/wrapper/estimateReadFiltering.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,8 @@
#if $samFlagExclude:
--samFlagExclude $samFlagExclude
#end if

#if ' '.join( map(str, $blackListFileName) ) != 'None':
#set blfiles=[]
#for $f in $blackListFileName:
#silent $blfiles.append("'%s'" % $f)
#end for
#if $blfiles != ["'None'"]:
--blackListFileName #echo ' '.join($blfiles)#
#end if
#if $blackListFileName:
--blackListFileName '$blackListFileName'
#end if
]]>
</command>
Expand All @@ -55,7 +48,7 @@
label="Distance between bins"
help="To reduce the computation time, not every possible genomic bin is sampled. This option allows you to set the distance between bins actually sampled from. Larger numbers are sufficient for high coverage samples, while smaller values are useful for lower coverage samples. Note that if you specify a value that results in too few (&lt;1000) reads sampled, the value will be decreased." />

<param argument="filterRNAstrand" type="select" label="Only include reads originating from fragments from the forward or reverse strand."
<param argument="filterRNAstrand" type="select" label="Only include reads originating from fragments from the forward or reverse strand."
help="By default (the no option), all reads are processed, regardless of the strand they originated from. For RNAseq, it can be useful to separately create bigWig files for the forward or reverse strands.
Note that this tools assumes that a dUTP-based method was used, so fragments will be assigned to the reverse strand if the second read in a pair is reverse complemented.">
<option value="no" selected="true">no</option>
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.
Loading