diff inner_distance.xml @ 3:71ed55a3515a 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:22:57 -0400
parents f92b87abef3d
children 017eaaf58e5e
line wrap: on
line diff
--- a/inner_distance.xml	Thu Jul 18 11:01:08 2013 -0500
+++ b/inner_distance.xml	Tue Mar 14 10:22:57 2017 -0400
@@ -1,105 +1,113 @@
-<tool id="inner_distance" name="Inner Distance">
-	<description>calculate the inner distance (or insert size) between two paired RNA reads</description>
-	<requirements>
-		<requirement type="package" version="2.15.1">R</requirement>
-		<requirement type="package" version="2.3.7">rseqc</requirement>
-	</requirements>
-	<command> inner_distance.py -i $input -o output -r $refgene
+<tool id="rseqc_inner_distance" name="Inner Distance" version="@WRAPPER_VERSION@">
+    <description>calculate the inner distance (or insert size) between two paired RNA reads</description>
+
+    <macros>
+        <import>rseqc_macros.xml</import>
+    </macros>
+
+    <expand macro="requirements" />
+
+    <expand macro="stdio" />
+
+    <version_command><![CDATA[inner_distance.py --version]]></version_command>
 
-		#if $bounds.hasLowerBound
-			-l $bounds.lowerBound
-		#end if
+    <command><![CDATA[
+        inner_distance.py -i '${input}' -o output -r '${refgene}'
+            --sample-size ${sample_size}
+            --lower-bound ${lowerBound}
+            --upper-bound ${upperBound}
+            --step ${step}
+            --mapq ${mapq}
+        ]]>
+    </command>
 
-		#if $bounds2.hasUpperBound
-			-u $bounds2.upperBound
-		#end if
+    <inputs>
+        <expand macro="bam_sam_param" />
+        <expand macro="refgene_param" />
+        <expand macro="sample_size_param" />
+        <param name="lowerBound" type="integer" value="-250" label="Lower bound (bp, default=-250)" help="Used for plotting histogram (--lower-bound)"/>
+        <param name="upperBound" type="integer" value="250" label="Upper bound (bp, default=250)" help="Used for plotting histogram (--upper-bound)"/>
+        <param name="step" type="integer" value="5" label="Step size of histogram (bp, default=5)" help="(--step)"/>
+        <expand macro="mapq_param" />
+        <expand macro="rscript_output_param" />
+    </inputs>
 
-		#if $steps.step
-			-s $steps.stepSize
-		#end if
-	</command>
-	<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" />
-		<conditional name="bounds">
-			<param name="hasLowerBound" type="boolean" label="Specify lower bound" value="false"/>
-			<when value="true">
-				<param name="lowerBound" type="integer" value="-250" label="Estimated Lower Bound (bp, default=-250)" />
-			</when>
-		</conditional>
-		<conditional name="bounds2">
-			<param name="hasUpperBound" type="boolean" label="Specify upper bound" value="false" />
-			<when value="true">
-				<param name="upperBound" type="integer" value="250" label="Estimated Upper Bound (bp, default=250)" />
-			</when>
-		</conditional>
-		<conditional name="steps">
-			<param name="step" type="boolean" label="Specify step size" value="false" />
-			<when value="true">
-				<param name="stepSize" type="integer" value="5" label="Step size (bp, default=5)" />
-			</when>
-		</conditional>
-	</inputs>
-	<outputs>
-		<data format="txt" name="outputtxt" from_work_dir="output.inner_distance.txt"/>
-		<data format="txt" name="outputfreqtxt" from_work_dir="output.inner_distance_freq.txt" />
-		<data format="pdf" name="outputpdf" from_work_dir="output.inner_distance_plot.pdf" />
-		<data format="r" name="outputr" from_work_dir="output.inner_distance_plot.r" />
-	</outputs>
-	<tests>
-		<test>
-			<param name="input" value="Pairend_nonStrandSpecific_36mer_Human_hg19.bam" />
-			<param name="refgene" value="hg19_RefSeq.bed" />
-			<output name="outputpdf" file="innerdisout.inner_distance_plot.pdf" />
-			<output name="outputr" file="innerdisout.inner_distance_plot.r" />
-			<output name="outputfreqtxt" file="innerdisout.inner_distance_freq.txt" />
-			<output name="outputtxt" file="innerdisout.inner_distance.txt" />
-		</test>
-	</tests>
-	<help>
-.. image:: https://code.google.com/p/rseqc/logo?cct=1336721062
+    <outputs>
+        <expand macro="pdf_output_data" filename="output.inner_distance_plot.pdf" />
+        <data format="txt" name="outputtxt" from_work_dir="output.inner_distance.txt" label="${tool.name} on ${on_string} (text)"/>
+        <data format="txt" name="outputfreqtxt" from_work_dir="output.inner_distance_freq.txt" label="${tool.name} on ${on_string} (frequency text)" />
+        <expand macro="rscript_output_data" filename="output.inner_distance_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"/>
+            <param name="rscript_output" value="true" />
+            <output name="outputtxt" file="output.inner_distance.txt" />
+            <output name="outputfreqtxt" file="output.inner_distance_freq.txt" />
+            <output name="outputpdf" file="output.inner_distance_plot.pdf" compare="sim_size"/>
+            <output name="outputr" file="output.inner_distance_plot.r" />
+        </test>
+    </tests>
 
