diff RPKM_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/RPKM_saturation.xml	Tue May 03 16:36:57 2016 -0400
+++ b/RPKM_saturation.xml	Tue Mar 14 10:23:21 2017 -0400
@@ -1,22 +1,18 @@
-<tool id="rseqc_RPKM_saturation" name="RPKM Saturation" version="2.4galaxy1">
+<tool id="rseqc_RPKM_saturation" name="RPKM Saturation" version="@WRAPPER_VERSION@">
     <description>calculates raw count and RPKM values for transcript at exon, intron, and mRNA level</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" />
 
     <version_command><![CDATA[RPKM_saturation.py --version]]></version_command>
 
     <command><![CDATA[
-        RPKM_saturation.py -i $input -o output -r $refgene
+        RPKM_saturation.py -i '${input}' -o output -r '${refgene}'
 
         #if str($strand_type.strand_specific) == "pair"
             -d
@@ -36,51 +32,34 @@
             #end if
         #end if
 
-        -l $percentileFloor -u $percentileCeiling -s $percentileStep -c $rpkmCutoff
+        -l ${percentileFloor} -u ${percentileCeiling} -s ${percentileStep} -c ${rpkmCutoff}
         ]]>
     </command>
 
     <inputs>
-        <param name="input" type="data" label="Input .bam File" format="bam" help="(--input-file)"/>
-        <param name="refgene" type="data" format="bed" label="reference gene model" help="(--refgene)"/>
-        <conditional name="strand_type">
-            <param name="strand_specific" type="select" label="Strand-specific?" value="None">
-                <option value="none">None</option>
-                <option value="pair">Pair-End RNA-seq</option>
-                <option value="single">Single-End RNA-seq</option>
-            </param>
-            <when value="pair">
-                <param name="pair_type" type="select" display="radio" label="Pair-End Read Type (format: mapped --> parent)" value="sd" help="(--strand)">
-                    <option value="sd"> read1 (positive --> positive; negative --> negative), read2 (positive --> negative; negative --> positive)</option>
-                    <option value="ds">read1 (positive --> negative; negative --> positive), read2 (positive --> positive; negative --> negative)</option>
-                </param>
-            </when>
-            <when value="single">
-                <param name="single_type" type="select" display="radio" label="Single-End Read Type (format: mapped --> parent)" value="s" help="(--strand)">
-                    <option value="s">positive --> positive; negative --> negative</option>
-                    <option value="d">positive --> negative; negative --> positive</option>
-                </param>
-            </when>
-            <when value="none"></when>
-        </conditional>
+        <expand macro="bam_param" />
+        <expand macro="refgene_param" />
+        <expand macro="strand_type_param" />
         <param name="percentileFloor" type="integer" value="5" label="Begin sampling from this percentile (default=5)" help="(--percentile-floor)"/>
         <param name="percentileCeiling" type="integer" value="100" label="End sampling at this percentile (default=100)" help="(--percentile-ceiling)" />
         <param name="percentileStep" type="integer" value="5" label="Sampling step size (default=5)" help="(--percentile-step)" />
         <param name="rpkmCutoff" type="text" value="0.01" label="Ignore transcripts with RPKM smaller than this number (default=0.01)" help="(--rpkm-cutoff)" />
-        <param name="mapq" value="30" type="integer" label="Minimum mapping quality for an alignment to be called 'uniquly mapped'" help="(--mapq)" />
+        <expand macro="mapq_param" />
+        <expand macro="rscript_output_param" />
     </inputs>
 
     <outputs>
-        <data format="xls" name="outputxls" from_work_dir="output.eRPKM.xls" label="${tool.name} on ${on_string} (RPKM XLS)"/>
-        <data format="xls" name="outputrawxls" from_work_dir="output.rawCount.xls" label="${tool.name} on ${on_string} (Raw Count XLS)"/>
-        <data format="txt" name="outputr" from_work_dir="output.saturation.r" label="${tool.name} on ${on_string} (R Script)"/>
-        <data format="pdf" name="outputpdf" from_work_dir="output.saturation.pdf" label="${tool.name} on ${on_string} (PDF)"/>
+        <expand macro="pdf_output_data" filename="output.saturation.pdf" />
+        <data format="xls" name="outputxls" from_work_dir="output.eRPKM.xls" label="${tool.name} on ${on_string} (RPKM xls)"/>
+        <data format="xls" name="outputrawxls" from_work_dir="output.rawCount.xls" label="${tool.name} on ${on_string} (Raw Count xls)"/>
+        <expand macro="rscript_output_data" filename="output.saturation.r" />
     </outputs>
 
     <tests>
         <test>
             <param name="input" value="pairend_strandspecific_51mer_hg19_random.bam"/>
             <param name="refgene" value="hg19.HouseKeepingGenes_30.bed"/>
+            <param name="rscript_output" value="true" />
             <output name="outputxls">
               <assert_contents>
                 <has_n_columns n="26" />
@@ -99,6 +78,7 @@
                 <has_line_matching expression="S5=c\(\d+\.\d+\)" />
               </assert_contents>
             </output>
+            <output name="outputpdf" file="output.saturation.pdf" compare="sim_size" />
         </test>
     </tests>
 
@@ -120,7 +100,7 @@
 expression level (i.e. RPKMreal). However, in practice one cannot know the RPKMreal. As a
 proxy, we use the RPKM estimated from total reads to approximate RPKMreal.
 
-.. image:: http://rseqc.sourceforge.net/_images/RelativeError.png
+.. image:: $PATH_TO_IMAGES/RelativeError.png
    :height: 80 px
    :width: 400 px
    :scale: 100 %
@@ -154,7 +134,7 @@
 3. output.saturation.r: R script to generate plot
 4. output.saturation.pdf:
 
-.. image:: http://rseqc.sourceforge.net/_images/saturation.png
+.. image:: $PATH_TO_IMAGES/saturation.png
    :height: 600 px
    :width: 600 px
    :scale: 80 %
@@ -173,23 +153,13 @@
     scatter.smooth(x,100*abs(rpkm-rpkm[length(rpkm)])/(rpkm[length(rpkm)]),type="p",ylab="Precent Relative Error",xlab="Resampling Percentage")
     dev.off()          #close graphical device
 
-.. image:: http://rseqc.sourceforge.net/_images/saturation_eg.png
+.. image:: $PATH_TO_IMAGES/saturation_eg.png
    :height: 600 px
    :width: 600 px
    :scale: 80 %
 
------
-
-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>