comparison geneBody_coverage.xml @ 52:34e4c586e3c0 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/rseqc commit 7f68686cac77df831f1a26a2126a238a2e480316
author iuc
date Tue, 21 Nov 2017 14:55:32 -0500
parents 09846d5169fa
children 5873cd7afb67
comparison
equal deleted inserted replaced
51:09846d5169fa 52:34e4c586e3c0
1 <tool id="rseqc_geneBody_coverage" name="Gene Body Converage (BAM)" version="@WRAPPER_VERSION@"> 1 <tool id="rseqc_geneBody_coverage" name="Gene Body Converage (BAM)" version="@WRAPPER_VERSION@.1">
2 <description> 2 <description>
3 Read coverage over gene body. 3 Read coverage over gene body.
4 </description> 4 </description>
5 5
6 <macros> 6 <macros>
12 <expand macro="stdio" /> 12 <expand macro="stdio" />
13 13
14 <version_command><![CDATA[geneBody_coverage.py --version]]></version_command> 14 <version_command><![CDATA[geneBody_coverage.py --version]]></version_command>
15 15
16 <command><![CDATA[ 16 <command><![CDATA[
17 #import re 17 #if str($batch_mode.batch_mode_selector) == "merge":
18 #set $input_list = [] 18 #import re
19 #for $i, $input in enumerate($inputs): 19 #set $input_list = []
20 #for $i, $input in enumerate($batch_mode.inputs):
21 #set $safename = re.sub('[^\w\-_]', '_', $input.element_identifier)
22 #if $safename in $input_list:
23 #set $safename = str($safename) + "." + str($i)
24 #end if
25 $input_list.append($safename)
26 ln -sf '${input}' '${safename}.bam' &&
27 ln -sf '${input.metadata.bam_index}' '${safename}.bam.bai' &&
28 echo '${safename}.bam' >> 'input_list.txt' &&
29 #end for
30 geneBody_coverage.py -i 'input_list.txt' -r '${refgene}' --minimum_length ${minimum_length} -o output
31 #else
20 #set $safename = re.sub('[^\w\-_]', '_', $input.element_identifier) 32 #set $safename = re.sub('[^\w\-_]', '_', $input.element_identifier)
21 #if $safename in $input_list:
22 #set $safename = str($safename) + "." + str($i)
23 #end if
24 $input_list.append($safename)
25 ln -sf '${input}' '${safename}.bam' && 33 ln -sf '${input}' '${safename}.bam' &&
26 ln -sf '${input.metadata.bam_index}' '${safename}.bam.bai' && 34 ln -sf '${input.metadata.bam_index}' '${safename}.bam.bai' &&
27 echo '${safename}.bam' >> 'input_list.txt' && 35 geneBody_coverage.py -i '${safename}.bam' -r '${refgene}' --minimum_length ${minimum_length} -o output
28 #end for 36 #end if
29 geneBody_coverage.py -i 'input_list.txt' -r '${refgene}' --minimum_length ${minimum_length} -o output
30 ]]> 37 ]]>
31 </command> 38 </command>
32 39
33 <inputs> 40 <inputs>
34 <param name="inputs" type="data" label="Input .bam file(s)" format="bam" help="(--input-file)" multiple="true"/> 41 <conditional name="batch_mode">
42 <param name="batch_mode_selector" type="select" label="Run each sample separately, or combine mutiple samples into one plot">
43 <option value="batch" selected="true">Run each sample separately</option>
44 <option value="merge">Combine multiple samples into a single plot</option>
45 </param>
46 <when value="batch">
47 <param name="input" type="data" label="Input .bam file" format="bam" help="(--input-file)"/>
48 </when>
49 <when value="merge">
50 <param name="inputs" type="data" label="Input .bam file(s)" format="bam" help="(--input-file)" multiple="true"/>
51 </when>
52 </conditional>
35 <expand macro="refgene_param" /> 53 <expand macro="refgene_param" />
36 <param name="minimum_length" type="integer" value="100" label="Minimum mRNA length (default: 100)" help="Minimum mRNA length in bp, mRNA that are shorter than this value will be skipped (--minimum_length)." /> 54 <param name="minimum_length" type="integer" value="100" label="Minimum mRNA length (default: 100)" help="Minimum mRNA length in bp, mRNA that are shorter than this value will be skipped (--minimum_length)." />
37 <expand macro="rscript_output_param" /> 55 <expand macro="rscript_output_param" />
38 </inputs> 56 </inputs>
39 57
40 <outputs> 58 <outputs>
41 <data name="outputcurvespdf" format="pdf" from_work_dir="output.geneBodyCoverage.curves.pdf" label="${tool.name} on ${on_string} (Curves pdf)" /> 59 <data name="outputcurvespdf" format="pdf" from_work_dir="output.geneBodyCoverage.curves.pdf" label="${tool.name} on ${on_string} (Curves pdf)" />
42 <data name="outputheatmappdf" format="pdf" from_work_dir="output.geneBodyCoverage.heatMap.pdf" label="${tool.name} on ${on_string} (HeatMap pdf)"> 60 <data name="outputheatmappdf" format="pdf" from_work_dir="output.geneBodyCoverage.heatMap.pdf" label="${tool.name} on ${on_string} (HeatMap pdf)">
43 <filter>len(inputs) >= 3</filter> 61 <filter>batch_mode['batch_mode_selector'] == 'merge' and len(inputs) >= 3</filter>
44 </data> 62 </data>
45 <expand macro="rscript_output_data" filename="output.geneBodyCoverage.r" /> 63 <expand macro="rscript_output_data" filename="output.geneBodyCoverage.r" />
46 <data name="outputtxt" format="txt" from_work_dir="output.geneBodyCoverage.txt" label="${tool.name} on ${on_string} (text)" /> 64 <data name="outputtxt" format="txt" from_work_dir="output.geneBodyCoverage.txt" label="${tool.name} on ${on_string} (text)" />
47 </outputs> 65 </outputs>
48 66
49 <!-- PDF Files contain R version, must avoid checking for diff --> 67 <!-- PDF Files contain R version, must avoid checking for diff -->
50 <tests> 68 <tests>
51 <test> 69 <test>
52 <param name="inputs" value="pairend_strandspecific_51mer_hg19_chr1_1-100000.bam" /> 70 <conditional name="batch_mode">
71 <param name="batch_mode_selector" value="batch" />
72 <param name="input" value="pairend_strandspecific_51mer_hg19_chr1_1-100000.bam" />
73 </conditional>
53 <param name="refgene" value="hg19_RefSeq_chr1_1-100000.bed" /> 74 <param name="refgene" value="hg19_RefSeq_chr1_1-100000.bed" />
54 <param name="rscript_output" value="true" /> 75 <param name="rscript_output" value="true" />
55 <output name="outputcurvespdf" file="output.geneBodyCoverage.curves.pdf" compare="sim_size" /> 76 <output name="outputcurvespdf" file="output.geneBodyCoverage.curves.pdf" compare="sim_size" />
56 <output name="outputr" file="output.geneBodyCoverage.r" /> 77 <output name="outputr" file="output.geneBodyCoverage.r" />
57 <output name="outputtxt" file="output.geneBodyCoverage.txt" /> 78 <output name="outputtxt" file="output.geneBodyCoverage.txt" />
58 </test> 79 </test>
59 <test> 80 <test>
60 <param name="inputs" value="pairend_strandspecific_51mer_hg19_chr1_1-100000.bam,pairend_strandspecific_51mer_hg19_chr1_1-100000.bam,pairend_strandspecific_51mer_hg19_chr1_1-100000.bam" /> 81 <conditional name="batch_mode">
82 <param name="batch_mode_selector" value="merge" />
83 <param name="inputs" value="pairend_strandspecific_51mer_hg19_chr1_1-100000.bam,pairend_strandspecific_51mer_hg19_chr1_1-100000.bam,pairend_strandspecific_51mer_hg19_chr1_1-100000.bam" />
84 </conditional>
61 <param name="refgene" value="hg19_RefSeq_chr1_1-100000.bed" /> 85 <param name="refgene" value="hg19_RefSeq_chr1_1-100000.bed" />
62 <param name="rscript_output" value="true" /> 86 <param name="rscript_output" value="true" />
63 <output name="outputcurvespdf" file="output2.geneBodyCoverage.curves.pdf" compare="sim_size" /> 87 <output name="outputcurvespdf" file="output2.geneBodyCoverage.curves.pdf" compare="sim_size" />
64 <output name="outputheatmappdf" file="output2.geneBodyCoverage.heatMap.pdf" compare="sim_size" /> 88 <output name="outputheatmappdf" file="output2.geneBodyCoverage.heatMap.pdf" compare="sim_size" />
65 <output name="outputr" file="output2.geneBodyCoverage.r" /> 89 <output name="outputr" file="output2.geneBodyCoverage.r" />
77 101
78 When heatmap is generated, samples are ranked by the "skewness" of the coverage: Sample with best (worst) coverage will be displayed at the top (bottom) of the heatmap. 102 When heatmap is generated, samples are ranked by the "skewness" of the coverage: Sample with best (worst) coverage will be displayed at the top (bottom) of the heatmap.
79 Coverage skewness was measured by `Pearson’s skewness coefficients <http://en.wikipedia.org/wiki/Skewness#Pearson.27s_skewness_coefficients>`_ 103 Coverage skewness was measured by `Pearson’s skewness coefficients <http://en.wikipedia.org/wiki/Skewness#Pearson.27s_skewness_coefficients>`_
80 104
81 .. image:: $PATH_TO_IMAGES/geneBody_workflow.png 105 .. image:: $PATH_TO_IMAGES/geneBody_workflow.png
82 :width: 800 px 106 :width: 800 px
83 :scale: 80 % 107 :scale: 80 %
84 108
85 109
86 ## Inputs 110 ## Inputs
87 111
88 Input BAM/SAM file 112 Input BAM/SAM file
92 Gene Model in BED format. 116 Gene Model in BED format.
93 117
94 Minimum mRNA length 118 Minimum mRNA length
95 Minimum mRNA length (bp). mRNA that are shorter than this value will be skipped (default is 100). 119 Minimum mRNA length (bp). mRNA that are shorter than this value will be skipped (default is 100).
96 120
97 ## Outputs 121 ## Outputs
98 122
99 Text 123 Text
100 Table that includes the data used to generate the plots 124 Table that includes the data used to generate the plots
101 125
102 R Script 126 R Script
110 :height: 600 px 134 :height: 600 px
111 :width: 600 px 135 :width: 600 px
112 :scale: 80 % 136 :scale: 80 %
113 137
114 .. image:: $PATH_TO_IMAGES/Aug_26.geneBodyCoverage.heatMap.png 138 .. image:: $PATH_TO_IMAGES/Aug_26.geneBodyCoverage.heatMap.png
115 :height: 600 px 139 :height: 600 px
116 :width: 600 px 140 :width: 600 px
117 :scale: 80 % 141 :scale: 80 %
118 142
119 @ABOUT@ 143 @ABOUT@
120 144
121 ]]> 145 ]]>
122 </help> 146 </help>