Mercurial > repos > nilesh > rseqc
diff RPKM_saturation.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/RPKM_saturation.xml Thu Jul 18 11:01:08 2013 -0500 +++ b/RPKM_saturation.xml Tue Mar 14 10:22:57 2017 -0400 @@ -1,108 +1,130 @@ -<tool id="RPKM_saturation" name="RPKM Saturation"> - <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.3.7">rseqc</requirement> - </requirements> - <command interpreter="python"> RPKM_saturation.py -i $input -o output -r $refgene +<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> + + <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}' + + #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) == "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 - #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> - -l $percentileFloor -u $percentileCeiling -s $percentileStep -c $rpkmCutoff + <inputs> + <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)" /> + <expand macro="mapq_param" /> + <expand macro="rscript_output_param" /> + </inputs> - </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"/> - <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"/> - </outputs> - <tests> - <test> - <param name="input" value="Pairend_nonStrandSpecific_36mer_Human_hg19.bam" /> - <param name="refgene" value="hg19_RefSeq.bed" /> - <output name="outputxls" file="rpkmsatout.eRPKM.xls" /> - <output name="outputrawxls" file="rpkmsatout.rawCount.xls" /> - <output name="outputr" file="rpkmsatout.saturation.r" /> - <output name="outputpdf" file="rpkmsatout.saturation.pdf" /> - </test> - </tests> - <help> -.. image:: https://code.google.com/p/rseqc/logo?cct=1336721062 + <outputs> + <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" /> + <has_line_matching expression="chr1\t16174358\t16266950\tNM_015001.*" /> + </assert_contents> + </output> + <output name="outputrawxls"> + <assert_contents> + <has_n_columns n="26" /> + <has_line_matching expression="chr1\t16174358\t16266950\tNM_015001.*" /> + </assert_contents> + </output> + <output name="outputr"> + <assert_contents> + <has_text text="pdf('output.saturation.pdf')" /> + <has_line_matching expression="S5=c\(\d+\.\d+\)" /> + </assert_contents> + </output> + <output name="outputpdf" file="output.saturation.pdf" compare="sim_size" /> + </test> + </tests> -About RSeQC -+++++++++++ + <help><![CDATA[ +RPKM_saturation.py +++++++++++++++++++ -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 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. -The RSeQC package is licensed under the GNU GPL v3 license. +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. + +.. image:: $PATH_TO_IMAGES/RelativeError.png + :height: 80 px + :width: 400 px + :scale: 100 % 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. 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. +Only use exonic reads + Renders program only used exonic (UTR exons and CDS exons) reads, otherwise use all reads. Output ++++++++++++++ @@ -112,17 +134,35 @@ 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:: $PATH_TO_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. - 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):: -- 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 <- seq(5,100,5) #resampling percentage (5,10,15,...,100) + rpkm <- 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 - </help> +.. image:: $PATH_TO_IMAGES/saturation_eg.png + :height: 600 px + :width: 600 px + :scale: 80 % + +@ABOUT@ + +]]> + </help> + + <expand macro="citations" /> + </tool>
