Skip to content
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
2 changes: 1 addition & 1 deletion tools/multiqc/macros.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<macros>
<token name="@TOOL_VERSION@">1.27</token>
<token name="@VERSION_SUFFIX@">3</token>
<token name="@VERSION_SUFFIX@">4</token>
<xml name="bio_tools">
<xrefs>
<xref type="bio.tools">multiqc</xref>
Expand Down
67 changes: 67 additions & 0 deletions tools/multiqc/mosdepth_plugin.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
<macros>
<token name="@MOSDEPTH_COMMAND@"><![CDATA[
#for $j, $repeat2 in enumerate( $repeat.software_cond.output )
@CREATE_REPEAT_DIR_1@
#if str($repeat2.type) == "dist"
#for $file in $repeat2.input
@ESCAPE_IDENTIFIER@
#set file_path = os.path.join($repeat_dir, str($identifier) + '.mosdepth.*.dist.txt')
ln -s '$file' '$file_path' &&
#end for
#elif str($repeat2.type) == "summary"
#for $file in $repeat2.input
@ESCAPE_IDENTIFIER@
#set file_path = os.path.join($repeat_dir, str($identifier) + '.mosdepth.summary.txt')
ln -s '$file' '$file_path' &&
#end for
#end if
#end for
]]></token>

<xml name="mosdepth_form">
<repeat name="output" title="Mosdepth output" min="1">
<param name="type" type="select" label="Type of Mosdepth output?">
<option value="dist">Global or Region Coverage Distribution</option>
<option value="summary">Coverage Summary</option>
</param>
<param name="input" type="data" format="tabular" label="summary, global, or region coverage output of mosdepth"/>
</repeat>
</xml>
<!-- add here your test files and tests, the more stringent the better -->
<xml name="mosdepth_test">
<test expect_num_outputs="3">
<repeat name="results">
<conditional name="software_cond">
<param name="software" value="mosdepth"/>
<repeat name="output">
<param name="type" value="dist"/>
<param name="input" value="test.mosdepth.global.dist.txt"/>
</repeat>
<repeat name="output">
<param name="type" value="summary"/>
<param name="input" value="test.mosdepth.summary.txt"/>
</repeat>
</conditional>
</repeat>
<param name="title" value="Title of the report"/>
<param name="comment" value="Comment for the report"/>
<param name="flat" value="true"/>
<param name="export" value="true"/>
<output name="html_report">
<assert_contents>
<has_text text="Title of the report"/>
<has_text text="Comment for the report"/>
<has_text text="Cumulative coverage distribution"/>
<has_text text="Average coverage per contig"/>
</assert_contents>
</output>
<output name="stats">
<assert_contents>
<has_text text="mosdepth-1_x_pc"/>
<has_text text="mosdepth-length"/>
</assert_contents>
</output>
<output_collection name="plots" type="list" count="3"/>
</test>
</xml>
</macros>
9 changes: 8 additions & 1 deletion tools/multiqc/multiqc.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
<import>featurecounts_plugin.xml</import>
<import>flexbar_plugin.xml</import>
<import>gatk_plugin.xml</import>
<import>mosdepth_plugin.xml</import>
<import>picard_plugin.xml</import>
<import>pycoqc_plugin.xml</import>
<import>qualimap_plugin.xml</import>
Expand Down Expand Up @@ -106,6 +107,8 @@ mkdir multiqc_WDir &&
grep -q "$pattern" $file || die "'$pattern' not found in the file" &&
ln -s '$file' '$file_path' &&
#end for
#elif str($repeat.software_cond.software) == "mosdepth"
@MOSDEPTH_COMMAND@
#elif str($repeat.software_cond.software) == "picard"
@PICARD_COMMAND@
#elif str($repeat.software_cond.software) == "prokka"
Expand Down Expand Up @@ -267,7 +270,7 @@ cp ./report_data/*plot*.txt ./plots/ | true ## don't fail if no plot files are g
<!--<option value="leehom">leeHom</option>-->
<option value="macs2">MACS2</option>
<!--<option value="methylQA">methylQA</option>-->
<!--<option value="mosdepth">mostdepth</option>-->
<option value="mosdepth">mosdepth</option>
<!--<option value="mtnucratio">mtnucratio</option>-->
<!--<option value="peddy">Peddy</option>-->
<option value="picard">Picard</option>
Expand Down Expand Up @@ -365,6 +368,9 @@ cp ./report_data/*plot*.txt ./plots/ | true ## don't fail if no plot files are g
<when value="macs2">
<param name="input" type="data" format="txt,tabular,tsv" multiple="true" label="Output of MACS2" help="It should be a tabular file containing '# This file is generated by MACS'"/>
</when>
<when value="mosdepth">
<expand macro="mosdepth_form"/>
</when>
<when value="picard">
<expand macro="picard_form"/>
</when>
Expand Down Expand Up @@ -523,6 +529,7 @@ cp ./report_data/*plot*.txt ./plots/ | true ## don't fail if no plot files are g
<expand macro="samtools_test"/>
<expand macro="busco_test"/>
<expand macro="featurecounts_test"/>
<expand macro="mosdepth_test"/>
<expand macro="picard_test"/>
<!-- Test 20 -->
<expand macro="qualimap_test"/>
Expand Down
Loading
Loading