Mercurial > repos > artbio > sashimi_plot
comparison sashimi_plot.xml @ 0:9304dd9a16a2 draft
"planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sashimi_plot commit 746c03a1187e1d708af8628920a0c615cddcdacc"
author | artbio |
---|---|
date | Fri, 23 Aug 2019 11:38:29 -0400 |
parents | |
children | 64aa67b5099f |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:9304dd9a16a2 |
---|---|
1 <tool id="sashimi_plot" name="Sashimi plot" version="0.1.0"> | |
2 <description>: visualization of splicing events across multiple samples</description> | |
3 <requirements> | |
4 <requirement type="package" version="3">python</requirement> | |
5 <requirement type="package" version="1.3">samtools</requirement> | |
6 <requirement type="package" version="2.2.1=r3.4.1_0">r-ggplot2</requirement> | |
7 <requirement type="package" version="1.10.4=r3.4.1_0">r-data.table</requirement> | |
8 <requirement type="package" version="2.2.1=r3.4.1_0">r-gridextra</requirement> | |
9 </requirements> | |
10 <stdio> | |
11 <exit_code range="1:" level="fatal" description="Tool exception" /> | |
12 </stdio> | |
13 <command detect_errors="exit_code"><![CDATA[ | |
14 touch index_bams.tsv && | |
15 #for $factor in $rep_factor: | |
16 #for $sample in $factor.rep_sample: | |
17 echo -e '${sample.sampleName}\t${sample.bamFile}\t${factor.factorName}' >> index_bams.tsv && | |
18 samtools index ${sample.bamFile} && | |
19 #end for | |
20 #end for | |
21 | |
22 python $__tool_directory__/sashimi-plot.py | |
23 -b index_bams.tsv | |
24 -g ${gtf_file} | |
25 -c ${region} | |
26 #if $adv_opts.adv_opts_selector=="advanced": | |
27 -M ${adv_opts.min_coverage} | |
28 -C ${adv_opts.color_levels} | |
29 -O ${adv_opts.overlap.overlay} | |
30 #if $adv_opts.overlap.overlay=="3" and not $adv_opts.overlap.agg=="": | |
31 -A ${adv_opts.overlap.agg} | |
32 #end if | |
33 ${adv_opts.shrink} | |
34 --alpha ${adv_opts.alpha} | |
35 --base-size=${adv_opts.base_size} | |
36 --ann-height=${adv_opts.ann_height} | |
37 --height=${adv_opts.height} | |
38 --width=${adv_opts.width} | |
39 #end if | |
40 -o plot && | |
41 mv plot.pdf ${plot} | |
42 | |
43 ]]></command> | |
44 <inputs> | |
45 <param format="gtf" name="gtf_file" type="data" label="Genome annotation" help="" /> | |
46 <repeat name="rep_factor" title="Genotype" min="1"> | |
47 <param name="factorName" label="Factor name" type="text" help="Specify a factor level, typical values could be 'HOM', 'HET'" /> | |
48 <repeat name="rep_sample" title="Bam file" min="1"> | |
49 <param name="sampleName" type="text" label="Sample Name" help="Track name on plot"/> | |
50 <param name="bamFile" type="data" format="bam" multiple="false" label="Alignment File" help=""/> | |
51 </repeat> | |
52 </repeat> | |
53 <conditional name="adv_opts"> | |
54 <param name="adv_opts_selector" type="select" label="Advanced Options"> | |
55 <option value="basic" selected="True">Hide Advanced Options</option> | |
56 <option value="advanced">Show Advanced Options</option> | |
57 </param> | |
58 <when value="basic" /> | |
59 <when value="advanced"> | |
60 <param name="shrink" type="boolean" label="Intron shrinkage" truevalue="--shrink" falsevalue="" checked="false" | |
61 help="Shrink the introns by a factor for nicer display"/> | |
62 <param name="min_coverage" label="Minimum coverage" type="integer" value="1" help="Minimum number of reads supporting a junction to be drawn [default=1]"/> | |
63 <param name="color_levels" label="How to color samples ?" type="select"> | |
64 <option value="3" selected="True">By Genotype</option> | |
65 <option value="1" >By Sample</option> | |
66 </param> | |
67 <conditional name="overlap"> | |
68 <param name="overlay" label="Overlay sample by Genotype ?" type="boolean" truevalue="3" falsevalue="1" checked="false" /> | |
69 <when value="3"> | |
70 <param name="agg" label="Aggregate function for overlay" type="select" help="Use mean_j | median_j to keep density overlay but aggregate junction counts"> | |
71 <option value="" selected="True">No aggregation</option> | |
72 <option value="mean" >Mean counts</option> | |
73 <option value="median" >Median counts</option> | |
74 <option value="mean_j" >Mean of counts supporting junctions</option> | |
75 <option value="median_j" >Median of counts supporting junctions</option> | |
76 </param> | |
77 </when> | |
78 <when value="1"/> | |
79 </conditional> | |
80 <param name="alpha" label="Transparency level for density histogram" type="float" value="0.5" help="default=0.5"/> | |
81 <param name="base_size" label="Base font size" type="float" value="14" help="Base font size of the plot in pch [default=14]"/> | |
82 <param name="ann_height" label="Height of annotation" type="float" value="1.5" help="Height of annotation plot (transcripts visualisation) in inches [default=1.5]"/> | |
83 <param name="height" label="Height of sashimi plot" type="float" value="2" help="Height of the individual signal plot (sashimi vizualisation) in inches [default=2]"/> | |
84 <param name="width" label="Width" type="float" value="10" help="Width of the plot in inches [default=10]"/> | |
85 </when> | |
86 </conditional> | |
87 <param name="region" type="text" help="Must be the following format : chromosome:start-end"/> | |
88 </inputs> | |
89 <outputs> | |
90 <data name="plot" format="pdf" label="Sashimi plot" /> | |
91 </outputs> | |
92 <tests> | |
93 <test> | |
94 <param name="gtf_file" value="annotation.gtf" ftype="gtf" /> | |
95 <repeat name="rep_factor"> | |
96 <param name="factorName" value="Endothelial" /> | |
97 <repeat name="rep_sample"> | |
98 <param name="sampleName" value="sample1" /> | |
99 <param name="bamFile" value="ENCFF450AIU.chr10_27035000_27050000.bam" ftype="bam" /> | |
100 </repeat> | |
101 <repeat name="rep_sample"> | |
102 <param name="sampleName" value="sample2" /> | |
103 <param name="bamFile" value="ENCFF914GVK.chr10_27035000_27050000.bam" ftype="bam" /> | |
104 </repeat> | |
105 </repeat> | |
106 <repeat name="rep_factor"> | |
107 <param name="factorName" value="Epithelial" /> | |
108 <repeat name="rep_sample"> | |
109 <param name="sampleName" value="sample3" /> | |
110 <param name="bamFile" value="ENCFF756PUW.chr10_27035000_27050000.bam" ftype="bam" /> | |
111 </repeat> | |
112 <repeat name="rep_sample"> | |
113 <param name="sampleName" value="sample4"/> | |
114 <param name="bamFile" value="ENCFF325HFX.chr10_27035000_27050000.bam" ftype="bam" /> | |
115 </repeat> | |
116 </repeat> | |
117 <param name="region" value="chr10:27040584-27048100" /> | |
118 <output name="plot" value="default.pdf" ftype="pdf" /> | |
119 </test> | |
120 <test> | |
121 <param name="gtf_file" value="annotation.gtf" ftype="gtf" /> | |
122 <repeat name="rep_factor"> | |
123 <param name="factorName" value="Endothelial" /> | |
124 <repeat name="rep_sample"> | |
125 <param name="sampleName" value="sample1" /> | |
126 <param name="bamFile" value="ENCFF450AIU.chr10_27035000_27050000.bam" ftype="bam" /> | |
127 </repeat> | |
128 <repeat name="rep_sample"> | |
129 <param name="sampleName" value="sample2" /> | |
130 <param name="bamFile" value="ENCFF914GVK.chr10_27035000_27050000.bam" ftype="bam" /> | |
131 </repeat> | |
132 </repeat> | |
133 <repeat name="rep_factor"> | |
134 <param name="factorName" value="Epithelial" /> | |
135 <repeat name="rep_sample"> | |
136 <param name="sampleName" value="sample3" /> | |
137 <param name="bamFile" value="ENCFF756PUW.chr10_27035000_27050000.bam" ftype="bam" /> | |
138 </repeat> | |
139 <repeat name="rep_sample"> | |
140 <param name="sampleName" value="sample4"/> | |
141 <param name="bamFile" value="ENCFF325HFX.chr10_27035000_27050000.bam" ftype="bam" /> | |
142 </repeat> | |
143 </repeat> | |
144 <param name="region" value="chr10:27040584-27048100" /> | |
145 <param name="adv_opts_selector" value="advanced" /> | |
146 <param name="min_coverage" value="10" /> | |
147 <param name="color_levels" value="3" /> | |
148 <param name="alpha" value="0.25" /> | |
149 <param name="base_size" value="20" /> | |
150 <param name="ann_height" value="4" /> | |
151 <param name="height" value="3" /> | |
152 <param name="width" value="18" /> | |
153 <param name="overlay" value="True" /> | |
154 <output name="plot" file="overlay_without_aggregation.pdf" ftype="pdf" /> | |
155 </test> | |
156 <test> | |
157 <param name="gtf_file" value="annotation.gtf" ftype="gtf" /> | |
158 <repeat name="rep_factor"> | |
159 <param name="factorName" value="Endothelial" /> | |
160 <repeat name="rep_sample"> | |
161 <param name="sampleName" value="sample1" /> | |
162 <param name="bamFile" value="ENCFF450AIU.chr10_27035000_27050000.bam" ftype="bam" /> | |
163 </repeat> | |
164 <repeat name="rep_sample"> | |
165 <param name="sampleName" value="sample2" /> | |
166 <param name="bamFile" value="ENCFF914GVK.chr10_27035000_27050000.bam" ftype="bam" /> | |
167 </repeat> | |
168 </repeat> | |
169 <repeat name="rep_factor"> | |
170 <param name="factorName" value="Epithelial" /> | |
171 <repeat name="rep_sample"> | |
172 <param name="sampleName" value="sample3" /> | |
173 <param name="bamFile" value="ENCFF756PUW.chr10_27035000_27050000.bam" ftype="bam" /> | |
174 </repeat> | |
175 <repeat name="rep_sample"> | |
176 <param name="sampleName" value="sample4"/> | |
177 <param name="bamFile" value="ENCFF325HFX.chr10_27035000_27050000.bam" ftype="bam" /> | |
178 </repeat> | |
179 </repeat> | |
180 <param name="region" value="chr10:27040584-27048100" /> | |
181 <param name="adv_opts_selector" value="advanced" /> | |
182 <param name="color_levels" value="3" /> | |
183 <param name="ann_height" value="3" /> | |
184 <param name="height" value="3" /> | |
185 <param name="overlay" value="True" /> | |
186 <param name="agg" value="mean" /> | |
187 <param name="shrink" value="True" /> | |
188 <output name="plot" file="overlay_with_aggregation.pdf" ftype="pdf" /> | |
189 </test> | |
190 </tests> | |
191 <help> | |
192 | |
193 .. class:: infomark | |
194 | |
195 **What it does** | |
196 | |
197 Generate a sashimi plot from bam files in order to visualize splicing events. | |
198 </help> | |
199 <citations> | |
200 <citation type="doi">10.1371/journal.pcbi.1006360</citation> | |
201 </citations> | |
202 </tool> | |
203 |