diff RPKM_saturation.xml @ 32:580ee0c4bc4e

Fixes from Bjorn Gruning: create symlinks under $TMP and clean them up afterwards, replace R dependency with the Tool Shed R3 package, add --install-scripts, prepend tool-ids with rseqc
author lparsons
date Mon, 07 Oct 2013 15:01:13 -0400
parents cc5eaa9376d8
children
line wrap: on
line diff
--- a/RPKM_saturation.xml	Wed Oct 02 02:20:04 2013 -0400
+++ b/RPKM_saturation.xml	Mon Oct 07 15:01:13 2013 -0400
@@ -1,72 +1,72 @@
-<tool id="RPKM_saturation" name="RPKM Saturation" version="1.1">
-	<description>calculates raw count and RPKM values for transcript at exon, intron, and mRNA level</description>
-	<requirements>
-		<requirement type="package" version="2.11.0">R</requirement>
-		<requirement type="package" version="1.7.1">numpy</requirement>
-		<requirement type="package" version="2.3.7">rseqc</requirement>
-	</requirements>
-	<command> RPKM_saturation.py -i $input -o output -r $refgene
-
-		#if str($strand_type.strand_specific) == "pair"
-			-d
-			#if str($strand_type.pair_type) == "sd"
-				'1++,1--,2+-,2-+'
-			#else
-				'1+-,1-+,2++,2--'
-			#end if
-		#end if
-
-		#if str($strand_type.strand_specific) == "single"
-			-d
-			#if str($strand_type.single_type) == "s"
-				'++,--'
-			#else
-				'+-,-+'
-			#end if
-		#end if
-
-		-l $percentileFloor -u $percentileCeiling -s $percentileStep -c $rpkmCutoff
+<tool id="rseqc_RPKM_saturation" name="RPKM Saturation" version="1.1">
+    <description>calculates raw count and RPKM values for transcript at exon, intron, and mRNA level</description>
+    <requirements>
+        <requirement type="package" version="3.0.1">R</requirement>
+        <requirement type="package" version="1.7.1">numpy</requirement>
+        <requirement type="package" version="2.3.7">rseqc</requirement>
+    </requirements>
+    <command> RPKM_saturation.py -i $input -o output -r $refgene
 
-	</command>
-	<inputs>
-		<param name="input" type="data" format="bam" label="input bam/sam file" />
-		<param name="refgene" type="data" format="bed" label="Reference gene model" />
-		<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">
-					<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">
-					<option value="s">positive --> positive; negative --> negative</option>
-					<option value="d">positive --> negative; negative --> positive</option>
-				</param>
-			</when>
-			<when value="none"></when>
-		</conditional>
-		<param name="percentileFloor" type="integer" value="5" label="Begin sampling from this percentile (default=5)" />
-		<param name="percentileCeiling" type="integer" value="100" label="End sampling at this percentile (default=100)" />
-		<param name="percentileStep" type="integer" value="5" label="Sampling step size (default=5)" />
-		<param name="rpkmCutoff" type="text" value="0.01" label="Ignore transcripts with RPKM smaller than this number (default=0.01)" />
-	</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="r" 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)"/>
-	</outputs>
+        #if str($strand_type.strand_specific) == "pair"
+            -d
+            #if str($strand_type.pair_type) == "sd"
+                '1++,1--,2+-,2-+'
+            #else
+                '1+-,1-+,2++,2--'
+            #end if
+        #end if
+
+        #if str($strand_type.strand_specific) == "single"
+            -d
+            #if str($strand_type.single_type) == "s"
+                '++,--'
+            #else
+                '+-,-+'
+            #end if
+        #end if
+
+        -l $percentileFloor -u $percentileCeiling -s $percentileStep -c $rpkmCutoff
+
+    </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>
-	<help>
+    <inputs>
+        <param name="input" type="data" format="bam" label="input bam/sam file" />
+        <param name="refgene" type="data" format="bed" label="Reference gene model" />
+        <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">
+                    <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">
+                    <option value="s">positive --> positive; negative --> negative</option>
+                    <option value="d">positive --> negative; negative --> positive</option>
+                </param>
+            </when>
+            <when value="none"></when>
+        </conditional>
+        <param name="percentileFloor" type="integer" value="5" label="Begin sampling from this percentile (default=5)" />
+        <param name="percentileCeiling" type="integer" value="100" label="End sampling at this percentile (default=100)" />
+        <param name="percentileStep" type="integer" value="5" label="Sampling step size (default=5)" />
+        <param name="rpkmCutoff" type="text" value="0.01" label="Ignore transcripts with RPKM smaller than this number (default=0.01)" />
+    </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)"/>
+    </outputs>
+    <help>
 RPKM_saturation.py
 ++++++++++++++++++
 
@@ -93,22 +93,22 @@
 ++++++++++++++
 
 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.
 
 Strand sequencing type (default=none)
-	See Infer Experiment tool if uncertain.
+    See Infer Experiment tool if uncertain.
 
 Options
 ++++++++++++++
 
 Skip Multiple Hit Reads
-	Use Multiple hit reads or use only uniquely mapped reads.
+    Use Multiple hit reads or use only uniquely mapped reads.
 
 Only use exonic reads 
-	Renders program only used exonic (UTR exons and CDS exons) reads, otherwise use all reads.
+    Renders program only used exonic (UTR exons and CDS exons) reads, otherwise use all reads.
 
 Output
 ++++++++++++++
@@ -124,10 +124,10 @@
    :scale: 80 %     
 
 - All transcripts were sorted in ascending order according to expression level (RPKM). Then they are divided into 4 groups:
-	1. Q1 (0-25%): Transcripts with expression level ranked below 25 percentile.
-	2. Q2 (25-50%): Transcripts with expression level ranked between 25 percentile and 50 percentile.
-	3. Q3 (50-75%): Transcripts with expression level ranked between 50 percentile and 75 percentile.
-	4. Q4 (75-100%): Transcripts with expression level ranked above 75 percentile.
+    1. Q1 (0-25%): Transcripts with expression level ranked below 25 percentile.
+    2. Q2 (25-50%): Transcripts with expression level ranked between 25 percentile and 50 percentile.
+    3. Q3 (50-75%): Transcripts with expression level ranked between 50 percentile and 75 percentile.
+    4. Q4 (75-100%): Transcripts with expression level ranked above 75 percentile.
 - BAM/SAM file containing more than 100 million alignments will make module very slow.
 - Follow example below to visualize a particular transcript (using R console)::
 
@@ -156,5 +156,5 @@
 .. _RSeQC: http://rseqc.sourceforge.net/
 
 
-	</help>
+    </help>
 </tool>