comparison inspect.xml @ 0:5d2e17328afe draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/scanpy/ commit 92f85afaed0097d1879317a9f513093fce5481d6
author iuc
date Mon, 04 Mar 2019 10:15:38 -0500
parents
children a755eaa1cc32
comparison
equal deleted inserted replaced
-1:000000000000 0:5d2e17328afe
1 <tool id="scanpy_inspect" name="Inspect with scanpy" version="@galaxy_version@">
2 <description></description>
3 <macros>
4 <import>macros.xml</import>
5 </macros>
6 <expand macro="requirements"/>
7 <expand macro="version_command"/>
8 <command detect_errors="exit_code"><![CDATA[
9 @CMD@
10 ]]></command>
11 <configfiles>
12 <configfile name="script_file"><![CDATA[
13 @CMD_imports@
14 @CMD_read_inputs@
15
16 #if $method.method == "tl.paga"
17 sc.tl.paga(
18 adata=adata,
19 groups='$method.groups',
20 use_rna_velocity =$method.use_rna_velocity,
21 model='$method.model',
22 copy=False)
23 #elif $method.method == "tl.dpt"
24 sc.tl.dpt(
25 adata=adata,
26 n_dcs=$method.n_dcs,
27 n_branchings=$method.n_branchings,
28 min_group_size=$method.min_group_size,
29 allow_kendall_tau_shift=$method.allow_kendall_tau_shift,
30 copy=False)
31 adata.obs.to_csv('$obs', sep='\t')
32 #end if
33
34 @CMD_anndata_write_outputs@
35 ]]></configfile>
36 </configfiles>
37 <inputs>
38 <expand macro="inputs_anndata"/>
39 <conditional name="method">
40 <param argument="method" type="select" label="Method used for plotting">
41 <!--<option value="tl.paga_compare_paths">, using `tl.paga_compare_paths`</option>!-->
42 <!--<option value="tl.paga_degrees">, using `tl.paga_degrees`</option>!-->
43 <!--<option value="tl.paga_expression_entropies">, using `tl.paga_expression_entropies`</option>!-->
44 <option value="tl.paga">Generate cellular maps of differentiation manifolds with complex topologies, using `tl.paga`</option>
45 <option value="tl.dpt">Infer progression of cells through geodesic distance along the graph, using `tl.dpt`</option>
46 </param>
47 <when value="tl.paga">
48 <param argument="groups" type="text" value="louvain" label="Key for categorical in the input" help="You can pass your predefined groups by choosing any categorical annotation of observations (`adata.obs`)."/>
49 <param argument="use_rna_velocity" type="boolean" truevalue="False" falsevalue="False" checked="false" label="Use RNA velocity to orient edges in the abstracted graph and estimate transitions?" help="Requires that `adata.uns` contains a directed single-cell graph with key `['velocyto_transitions']`. This feature might be subject to change in the future."/>
50 <param argument="model" type="select" label="PAGA connectivity model" help="">
51 <option value="v1.2">v1.2</option>
52 <option value="v1.0">v1.0</option>
53 </param>
54 </when>
55 <when value="tl.dpt">
56 <param argument="n_dcs" type="integer" min="0" value="10" label="Number of diffusion components to use" help=""/>
57 <param argument="n_branchings" type="integer" min="0" value="0" label="Number of branchings to detect" help=""/>
58 <param argument="min_group_size" type="float" min="0" value="0.01" label="Min group size" help="During recursive splitting of branches ('dpt groups') for `n_branchings` &gt; 1, do not consider groups that contain less than `min_group_size` data points. If a float, `min_group_size` refers to a fraction of the total number of data points."/>
59 <param argument="allow_kendall_tau_shift" type="boolean" truevalue="True" falsevalue="False" checked="true" label="Allow Kendal tau shift?" help="If a very small branch is detected upon splitting, shift away from maximum correlation in Kendall tau criterion of Haghverdi et al (2016) to stabilize the splitting."/>
60 </when>
61 </conditional>
62 <expand macro="anndata_output_format"/>
63 </inputs>
64 <outputs>
65 <expand macro="anndata_outputs"/>
66 <data name="obs" format="tabular" label="${tool.name} on ${on_string}: Observations annotation">
67 <filter>method['method'] == 'tl.dpt'</filter>
68 </data>
69 </outputs>
70 <tests>
71 <test>
72 <conditional name="input">
73 <param name="format" value="h5ad" />
74 <param name="adata" value="pp.neighbors_gauss_braycurtis.recipe_weinreb17.paul15_subsample.h5ad" />
75 </conditional>
76 <conditional name="method">
77 <param name="method" value="tl.paga"/>
78 <param name="groups" value="paul15_clusters"/>
79 <param name="use_rna_velocity" value="False"/>
80 <param name="model" value="v1.2"/>
81 </conditional>
82 <param name="anndata_output_format" value="h5ad" />
83 <assert_stdout>
84 <has_text_matching expression="sc.tl.paga"/>
85 <has_text_matching expression="groups='paul15_clusters'"/>
86 <has_text_matching expression="use_rna_velocity =False"/>
87 <has_text_matching expression="model='v1.2'"/>
88 </assert_stdout>
89 <output name="anndata_out_h5ad" file="tl.paga.neighbors_gauss_braycurtis.recipe_weinreb17.paul15_subsample.h5ad" ftype="h5" compare="sim_size">
90 <assert_contents>
91 <has_h5_keys keys="X, obs, obsm, uns, var" />
92 </assert_contents>
93 </output>
94 </test>
95 <test>
96 <conditional name="input">
97 <param name="format" value="h5ad" />
98 <param name="adata" value="tl.diffmap.neighbors_gauss_braycurtis.recipe_weinreb17.paul15_subsample.h5ad" />
99 </conditional>
100 <conditional name="method">
101 <param name="method" value="tl.dpt"/>
102 <param name="n_dcs" value="15"/>
103 <param name="n_branchings" value="1"/>
104 <param name="min_group_size" value="0.01"/>
105 <param name="allow_kendall_tau_shift" value="True"/>
106 </conditional>
107 <param name="anndata_output_format" value="h5ad" />
108 <assert_stdout>
109 <has_text_matching expression="sc.tl.dpt"/>
110 <has_text_matching expression="n_dcs=15"/>
111 <has_text_matching expression="n_branchings=1"/>
112 <has_text_matching expression="min_group_size=0.01"/>
113 <has_text_matching expression="allow_kendall_tau_shift=True"/>
114 </assert_stdout>
115 <output name="anndata_out_h5ad" file="tl.dpt.diffmap.neighbors_gauss_braycurtis.recipe_weinreb17.paul15_subsample.h5ad" ftype="h5" compare="sim_size">
116 <assert_contents>
117 <has_h5_keys keys="X, obs, obsm, uns, var" />
118 </assert_contents>
119 </output>
120 <output name="obs" file="tl.dpt.diffmap.neighbors_gauss_braycurtis.recipe_weinreb17.paul15_subsample.obs.tabular" compare="sim_size"/>
121 </test>
122 </tests>
123 <help><![CDATA[
124 Generate cellular maps of differentiation manifolds with complex topologies (`tl.paga`)
125 =======================================================================================
126
127 By quantifying the connectivity of partitions (groups, clusters) of the
128 single-cell graph, partition-based graph abstraction (PAGA) generates a much
129 simpler abstracted graph (*PAGA graph*) of partitions, in which edge weights
130 represent confidence in the presence of connections. By tresholding this
131 confidence in `paga`, a much simpler representation of data
132 can be obtained.
133
134 The confidence can be interpreted as the ratio of the actual versus the
135 expected value of connetions under the null model of randomly connecting
136 partitions. We do not provide a p-value as this null model does not
137 precisely capture what one would consider "connected" in real data, hence it
138 strongly overestimates the expected value. See an extensive discussion of
139 this in Wolf et al (2017).
140
141 Together with a random walk-based distance measure, this generates a partial
142 coordinatization of data useful for exploring and explaining its variation.
143
144 More details on the `tl.paga scanpy documentation
145 <https://scanpy.readthedocs.io/en/latest/api/scanpy.api.tl.paga.html#scanpy.api.tl.paga>`_
146
147
148 Infer progression of cells through geodesic distance along the graph (`tl.dpt`)
149 ===============================================================================
150
151 Reconstruct the progression of a biological process from snapshot
152 data. `Diffusion Pseudotime` has been introduced by Haghverdi et al (2016) and
153 implemented within Scanpy (Wolf et al, 2017). Here, we use a further developed
154 version, which is able to deal with disconnected graphs (Wolf et al, 2017) and can
155 be run in a `hierarchical` mode by setting the parameter
156 `n_branchings>1`. We recommend, however, to only use
157 `tl.dpt` for computing pseudotime (`n_branchings=0`) and
158 to detect branchings via `paga`. For pseudotime, you need
159 to annotate your data with a root cell.
160
161 This requires to run `pp.neighbors`, first. In order to
162 reproduce the original implementation of DPT, use `method=='gauss'` in
163 this. Using the default `method=='umap'` only leads to minor quantitative
164 differences, though.
165
166
167 If `n_branchings==0`, no field `dpt_groups` will be written.
168
169 - dpt_pseudotime : Array of dim (number of samples) that stores the pseudotime of each cell, that is, the DPT distance with respect to the root cell.
170 - dpt_groups : Array of dim (number of samples) that stores the subgroup id ('0','1', ...) for each cell. The groups typically correspond to 'progenitor cells', 'undecided cells' or 'branches' of a process.
171
172 The tool is similar to the R package `destiny` of Angerer et al (2016).
173
174 More details on the `tl.dpt scanpy documentation
175 <https://scanpy.readthedocs.io/en/latest/api/scanpy.api.tl.dpt.html#scanpy.api.tl.dpt>`_
176
177 ]]></help>
178 <expand macro="citations"/>
179 </tool>