diff junction_saturation.xml @ 49:6b33e31bda10 draft

Uploaded tar based on https://github.com/lparsons/galaxy_tools/tree/master/tools/rseqc 1a3c419bc0ded7c40cb2bc3e7c87bfb01ddfeba2
author lparsons
date Thu, 16 Jul 2015 17:43:43 -0400
parents eb339c5849bb
children f242ee103277
line wrap: on
line diff
--- a/junction_saturation.xml	Tue Apr 21 10:27:06 2015 -0400
+++ b/junction_saturation.xml	Thu Jul 16 17:43:43 2015 -0400
@@ -1,40 +1,72 @@
-<tool id="rseqc_junction_saturation" name="Junction Saturation" version="2.4">
+<tool id="rseqc_junction_saturation" name="Junction Saturation" version="2.4galaxy1">
     <description>detects splice junctions from each subset and compares them to reference gene model</description>
+
+    <macros>
+        <import>rseqc_macros.xml</import>
+    </macros>
+
     <requirements>
-        <requirement type="package" version="3.0.3">R</requirement>
-        <requirement type="package" version="1.7.1">numpy</requirement>
-        <requirement type="package" version="2.4">rseqc</requirement>
+        <expand macro="requirement_package_r" />
+        <expand macro="requirement_package_numpy" />
+        <expand macro="requirement_package_rseqc" />
     </requirements>
-    <command> junction_saturation.py -i $input -o output -r $refgene -m $intronSize -v $minSplice
+
+    <expand macro="stdio" />
+
+    <version_command><![CDATA[junction_saturation.py --version]]></version_command>
 
+    <command><![CDATA[
+        junction_saturation.py
+            --input-file $input
+            --refgene $refgene
+            --out-prefix output
+            --min-intron $min_intron
+            --min-coverage $min_coverage
+            --mapq $mapq
         #if $percentiles.specifyPercentiles
-            -l $percentiles.lowBound -u $percentiles.upBound -s $percentiles.percentileStep
+            --percentile-floor $percentiles.lowBound
+            --percentile-ceiling $percentiles.upBound
+            --percentile-step $percentiles.percentileStep
         #end if
-
+        ]]>
     </command>
-    <stdio>
-        <exit_code range="1:" level="fatal" description="An error occured during execution, see stderr and stdout for more information" />
-        <regex match="[Ee]rror" source="both" description="An error occured during execution, see stderr and stdout for more information" />
-    </stdio>
+
     <inputs>
-        <param name="input" type="data" format="bam,sam" label="input bam/sam file" />
-        <param name="refgene" type="data" format="bed" label="reference gene model" />
-        <param name="intronSize" type="integer" label="Minimum intron size (bp, default=50)" value="50"/>
-        <param name="minSplice" type="integer" label="Minimum coverage (default=1)" value="1" />
+        <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)" />
+        <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">
-                <param name="lowBound" type="integer" value="5" label="Lower Bound Sampling Frequency (bp, default=5)" />
-                <param name="upBound" type="integer" value="100" label="Upper Bound Sampling Frequency (bp, default=100)" />
-                <param name="percentileStep" type="integer" value="5" label="Sampling increment (default=5)" />
+                <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>
+                <param name="upBound" type="integer" value="100" label="Upper Bound Sampling Frequency (bp, default=100)" help="(--percentile-ceiling)">
+                    <validator type="in_range" min="0" max="100" />
+                </param>
+                <param name="percentileStep" type="integer" value="5" label="Sampling increment (default=5)" help="(--percentile-step)">
+                    <validator type="in_range" min="0" max="100" />
+                </param>
             </when>
         </conditional>
     </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)"/>
     </outputs>
-    <help>
+
+    <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"/>
+        </test>
+    </tests>
+
+    <help><![CDATA[
 junction_saturation.py
 ++++++++++++++++++++++
 
@@ -46,7 +78,7 @@
 alternative splicing analysis is problematic because low abundance splice junctions are
 missing. This module checks for saturation by resampling 5%, 10%, 15%, ..., 95% of total
 alignments from BAM or SAM file, and then detects splice junctions from each subset and
-compares them to reference gene model. 
+compares them to reference gene model.
 
 Inputs
 ++++++++++++++
@@ -75,14 +107,14 @@
 .. image:: http://rseqc.sourceforge.net/_images/junction_saturation.png
    :height: 600 px
    :width: 600 px
-   :scale: 80 %    
+   :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 RSeQC
 +++++++++++
 
 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.
@@ -92,8 +124,9 @@
 .. image:: http://rseqc.sourceforge.net/_static/logo.png
 
 .. _RSeQC: http://rseqc.sourceforge.net/
-
-
+]]>
+    </help>
 
-    </help>
+    <expand macro="citations" />
+
 </tool>