diff RPKM_saturation.xml @ 31:cc5eaa9376d8

Lance's updates
author nilesh
date Wed, 02 Oct 2013 02:20:04 -0400
parents 907d4b021ff6
children 580ee0c4bc4e
line wrap: on
line diff
--- a/RPKM_saturation.xml	Thu Jul 11 12:33:27 2013 -0400
+++ b/RPKM_saturation.xml	Wed Oct 02 02:20:04 2013 -0400
@@ -1,10 +1,11 @@
-<tool id="RPKM_saturation" name="RPKM Saturation">
+<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.15.1">R</requirement>
+		<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 interpreter="python"> RPKM_saturation.py -i $input -o output -r $refgene
+	<command> RPKM_saturation.py -i $input -o output -r $refgene
 
 		#if str($strand_type.strand_specific) == "pair"
 			-d
@@ -56,22 +57,37 @@
 		<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"/>
-		<data format="xls" name="outputrawxls" from_work_dir="output.rawCount.xls"/>
-		<data format="r" name="outputr" from_work_dir="output.saturation.r"/>
-		<data format="pdf" name="outputpdf" from_work_dir="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)"/>
+		<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>
+    <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>
-.. image:: https://code.google.com/p/rseqc/logo?cct=1336721062
+RPKM_saturation.py
+++++++++++++++++++
 
------
+The precision of any sample statitics (RPKM) is affected by sample size (sequencing depth);
+\'resampling\' or \'jackknifing\' is a method to estimate the precision of sample statistics by
+using subsets of available data. This module will resample a series of subsets from total RNA
+reads and then calculate RPKM value using each subset. By doing this we are able to check if
+the current sequencing depth was saturated or not (or if the RPKM values were stable or not)
+in terms of genes' expression estimation. If sequencing depth was saturated, the estimated
+RPKM value will be stationary or reproducible. By default, this module will calculate 20
+RPKM values (using 5%, 10%, ... , 95%,100% of total reads) for each transcripts. 
 
-About RSeQC
-+++++++++++
+In the output figure, Y axis is "Percent Relative Error" or "Percent Error" which is used
+to measures how the RPKM estimated from subset of reads (i.e. RPKMobs) deviates from real
+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.
 
-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/_images/RelativeError.png
+   :height: 80 px
+   :width: 400 px
+   :scale: 100 %
 
 Inputs
 ++++++++++++++
@@ -102,7 +118,10 @@
 3. output.saturation.r: R script to generate plot
 4. output.saturation.pdf:
 
-.. image:: http://dldcc-web.brc.bcm.edu/lilab/liguow/RSeQC/figure/saturation.png
+.. image:: http://rseqc.sourceforge.net/_images/saturation.png
+   :height: 600 px
+   :width: 600 px
+   :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.
@@ -111,8 +130,31 @@
 	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)::
-- output example
-.. image:: http://dldcc-web.brc.bcm.edu/lilab/liguow/RSeQC/figure/saturation_eg.png
+
+    pdf("xxx.pdf")     #starts the graphics device driver for producing PDF graphics
+    x &lt;- seq(5,100,5)  #resampling percentage (5,10,15,...,100)
+    rpkm &lt;- c(32.95,35.43,35.15,36.04,36.41,37.76,38.96,38.62,37.81,38.14,37.97,38.58,38.59,38.54,38.67, 38.67,38.87,38.68,  38.42,  38.23)  #Paste RPKM values calculated from each subsets
+    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
+   :height: 600 px
+   :width: 600 px
+   :scale: 80 % 
+
+-----
+
+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.
+
+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>
 </tool>