diff junction_saturation.xml @ 51:09846d5169fa draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/rseqc commit 37fb1988971807c6a072e1afd98eeea02329ee83
author iuc
date Tue, 14 Mar 2017 10:23:21 -0400
parents f242ee103277
children 5873cd7afb67
line wrap: on
line diff
--- a/junction_saturation.xml	Tue May 03 16:36:57 2016 -0400
+++ b/junction_saturation.xml	Tue Mar 14 10:23:21 2017 -0400
@@ -1,15 +1,11 @@
-<tool id="rseqc_junction_saturation" name="Junction Saturation" version="2.4galaxy1">
+<tool id="rseqc_junction_saturation" name="Junction Saturation" version="@WRAPPER_VERSION@">
     <description>detects splice junctions from each subset and compares them to reference gene model</description>
 
     <macros>
         <import>rseqc_macros.xml</import>
     </macros>
 
-    <requirements>
-        <expand macro="requirement_package_r" />
-        <expand macro="requirement_package_numpy" />
-        <expand macro="requirement_package_rseqc" />
-    </requirements>
+    <expand macro="requirements" />
 
     <expand macro="stdio" />
 
@@ -17,29 +13,32 @@
 
     <command><![CDATA[
         junction_saturation.py
-            --input-file $input
-            --refgene $refgene
+            --input-file '${input}'
+            --refgene '${refgene}'
             --out-prefix output
-            --min-intron $min_intron
-            --min-coverage $min_coverage
-            --mapq $mapq
-        #if $percentiles.specifyPercentiles
-            --percentile-floor $percentiles.lowBound
-            --percentile-ceiling $percentiles.upBound
-            --percentile-step $percentiles.percentileStep
+            --min-intron ${min_intron}
+            --min-coverage ${min_coverage}
+            --mapq ${mapq}
+        #if str($percentiles_type.percentiles_type_selector) == "specify":
+            --percentile-floor ${percentiles_type.lowBound}
+            --percentile-ceiling ${percentiles_type.upBound}
+            --percentile-step ${percentiles_type.percentileStep}
         #end if
         ]]>
     </command>
 
     <inputs>
-        <param name="input" type="data" format="bam,sam" label="input bam/sam file" help="(--input-file)"/>
-        <param name="refgene" type="data" format="bed" label="reference gene model" help="(--refgene)"/>
-        <param name="min_intron" type="integer" value="50" label="Minimum intron length (bp, default=50)" help="(--min-intron)" />
+        <expand macro="bam_sam_param" />
+        <expand macro="refgene_param" />
+        <expand macro="min_intron_param" />
         <param name="min_coverage" type="integer" label="Minimum number of supporting reads to call a junction (default=1)" value="1" help="(--min-coverage)" />
-        <param name="mapq" type="integer" label="Minimum mapping quality (default=30)" help="Minimum phred scale mapping quality to consider a read 'uniquely mapped' (--mapq)" value="30" />
-        <conditional name="percentiles">
-            <param name="specifyPercentiles" type="boolean" label="Specify sampling bounds and frequency" value="false"/>
-            <when value="true">
+        <expand macro="mapq_param" />
+        <conditional name="percentiles_type">
+            <param name="percentiles_type_selector" type="select" label="Sampling bounds and frequency">
+                <option value="default" selected="true">Default sampling bounds and frequency</option>
+                <option value="specify">Specify sampling bounds and frequency</option>
+            </param>
+            <when value="specify">
                 <param name="lowBound" type="integer" value="5" label="Lower Bound Sampling Frequency (bp, default=5)" help="(--percentile-floor)">
                     <validator type="in_range" min="0" max="100" />
                 </param>
@@ -50,20 +49,28 @@
                     <validator type="in_range" min="0" max="100" />
                 </param>
             </when>
-            <when value="false"/>
+            <when value="default"/>
         </conditional>
+        <expand macro="rscript_output_param" />
     </inputs>
 
     <outputs>
-        <data format="txt" name="outputr" from_work_dir="output.junctionSaturation_plot.r" label="${tool.name} on ${on_string} (R Script)"/>
-        <data format="pdf" name="outputpdf" from_work_dir="output.junctionSaturation_plot.pdf" label="${tool.name} on ${on_string} (PDF)"/>
+        <expand macro="pdf_output_data" filename="output.junctionSaturation_plot.pdf" />
+        <expand macro="rscript_output_data" filename="output.junctionSaturation_plot.r" />
     </outputs>
 
     <tests>
         <test>
-            <param name="input" value="pairend_strandspecific_51mer_hg19_chr1_1-100000.bam"/>
-            <param name="refgene" value="hg19_RefSeq_chr1_1-100000.bed"/>
-            <output name="outputr" file="output.junctionSaturation_plot.r"/>
+            <param name="input" value="pairend_strandspecific_51mer_hg19_chr1_1-100000.bam" />
+            <param name="refgene" value="hg19_RefSeq_chr1_1-100000.bed" />
+            <param name="rscript_output" value="true" />
+            <output name="outputr" file="output.junctionSaturation_plot.r" compare="sim_size">
+                <assert_contents>
+                    <has_line line="pdf('output.junctionSaturation_plot.pdf')" />
+                    <has_line line="x=c(5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95,100)" />
+                </assert_contents>
+            </output>
+            <output name="outputpdf" file="output.junctionSaturation_plot.pdf" compare="sim_size" />
         </test>
     </tests>
 
@@ -105,26 +112,15 @@
 1. output.junctionSaturation_plot.r: R script to generate plot
 2. output.junctionSaturation_plot.pdf
 
-.. image:: http://rseqc.sourceforge.net/_images/junction_saturation.png
+.. image:: $PATH_TO_IMAGES/junction_saturation.png
    :height: 600 px
    :width: 600 px
    :scale: 80 %
 
 In this example, current sequencing depth is almost saturated for "known junction" (red line) detection because the number of "known junction" reaches a plateau. In other words, nearly all "known junctions" (expressed in this particular tissue) have already been detected, and continue sequencing will not detect additional "known junction" and will only increase junction coverage (i.e. junction covered by more reads). While current sequencing depth is not saturated for novel junctions (green).
 
-
------
-
-About RSeQC
-+++++++++++
+@ABOUT@
 
-The RSeQC_ package provides a number of useful modules that can comprehensively evaluate high throughput sequence data especially RNA-seq data. "Basic modules" quickly inspect sequence quality, nucleotide composition bias, PCR bias and GC bias, while "RNA-seq specific modules" investigate sequencing saturation status of both splicing junction detection and expression estimation, mapped reads clipping profile, mapped reads distribution, coverage uniformity over gene body, reproducibility, strand specificity and splice junction annotation.
-
-The RSeQC package is licensed under the GNU GPL v3 license.
-
-.. image:: http://rseqc.sourceforge.net/_static/logo.png
-
-.. _RSeQC: http://rseqc.sourceforge.net/
 ]]>
     </help>