diff rseqc_plugin.xml @ 24:f7e2f1eb3a16 draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/multiqc commit dffbb5d421a5a5773bcb7f05933b12c45461bb58
author iuc
date Mon, 02 Sep 2024 14:22:54 +0000
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/rseqc_plugin.xml	Mon Sep 02 14:22:54 2024 +0000
@@ -0,0 +1,133 @@
+<macros>
+    <token name="@RSEQC_COMMAND@"><![CDATA[
+        #for $j, $repeat2 in enumerate( $repeat.software_cond.output )
+            @CREATE_REPEAT_DIR_2@
+            #if str($repeat2.type.type) == "bam_stat"
+                #set $pattern = "Proper-paired reads map to different chrom:"
+                @LN_3_FILES@
+            #elif str($repeat2.type.type) == "gene_body_coverage"
+                #for $k, $file in enumerate($repeat2.type.input)
+                    #set file_path = os.path.join($repeat_dir, 'file_' + str($k) + '.geneBodyCoverage.txt')
+                    ln -s '$file' '$file_path' &&
+                #end for
+            #elif str($repeat2.type.type) == "inner_distance"
+                #for $k, $file in enumerate($repeat2.type.input)
+                    #set file_path = os.path.join($repeat_dir, 'file_' + str($k) + '.inner_distance_freq.txt')
+                    ln -s '${file}' '$file_path' &&
+                #end for
+            #elif str($repeat2.type.type) == "junction_annotation"
+                #set $pattern = "Partial Novel Splicing Junctions:"
+                @LN_3_FILES@
+            #elif str($repeat2.type.type) == "read_gc"
+                #for $k, $file in enumerate($repeat2.type.input)
+                    #set file_path = os.path.join($repeat_dir, 'file_' + str($k) + '.GC.xls')
+                    ln -s '$file' '$file_path' &&
+                #end for
+            #elif str($repeat2.type.type) == "junction_saturation"
+                #for $k, $file in enumerate($repeat2.type.input)
+                #set file_path = os.path.join($repeat_dir, 'file_' + str($k) + '.junctionSaturation_plot.r')
+                    ln -s '${file}' '$file_path' &&
+                #end for
+            #elif str($repeat2.type.type) == "read_distribution"
+                #set $pattern = "Group               Total_bases         Tag_count           Tags/Kb"
+                @LN_3_FILES@
+            #elif str($repeat2.type.type) == "read_duplication_pos"
+                #for $k, $file in enumerate($repeat2.type.input)
+                    #set file_path = os.path.join($repeat_dir, 'file_' + str($k) + '.pos.DupRate.xls')
+                    ln -s '$file' '$file_path' &&
+                #end for
+            #elif str($repeat2.type.type) == "infer_experiment"
+                #set $pattern = "Fraction of reads explained by"
+                #for $file in $repeat2.type.input
+                    @ESCAPE_IDENTIFIER@
+                    #set file_path = os.path.join($repeat_dir, str($identifier))
+                    grep -q "$pattern" $file || die "'$pattern' not found in the file" &&
+                    ln -s '$file' '$file_path' &&
+                #end for
+            #end if
+        #end for
+    ]]></token>
+    <xml name="rseqc_form">
+        <repeat name="output" title="RSeQC output" min="1">
+            <conditional name="type">
+                <param name="type" type="select" label="Type of RSeQC output?">
+                    <option value="bam_stat">BAM/SAM mapping stats</option>
+                    <option value="gene_body_coverage">Gene body coverage</option>
+                    <option value="infer_experiment">Infer experiment</option>
+                    <option value="inner_distance">Inner distance</option>
+                    <option value="junction_annotation">Junction annotation</option>
+                    <option value="junction_saturation">Junction saturation</option>
+                    <option value="read_distribution">Read distribution</option>
+                    <option value="read_duplication_pos">Read duplication</option>
+                    <option value="read_gc">Read GC</option>
+                </param>
+                <when value="bam_stat">
+                    <param name="input" type="data" format="txt,tabular" label="RSeQC BAM stat: output file" help="It should contain 'Proper-paired reads map to different chrom:" multiple="true"/>
+                </when>
+                <when value="gene_body_coverage">
+                    <param name="input" type="data" format="txt" label="RSeQC gene body coverage:  stats file" multiple="true"/>
+                </when>
+                <when value="infer_experiment">
+                    <param name="input" type="data" format="txt" label="RSeQC infer experiment: configuration output" help="It should contain 'Fraction of reads explained by" multiple="true"/>
+                </when>
+                <when value="inner_distance">
+                    <param name="input" type="data" format="txt" label="RSeQC inner distance: frequency file" multiple="true"/>
+                </when>
+                <when value="junction_annotation">
+                    <param name="input" type="data" format="txt" label="RSeQC junction annotation: stats file" help="It should contain 'Partial Novel Splicing Junctions:" multiple="true"/>
+                </when>
+                <when value="junction_saturation">
+                    <param name="input" type="data" format="txt" label="RSeQC junction saturation: junction saturation plot Rscript file" multiple="true"/>
+                </when>
+                <when value="read_distribution">
+                    <param name="input" type="data" format="txt" label="RSeQC read distribution: stats output" help="It should contain 'Group               Total_bases         Tag_count           Tags/Kb" multiple="true"/>
+                </when>
+                <when value="read_duplication_pos">
+                    <param name="input" type="data" format="xls" label="RSeQC read duplication: positions XLS file" multiple="true"/>
+                </when>
+                <when value="read_gc">
+                    <param name="input" type="data" format="csv,xls,tabular" label="RSeQC read GC output" multiple="true"/>
+                </when>
+            </conditional>
+        </repeat>
+    </xml>
+    <xml name="rseqc_test">
+        <test expect_num_outputs="3">
+            <repeat name="results">
+                <conditional name="software_cond">
+                    <param name="software" value="rseqc"/>
+                    <repeat name="output">
+                        <conditional name="type">
+                            <param name="type" value="junction_annotation"/>
+                            <param name="input" value="junction_annotation.txt"/>
+                        </conditional>
+                    </repeat>
+                    <repeat name="output">
+                        <conditional name="type">
+                            <param name="type" value="junction_saturation"/>
+                            <param name="input" value="junction_saturation.txt"/>
+                        </conditional>
+                    </repeat>
+                </conditional>
+            </repeat>
+            <param name="title" value="Title of the report"/>
+            <param name="comment" value="Commment 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="Commment for the report"/>
+                    <has_text text="rseqc_junction_annotation"/>
+                    <has_text text="rseqc_junction_annotation_junctions_plot"/>
+                </assert_contents>
+            </output>
+            <!-- for unknown reason empty
+            <output name="stats">
+                <assert_contents>
+                </assert_contents>
+            </output> -->
+            <output_collection name="plots" type="list" count="5"/>
+        </test>
+    </xml>
+</macros>