-About RSeQC
-+++++++++++
+    <help><![CDATA[
+inner_distance.py
++++++++++++++++++
+
+This module is used to calculate the inner distance (or insert size) between two paired RNA
+reads. The distance is the mRNA length between two paired fragments. We first determine the
+genomic (DNA) size between two paired reads: D_size = read2_start - read1_end, then
 
-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.
+* if two paired reads map to the same exon: inner distance = D_size
+* if two paired reads map to different exons:inner distance = D_size - intron_size
+* if two paired reads map non-exonic region (such as intron and intergenic region): inner distance = D_size
+* The inner_distance might be a negative value if two fragments were overlapped.
 
-The RSeQC package is licensed under the GNU GPL v3 license.
+NOTE: Not all read pairs were used to estimate the inner distance distribution. Those low
+quality, PCR duplication, multiple mapped reads were skipped.
 
 Inputs
 ++++++++++++++
 
 Input BAM/SAM file
-	Alignment file in BAM/SAM format.
+    Alignment file in BAM/SAM format.
 
 Reference gene model
-	Gene model in BED format.
+    Gene model in BED format.
 
 Estimated Upper/Lower Bounds (defaults=250 and -250)
-	Estimated upper/lower bounds of inner distance (bp).
+    Estimated upper/lower bounds of inner distance (bp).
 
 Step size (default=5)
-	Step size of histogram
+    Step size of histogram
 
 
 Output
 ++++++++++++++
 
 1. output.inner_distance.txt:
-- first column is read ID
--second column is inner distance. Could be negative value if PE reads were overlapped or mapping error (e.g. Read1_start < Read2_start, while Read1_end >> Read2_end due to spliced mapping of read1)
-- third column indicates how paired reads were mapped: PE_within_same_exon, PE_within_diff_exon,PE_reads_overlap
+    - first column is read ID
+    -second column is inner distance. Could be negative value if PE reads were overlapped or mapping error (e.g. Read1_start &lt; Read2_start, while Read1_end >> Read2_end due to spliced mapping of read1)
+    - third column indicates how paired reads were mapped: PE_within_same_exon, PE_within_diff_exon,PE_reads_overlap
 2. output..inner_distance_freq.txt:
-- inner distance starts
-- inner distance ends
-- number of read pairs
-- note the first 2 columns are left side half open interval
+    - inner distance starts
+    - inner distance ends
+    - number of read pairs
+    - note the first 2 columns are left side half open interval
 3. output.inner_distance_plot.r: R script to generate histogram
 4. output.inner_distance_plot.pdf: histogram plot
 
-.. image:: http://dldcc-web.brc.bcm.edu/lilab/liguow/RSeQC/figure/inner_distance.png
+.. image:: $PATH_TO_IMAGES/inner_distance.png
+   :height: 600 px
+   :width: 600 px
+   :scale: 80 %
+
+@ABOUT@
 
-	</help>
+]]>
+    </help>
+
+    <expand macro="citations" />
+
 </tool>