comparison macros.xml @ 0:02b1fe7aed76 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/baredsc commit dad42d788f7407976a67ed50cc886ebe79740e32
author iuc
date Mon, 02 Oct 2023 13:24:52 +0000
parents
children 4fff5a293013
comparison
equal deleted inserted replaced
-1:000000000000 0:02b1fe7aed76
1 <macros>
2 <token name="@TOOL_VERSION@">1.1.1</token>
3 <token name="@VERSION_SUFFIX@">0</token>
4 <xml name="requirements">
5 <requirements>
6 <requirement type="package" version="@TOOL_VERSION@">baredsc</requirement>
7 <requirement type="package" version="1.12">gzip</requirement>
8 </requirements>
9 <version_command><![CDATA[baredSC_1d --version]]></version_command>
10 </xml>
11 <xml name="helpcitations">
12 <help><![CDATA[
13
14 .. class:: infomark
15
16 **BARED (Bayesian Approach to Retreive Expression Distribution of) Single Cell**
17
18 baredSC is a tool that uses a Monte-Carlo Markov Chain to estimate a confidence interval on the probability density function (PDF) of expression of one or two genes from single-cell RNA-seq data. It uses the raw counts and the total number of UMI for each cell. The PDF is approximated by a number of 1d or 2d gaussians provided by the user. The likelihood is estimated using the asumption that the raw counts follow a Poisson distribution of parameter equal to the proportion of mRNA for the gene in the cell multiplied by the total number of UMI identified in this cell.
19
20 To get a description of outputs, please read the `Documentation <https://baredsc.readthedocs.io/en/latest/index.html>`_
21
22 This is a description of the figure with the results.
23
24 - When the 1d version is used, it displays the mean PDF in solid red line, the median in black dashed lines (/!\backslash the integral of the median is not equal to 1) with the confidence interval of 1 sigma (68%), 2 sigma (95%) and 3 sigma (99.7%) as well as in green, the kernel density estimate of the input values, the detected expression (``log(1 + targetSum * raw / total UMI)``).
25
26 - When the 2d version is used, it displays the PDF as a heatmap as well as a projection on the x and y axis. On the projection, the confidence interval 68% is indicated as a shaded area as well as the mean with a solid red line and the median with a dashed black line. On the top right corner, the correlation is indicated with the confidence interval 68% as well as a confidence interval on the one-sided p-value (the probability that the correlation is the opposite sign of the mean, one sigma confidence interval).
27
28 Usually you should run baredSC_1d or baredSC_2d with 1 to 4 gaussians. Then you combine the different models with combineMultipleModels_1d or combineMultipleModels_2d.
29
30 ]]></help>
31 <citations>
32 <citation type="doi">10.1186/s12859-021-04507-8</citation>
33 </citations>
34 </xml>
35 <xml name="edam_topics">
36 <edam_topics>
37 <edam_topic>topic_3170</edam_topic>
38 <edam_topic>topic_4028</edam_topic>
39 <edam_topic>topic_2269</edam_topic>
40 </edam_topics>
41 </xml>
42 <xml name="macro_input_counts">
43 <conditional name="input_counts">
44 <param name="filetype" type="select" label="Input type">
45 <option value="tabular">Tabular</option>
46 <option value="anndata">Anndata (for example from Scanpy)</option>
47 </param>
48 <when value="tabular">
49 <param argument="--input" type="data" format="tabular" label="Input table (with header)" help="Expected format is one line per cell, columns with raw counts and one column 'nCount_RNA' with the total number of UMI per cell (optionally other meta data to filter)" />
50 </when>
51 <when value="anndata">
52 <param argument="--inputAnnData" type="data" format="anndata" label="AnnData containing raw counts" />
53 </when>
54 </conditional>
55 </xml>
56 <xml name="macro_single_gene">
57 <param argument="--geneColName" type="text" value="" label="Name of the column with gene counts."/>
58 </xml>
59 <xml name="macro_two_genes">
60 <param argument="--geneXColName" type="text" value="" label="Name of the column with gene counts for gene in x."/>
61 <param argument="--geneYColName" type="text" value="" label="Name of the column with gene counts for gene in y."/>
62 </xml>
63 <xml name="macro_filter_cells">
64 <conditional name="filter">
65 <param name="nb" type="select" label="How many filters columns do you need?">
66 <option value="0">0 (keep all cells from file)</option>
67 <option value="1">1</option>
68 <option value="2">2</option>
69 <option value="3">3</option>
70 </param>
71 <when value="0"/>
72 <when value="1">
73 <param argument="--metadata1ColName" type="text" value="" label="Name of the column with first filter."/>
74 <param argument="--metadata1Values" type="text" value="" label="Values accepted in this column (separated by comma)."/>
75 </when>
76 <when value="2">
77 <param argument="--metadata1ColName" type="text" value="" label="Name of the column with first filter."/>
78 <param argument="--metadata1Values" type="text" value="" label="Values accepted in this column (separated by comma)."/>
79 <param argument="--metadata2ColName" type="text" value="" label="Name of the column with second filter."/>
80 <param argument="--metadata2Values" type="text" value="" label="Values accepted in this column (separated by comma)."/>
81 </when>
82 <when value="3">
83 <param argument="--metadata1ColName" type="text" value="" label="Name of the column with first filter."/>
84 <param argument="--metadata1Values" type="text" value="" label="Values accepted in this column (separated by comma)."/>
85 <param argument="--metadata2ColName" type="text" value="" label="Name of the column with second filter."/>
86 <param argument="--metadata2Values" type="text" value="" label="Values accepted in this column (separated by comma)."/>
87 <param argument="--metadata3ColName" type="text" value="" label="Name of the column with third filter."/>
88 <param argument="--metadata3Values" type="text" value="" label="Values accepted in this column (separated by comma)."/>
89 </when>
90 </conditional>
91 </xml>
92 <xml name="macro_MCMC_params_common_axis" token_axis="x">
93 <param argument="--@AXIS@min" type="float" value="0" label="Minimum value to consider in @AXIS@ axis." help="Choose value small enough to go below smallest value."/>
94 <param argument="--@AXIS@max" type="float" value="2.5" label="Maximum value to consider in @AXIS@ axis." help="Choose value large enough to go above largest value."/>
95 <param argument="--n@AXIS@" type="integer" min="1" value="100" label="Number of values in @AXIS@ to check how your evaluated PDF is compatible with the model." help="Larger values will increase computing time while smaller values will decrease the resolution of your PDF." />
96 <param argument="--minScale@AXIS@" type="float" value="0.1" label="Minimal value of the scale of Gaussians on @AXIS@" help="Cannot be smaller than max of twice the bin size of PDF evaluation and half the bin size on @AXIS@ axis."/>
97 </xml>
98 <xml name="macro_scale_seed">
99 <conditional name="scale">
100 <param name="type" type="select" label="Scale for gene expression">
101 <option value="Seurat">Like in Seurat (log(1+targetSum*X))</option>
102 <option value="log">simply log</option>
103 </param>
104 <when value="Seurat">
105 <param argument="--targetSum" type="float" value="10000" label="targetSum" help="use 0 for the median of nRNA_Counts"/>
106 </when>
107 <when value="log"/>
108 </conditional>
109 <param argument="--seed" type="integer" value="1" label="Seed value to control randomness." help="Change seed value to get new result"/>
110 </xml>
111 <xml name="macro_MCMC_common_baredSC">
112 <param argument="--nnorm" type="integer" min="1" value="2" label="Number of Gaussians to fit." />
113 <param argument="--nsampMCMC" type="integer" min="1" value="100000" label="Number of samplings (iterations) of MCMC." />
114 <conditional name="automaticRestart">
115 <param name="set_minNeff" type="select" label="Auto-rerun in case of obvious non-convergence">
116 <option value="yes">Yes (the job may never stop)</option>
117 <option value="no">No</option>
118 </param>
119 <when value="yes">
120 <param argument="--minNeff" type="float" value="200" label="Minimum number of effective samples to output result." help="If the number of effective samples is below this threshold, the MCMC is automatically rerun with 10 times more samples"/>
121 </when>
122 <when value="no"/>
123 </conditional>
124 </xml>
125 <xml name="combine_outputs" token_d="1">
126 <param argument="--outputs" type="data" format="npz" label="Numpy archives from baredSC_@D@d with different number of Gaussians." multiple="true"/>
127 </xml>
128 <xml name="macro_plots">
129 <param name="image_file_format" type="select" label="Image output format">
130 <option value="png">png</option>
131 <option value="svg">svg</option>
132 <option value="pdf">pdf</option>
133 </param>
134 <param argument="--title" type="text" value="" label="Title to set to all figures."/>
135 <param argument="--removeFirstSamples" type="integer" value="-1" label="Number of samples to ignore before making the plots" help="Use -1 to use a fourth of the number of samples"/>
136 <param argument="--nsampInPlot" type="integer" value="100000" min="1" label="Approximate number of samples to use in plots"/>
137 </xml>
138 <xml name="macro_prettybins_1d">
139 <param argument="--prettyBins" type="integer" value="-1" min="-1" label="Number of bins to use in plots." help="Use -1 to use the number of bins used in MCMC"/>
140 </xml>
141 <xml name="macro_prettybins_axis" token_axis="x">
142 <param argument="--prettyBins@AXIS@" type="integer" value="-1" min="-1" label="Number of bins to use in @AXIS@ in plots." help="Use -1 to use the number of bins used in MCMC"/>
143 </xml>
144 <xml name="macro_splity">
145 <param argument="--splity" type="text" value="" label="Threshold values separated by space to plot the density for genex for 2 categories in geney values" help="Leave empty if you don't need this type of analysis.">
146 <validator type="regex">(-?[0-9]+( -?[0-9]+)*)?</validator>
147 </param>
148 </xml>
149 <xml name="macro_colorscale">
150 <param argument="--log1pColorScale" type="boolean" truevalue="--log1pColorScale" falsevalue="" checked="false" label="Enable to see regions in plot with low proportion of cells"/>
151 </xml>
152 <xml name="macro_advanced_common_axis" token_axis="x" token_default_osamppdf="5">
153 <param argument="--osamp@AXIS@" type="integer" min="1" value="10" label="Oversampling factor of @AXIS@ values when evaluating PDF of Poisson distribution." />
154 <param argument="--osamp@AXIS@pdf" type="integer" value="@DEFAULT_OSAMPPDF@" label="Oversampling factor of @AXIS@ values when evaluating PDF at each step of the MCMC."/>
155 </xml>
156 <xml name="macro_advanced_evidence">
157 <param argument="--coviscale" type="float" value="1" label="Scale factor to apply to covariance of parameters to get random parameters in logevidence evaluation." />
158 <param argument="--nis" type="integer" value="1000" label="Size of sampling of random parameters in logevidence evaluation." />
159 </xml>
160 <xml name="macro_advanced_common_baredSC">
161 <conditional name="burn">
162 <param name="custom" type="select" label="Custom parameters of the burning phase of MCMC">
163 <option value="no">No</option>
164 <option value="yes">Yes</option>
165 </param>
166 <when value="no"/>
167 <when value="yes">
168 <param argument="--nsampBurnMCMC" type="integer" value="-1" label="Number of samplings (iterations) in the burning phase of mcmc (Set -1 for a fourth of total number of samples)" />
169 <param argument="--T0BurnMCMC" type="float" value="100" label="Initial temperature in the burning phase of MCMC" min="1"/>
170 </when>
171 </conditional>
172 </xml>
173 <xml name="macro_scaleprior">
174 <param argument="--scalePrior" type="float" value="0.3" label="Scale of the truncnorm used in the prior for the correlation."/>
175 </xml>
176 <token name="@REQUIRED_INPUTS_1D@" ><![CDATA[
177 #if str( $input_counts.filetype ) == "tabular":
178 --input '$input_counts.input'
179 #elif str( $input_counts.filetype ) == "anndata":
180 --inputAnnData '$input_counts.inputAnnData'
181 #end if
182 --geneColName '$geneColName'
183 ]]></token>
184 <token name="@REQUIRED_INPUTS_2D@" ><![CDATA[
185 #if str( $input_counts.filetype ) == "tabular":
186 --input '$input_counts.input'
187 #elif str( $input_counts.filetype ) == "anndata":
188 --inputAnnData '$input_counts.inputAnnData'
189 #end if
190 --geneXColName '$geneXColName'
191 --geneYColName '$geneYColName'
192 ]]></token>
193 <token name="@FILTER_CELLS@" ><![CDATA[
194 #if str( $filter.nb ) == "1":
195 --metadata1ColName '$filter.metadata1ColName'
196 --metadata1Values '$filter.metadata1Values'
197 #elif str( $filter.nb ) == "2":
198 --metadata1ColName '$filter.metadata1ColName'
199 --metadata1Values '$filter.metadata1Values'
200 --metadata2ColName '$filter.metadata2ColName'
201 --metadata2Values '$filter.metadata2Values'
202 #elif str( $filter.nb ) == "3":
203 --metadata1ColName '$filter.metadata1ColName'
204 --metadata1Values '$filter.metadata1Values'
205 --metadata2ColName '$filter.metadata2ColName'
206 --metadata2Values '$filter.metadata2Values'
207 --metadata3ColName '$filter.metadata3ColName'
208 --metadata3Values '$filter.metadata3Values'
209 #end if
210 ]]></token>
211 <token name="@MCMC_1D@" ><![CDATA[
212 --xmin $MCMC.xmin
213 --xmax $MCMC.xmax
214 --xscale '$MCMC.scale.type'
215 #if str( $MCMC.scale.type ) == "Seurat":
216 --targetSum $MCMC.scale.targetSum
217 #end if
218 --nx $MCMC.nx
219 --minScale $MCMC.minScalex
220 --seed $MCMC.seed
221 ]]></token>
222 <token name="@MCMC_2D@" ><![CDATA[
223 --xmin $MCMC.xmin
224 --xmax $MCMC.xmax
225 --nx $MCMC.nx
226 --minScalex $MCMC.minScalex
227 --ymin $MCMC.ymin
228 --ymax $MCMC.ymax
229 --ny $MCMC.ny
230 --minScaley $MCMC.minScaley
231 --scale '$MCMC.scale.type'
232 #if str( $MCMC.scale.type ) == "Seurat":
233 --targetSum $MCMC.scale.targetSum
234 #end if
235 --seed $MCMC.seed
236 ]]></token>
237 <token name="@BAREDSC_COMMON@" ><![CDATA[
238 --nnorm $MCMC.nnorm
239 --nsampMCMC $MCMC.nsampMCMC
240 #if str( $MCMC.automaticRestart.set_minNeff ) == "yes":
241 --minNeff $MCMC.automaticRestart.minNeff
242 #end if
243 ]]></token>
244 <token name="@PLOTS@" ><![CDATA[
245 #if str( $plots.title ) != '':
246 --title '$plots.title'
247 #end if
248 #if $plots.removeFirstSamples != -1:
249 --removeFirstSamples $plots.removeFirstSamples
250 #end if
251 --nsampInPlot $plots.nsampInPlot
252 ]]></token>
253 <token name="@PRETTYBINS_1D@" ><![CDATA[
254 #if $plots.prettyBins != -1:
255 --prettyBins $plots.prettyBins
256 #end if
257 ]]></token>
258 <token name="@PRETTYBINS_SPLITY_COLORSCALE_2D@" ><![CDATA[
259 #if $plots.prettyBinsx != -1:
260 --prettyBinsx $plots.prettyBinsx
261 #end if
262 #if $plots.prettyBinsy != -1:
263 --prettyBinsy $plots.prettyBinsy
264 #end if
265 ## splity is space separated floats
266 #if str($plots.splity) != '':
267 --splity $plots.splity
268 #end if
269 #if str($plots.log1pColorScale) != '':
270 '$plots.log1pColorScale'
271 #end if
272 ]]></token>
273 <token name="@ADVANCED_COMMON_X@" ><![CDATA[
274 --osampx $advanced.osampx
275 --osampxpdf $advanced.osampxpdf
276 --coviscale $advanced.coviscale
277 --nis $advanced.nis
278 ]]></token>
279 <token name="@ADVANCED_COMMON_COMPLEMENT_2D@" ><![CDATA[
280 --osampy $advanced.osampy
281 --osampypdf $advanced.osampypdf
282 --scalePrior $advanced.scalePrior
283 ]]></token>
284 <token name="@ADVANCED_BAREDSC_COMMON@" ><![CDATA[
285 #if str( $advanced.burn.custom ) == "yes":
286 #if str( $advanced.burn.nsampBurnMCMC ) != "-1":
287 --nsampBurnMCMC $advanced.burn.nsampBurnMCMC
288 #end if
289 --T0BurnMCMC $advanced.burn.T0BurnMCMC
290 #end if
291 ]]></token>
292 <token name="@COMBINE_OUTPUTS@"><![CDATA[
293 --outputs
294 #for $i, $output in enumerate($MCMC.outputs):
295 $i
296 #end for
297 ]]></token>
298 <token name="@ORDER_OUTPUTS_1D@"><![CDATA[
299 mv baredSC_pdf.txt output &&
300 mv baredSC.$plots.image_file_format baredSC &&
301 gunzip baredSC_means.txt.gz
302 ]]></token>
303 <token name="@ORDER_OUTPUTS_2D@"><![CDATA[
304 mv baredSC_pdf2d.txt output &&
305 mv baredSC_pdf2d_flat.txt output &&
306 mv baredSC.$plots.image_file_format baredSC
307 #if str($plots.splity) != '':
308 #for $value in str($plots.splity).split(' '):
309 && mv baredSC_split'$value'.txt baredSC_split'$value'_pdf.txt
310 #end for
311 #end if
312 ]]></token>
313 </macros>