diff cluster_reduce_dimension.xml @ 1:20cfb9f3dded draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/scanpy/ commit 8ef5f7c6f8728608a3f05bb51e11b642b84a05f5"
author iuc
date Wed, 16 Oct 2019 06:29:43 -0400
parents 0e212e42ef88
children dc2de14881ba
line wrap: on
line diff
--- a/cluster_reduce_dimension.xml	Mon Mar 04 10:13:44 2019 -0500
+++ b/cluster_reduce_dimension.xml	Wed Oct 16 06:29:43 2019 -0400
@@ -1,32 +1,46 @@
-<tool id="scanpy_cluster_reduce_dimension" name="Cluster and reduce dimension with scanpy" version="@galaxy_version@">
-    <description></description>
+<tool id="scanpy_cluster_reduce_dimension" name="Cluster," version="@galaxy_version@">
+    <description>infer trajectories and embed with scanpy</description>
     <macros>
         <import>macros.xml</import>
         <xml name="pca_inputs">
-            <param name="n_comps" type="integer" min="0" value="50" label="Number of principal components to compute" help=""/>
-            <param name="dtype" type="text" value="float32" label="Numpy data type string to which to convert the result" help=""/>
+            <param argument="n_comps" type="integer" min="0" value="50" label="Number of principal components to compute" help=""/>
+            <param argument="dtype" type="text" value="float32" label="Numpy data type string to which to convert the result" help=""/>
             <conditional name="pca">
-                <param name="chunked" type="select" label="Type of PCA?">
+                <param argument="chunked" type="select" label="Type of PCA?">
                     <option value="True">Incremental PCA on segments (incremental PCA automatically zero centers and ignores settings of `random_seed` and `svd_solver`)</option>
                     <option value="False" selected="true">Full PCA</option>
                 </param>
                 <when value="True">
-                    <param name="chunk_size" type="integer" min="0" value="" label="chunk_size" help="Number of observations to include in each chunk"/>
+                    <param argument="chunk_size" type="integer" min="0" value="" label="chunk_size" help="Number of observations to include in each chunk"/>
                 </when>
                 <when value="False">
-                    <param name="zero_center" type="boolean" truevalue="True" falsevalue="False" checked="true"
+                    <param argument="zero_center" type="boolean" truevalue="True" falsevalue="False" checked="true"
                         label="Compute standard PCA from covariance matrix?"
                         help="If not, it omits zero-centering variables (uses *TruncatedSVD* from scikit-learn), which allows to handle sparse input efficiently."/>
                     <expand macro="svd_solver"/> 
-                    <param name="random_state" type="integer" value="0" label="Initial states for the optimization" help=""/>
+                    <param argument="random_state" type="integer" value="0" label="Initial states for the optimization" help=""/>
                 </when>
             </conditional>
+            <param argument="use_highly_variable" type="boolean" truevalue="True" falsevalue="False" checked="false" label="Use highly variable genes only?" help="They should be use if they have been determined beforehand."/>
         </xml>
-        <token name="@CMD_pca_outputs@"><![CDATA[
-np.savetxt('$X_pca', adata.obsm['X_pca'], delimiter='\t')
-np.savetxt('$PCs', adata.varm['PCs'], delimiter='\t')
-np.savetxt('$variance', adata.uns['pca']['variance'], delimiter='\t')
-np.savetxt('$variance_ratio', adata.uns['pca']['variance_ratio'], delimiter='\t')
+        <xml name="param_random_state">
+            <param argument="random_state" type="integer" value="0" label="Random state" help="Change the initialization of the optimization."/>
+        </xml>
+        <xml name="param_use_weights">
+            <param argument="use_weights" type="boolean" truevalue="True" falsevalue="False" checked="false" label="Use weights from knn graph?"/>
+        </xml>
+        <token name="@CMD_pca_help@"><![CDATA[
+The PCA is computed using the implementation of *scikit-learn*.
+
+The returned AnnData object contains:
+
+- PCA coordinates in the multi-dimensional observation annotation (obsm)
+- Principal components containing the loadings in the multi-dimensional variable annotation (varm)
+- The variance decomposition in the unstructured annotation (uns)
+    - Ratio of explained variance for PCA (variance)
+    - Explained variance, equivalent to the eigenvalues of the covariance matrix
+
+This data is accessible using the inspect tool for AnnData
 ]]></token>
         <token name="@CMD_pca_params@"><![CDATA[
     data=adata,
@@ -35,41 +49,14 @@
     copy=False,
     chunked=$method.pca.chunked,
 #if $method.pca.chunked == 'True'
-    chunk_size=$method.pca.chunk_size
+    chunk_size=$method.pca.chunk_size,
 #else
-    zero_center='$method.pca.zero_center',
+    zero_center=$method.pca.zero_center,
     svd_solver='$method.pca.svd_solver',
-    random_state=$method.pca.random_state
+    random_state=$method.pca.random_state,
 #end if
+    use_highly_variable=$method.use_highly_variable
 ]]></token>
-        <xml name="penalty">
-            <param argument="penalty" type="select" label="Norm used in the penalization" help="">
-                <option value="l1">l1</option>
-                <option value="l2">l2</option>
-                <option value="customized">customized</option>
-            </param>
-        </xml>
-        <xml name="custom_penalty">
-            <param argument="pen" type="text" value="" label="Norm used in the penalization" help=""/>
-        </xml>
-        <xml name="fit_intercept">
-            <param argument="fit_intercept" type="boolean" truevalue="True" falsevalue="False" checked="true"
-                label="Should a constant (a.k.a. bias or intercept) be added to the decision function?" help=""/>
-        </xml>
-        <xml name="random_state">
-            <param argument="random_state" type="integer" value="" optional="true"
-                label="The seed of the pseudo random number generator to use when shuffling the data" help=""/>
-        </xml>
-        <xml name="max_iter">
-            <param argument="max_iter" type="integer" min="0" value="100" label="Maximum number of iterations taken for the solvers to converge" help=""/>
-        </xml>
-        <xml name="multi_class">
-            <param argument="multi_class" type="select" label="Multi class" help="">
-                <option value="ovr">ovr: a binary problem is fit for each label</option>
-                <option value="multinomial">multinomial: the multinomial loss fit across the entire probability distribution, even when the data is binary</option>
-                <option value="auto">auto: selects ‘ovr’ if the data is binary and otherwise selects ‘multinomial’</option>
-            </param>
-        </xml>
     </macros>
     <expand macro="requirements"/>
     <expand macro="version_command"/>
@@ -90,20 +77,33 @@
     #end if
     random_state=$method.random_state,
     key_added='$method.key_added',
+    directed=$method.directed,
+    use_weights=$method.use_weights,
     copy=False)
-#elif $method.method == 'pp.pca'
+
+#else if $method.method == 'tl.leiden'
+sc.tl.leiden(
+    adata=adata,
+    resolution=$method.resolution,
+    random_state=$method.random_state,
+    key_added='$method.key_added',
+    use_weights=$method.use_weights,
+    n_iterations=$method.n_iterations,
+    copy=False)
+
+#else if $method.method == 'pp.pca'
 sc.pp.pca(@CMD_pca_params@)
-@CMD_pca_outputs@
-#elif $method.method == 'tl.pca'
+
+#else if $method.method == 'tl.pca'
 sc.tl.pca(@CMD_pca_params@)
-@CMD_pca_outputs@
-#elif $method.method == 'tl.diffmap'
+
+#else if $method.method == 'tl.diffmap'
 sc.tl.diffmap(
     adata=adata,
     n_comps=$method.n_comps,
     copy =False)
-np.savetxt('$X_diffmap', adata.obsm['X_diffmap'], delimiter='\t')
-#elif $method.method == 'tl.tsne'
+
+#else if $method.method == 'tl.tsne'
 sc.tl.tsne(
     adata=adata,
     #if $method.n_pcs
@@ -113,9 +113,10 @@
     early_exaggeration=$method.early_exaggeration,
     learning_rate=$method.learning_rate,
     random_state=$method.random_state,
+    use_fast_tsne=$method.use_fast_tsne,
     copy=False)
-np.savetxt('$X_tsne', adata.obsm['X_tsne'], delimiter='\t') 
-#elif $method.method == 'tl.umap'
+
+#else if $method.method == 'tl.umap'
 sc.tl.umap(
     adata=adata,
     min_dist=$method.min_dist,
@@ -130,88 +131,49 @@
     init_pos='$method.init_pos',
     random_state=$method.random_state,
     copy=False)
-np.savetxt('$X_umap', adata.obsm['X_umap'], delimiter='\t')
-#elif $method.method == 'pp.neighbors'
-sc.pp.neighbors(
+
+#else if $method.method == 'tl.draw_graph'
+
+    #if str($method.adjacency) != 'None'
+from scipy import io
+adjacency = io.mmread('$method.adjacency')
+    #end if
+
+sc.tl.draw_graph(
     adata=adata,
-    n_neighbors=$method.n_neighbors,
-    #if $method.n_pcs
-    n_pcs=$method.n_pcs,
-    #end if
-    knn=$method.knn,
+    layout='$method.layout',
+#if str($method.root) != ''
+    #set $root=([int(x.strip()) for x in str($method.root).split(',')])
+    root=$root,
+#end if
     random_state=$method.random_state,
-    method='$method.pp_neighbors_method',
-    metric='$method.metric',
-    copy=False)
-#elif $method.method == 'tl.rank_genes_groups'
-sc.tl.rank_genes_groups(
-    adata=adata,
-    groupby='$method.groupby',
-    use_raw=$method.use_raw,
-    #if str($method.groups) != ''
-    groups='$method.groups',
+    #if str($method.init_pos) != ''
+    init_pos='$method.init_pos',
     #end if
-    #if $method.ref.rest == 'rest'
-    reference='$method.ref.rest',
-    #else
-    reference='$method.ref.reference',
+    #if str($method.adjacency) != 'None'
+    adjacency=adjacency,
     #end if
-    n_genes=$method.n_genes,
-    method='$method.tl_rank_genes_groups_method.method',
-    #if $method.tl_rank_genes_groups_method.method == 'logreg'
-    solver='$method.tl_rank_genes_groups_method.solver.solver',
-        #if $method.tl_rank_genes_groups_method.solver.solver == 'newton-cg'
-    penalty='l2',
-    fit_intercept=$method.tl_rank_genes_groups_method.solver.fit_intercept,
-    max_iter=$method.tl_rank_genes_groups_method.solver.max_iter,
-    multi_class='$method.tl_rank_genes_groups_method.solver.multi_class',
-        #else if $method.tl_rank_genes_groups_method.solver.solver == 'lbfgs'
-    penalty='l2',
-    fit_intercept=$method.tl_rank_genes_groups_method.solver.fit_intercept,
-    max_iter=$method.tl_rank_genes_groups_method.solver.max_iter,
-    multi_class='$method.tl_rank_genes_groups_method.solver.multi_class',
-        #else if $method.tl_rank_genes_groups_method.solver.solver == 'liblinear'
-            #if $method.tl_rank_genes_groups_method.solver.penalty.penalty == 'l1'
-    penalty='l1',
-            #else if $method.tl_rank_genes_groups_method.solver.penalty.penalty == 'l2'
-    penalty='l2',
-    dual=$method.tl_rank_genes_groups_method.solver.penalty.dual,
-            #else
-    penalty='$method.tl_rank_genes_groups_method.solver.penalty.pen',
-            #end if
-    fit_intercept=$method.tl_rank_genes_groups_method.solver.intercept_scaling.fit_intercept,
-            #if $method.tl_rank_genes_groups_method.solver.intercept_scaling.fit_intercept == 'True'
-    intercept_scaling=$method.tl_rank_genes_groups_method.solver.intercept_scaling.intercept_scaling,
-            #end if
-            #if $method.tl_rank_genes_groups_method.solver.random_state
-    random_state=$method.tl_rank_genes_groups_method.solver.random_state,
-            #end if
-        #else if $method.tl_rank_genes_groups_method.solver.solver == 'sag'
-    penalty='l2',
-    fit_intercept=$method.tl_rank_genes_groups_method.solver.fit_intercept,
-            #if $method.tl_rank_genes_groups_method.solver.random_state
-    random_state=$method.tl_rank_genes_groups_method.solver.random_state,
-            #end if
-    max_iter=$method.tl_rank_genes_groups_method.solver.max_iter,
-    multi_class='$method.tl_rank_genes_groups_method.solver.multi_class',
-        #else if $method.tl_rank_genes_groups_method.solver.solver == 'saga'
-            #if $method.tl_rank_genes_groups_method.solver.penalty.penalty == 'l1'
-    penalty='l1',
-            #else if $method.tl_rank_genes_groups_method.solver.penalty.penalty == 'l2'
-    penalty='l2',
-            #else
-    penalty='$method.tl_rank_genes_groups_method.solver.penalty.pen',
-            #end if
-    fit_intercept=$method.tl_rank_genes_groups_method.solver.fit_intercept,
-    multi_class='$method.tl_rank_genes_groups_method.solver.multi_class',
-        #end if
-    tol=$method.tl_rank_genes_groups_method.tol,
-    C=$method.tl_rank_genes_groups_method.c,
+    #if str($method.key_ext) != ''
+    key_ext='$method.key_ext',
     #end if
-    only_positive=$method.only_positive)
-pd.options.display.precision = 15
-pd.DataFrame(adata.uns['rank_genes_groups']['names']).to_csv("$names", sep="\t", index = False)
-pd.DataFrame(adata.uns['rank_genes_groups']['scores']).to_csv("$scores", sep="\t", index = False)
+    copy=False)
+
+#else if $method.method == "tl.paga"
+sc.tl.paga(
+    adata=adata,
+    groups='$method.groups',
+    use_rna_velocity=$method.use_rna_velocity,
+    model='$method.model',
+    copy=False)
+
+#else if $method.method == "tl.dpt"
+sc.tl.dpt(
+    adata=adata,
+    n_dcs=$method.n_dcs,
+    n_branchings=$method.n_branchings,
+    min_group_size=$method.min_group_size,
+    allow_kendall_tau_shift=$method.allow_kendall_tau_shift,
+    copy=False)
 #end if
 
 @CMD_anndata_write_outputs@
@@ -221,16 +183,16 @@
         <expand macro="inputs_anndata"/>
         <conditional name="method">
             <param argument="method" type="select" label="Method used for plotting">
-                <!--<option value="tl.leiden">, using `tl.leiden`</option>!-->
                 <option value="tl.louvain">Cluster cells into subgroups, using `tl.louvain`</option>
+                <option value="tl.leiden">Cluster cells into subgroups, using `tl.leiden`</option>
                 <option value="pp.pca">Computes PCA (principal component analysis) coordinates, loadings and variance decomposition, using `pp.pca`</option>
                 <option value="tl.pca">Computes PCA (principal component analysis) coordinates, loadings and variance decomposition, using `tl.pca`</option>
                 <option value="tl.diffmap">Diffusion Maps, using `tl.diffmap`</option>
                 <option value="tl.tsne">t-distributed stochastic neighborhood embedding (tSNE), using `tl.tsne`</option>
                 <option value="tl.umap">Embed the neighborhood graph using UMAP, using `tl.umap`</option>
-                <!--<option value="tl.phate">, using `tl.phate`</option>!-->
-                <option value="pp.neighbors">Compute a neighborhood graph of observations, using `pp.neighbors`</option>
-                <option value="tl.rank_genes_groups">Rank genes for characterizing groups, using `tl.rank_genes_groups`</option>
+                <option value="tl.draw_graph">Force-directed graph drawing, using `tl.draw_graph`</option>
+                <option value="tl.dpt">Infer progression of cells through geodesic distance along the graph, using `tl.dpt`</option>
+                <option value="tl.paga">Generate cellular maps of differentiation manifolds with complex topologies, using `tl.paga`</option>
             </param>
             <when value="tl.louvain">
                 <conditional name="flavor">
@@ -245,8 +207,17 @@
                     </when>
                     <when value="igraph"/>
                 </conditional>
-                <param argument="random_state" type="integer" value="0" label="Random state" help="Change the initialization of the optimization."/>
+                <expand macro="param_random_state"/>
                 <param argument="key_added" type="text" value="louvain" optional="true" label="Key under which to add the cluster labels" help=""/>
+                <param argument="directed" type="boolean" truevalue="True" falsevalue="False" checked="true" label="Interpret the adjacency matrix as directed graph?"/>
+                <expand macro="param_use_weights"/>
+            </when>
+            <when value="tl.leiden">
+                <param argument="resolution" type="float" value="1" label="Coarseness of the clusterin" help="Higher values lead to more clusters"/>
+                <expand macro="param_random_state"/>
+                <param argument="key_added" type="text" value="leiden" label="Key under which to add the cluster labels" help=""/>
+                <expand macro="param_use_weights"/>
+                <param argument="n_iterations" type="integer" value="-1" label="How many iterations of the Leiden clustering algorithm to perform." help="Positive values above 2 define the total number of iterations to perform, -1 has the algorithm run until it reaches its optimal clustering."/>
             </when>
             <when value="pp.pca">
                 <expand macro="pca_inputs"/>
@@ -263,6 +234,7 @@
                 <param name="early_exaggeration" type="float" value="12.0" label="Early exaggeration" help="Controls how tight natural clusters in the original space are in the embedded space and how much space will be between them. For larger values, the space between natural clusters will be larger in the embedded space. Again, the choice of this parameter is not very critical. If the cost function increases during initial optimization, the early exaggeration factor or the learning rate might be too high."/>
                 <param name="learning_rate" type="float" value="1000" label="Learning rate" help="The learning rate can be a critical parameter. It should be between 100 and 1000. If the cost function increases during initial optimization, the early exaggeration factor or the learning rate might be too high. If the cost function gets stuck in a bad local minimum increasing the learning rate helps sometimes."/>
                 <param name="random_state" type="integer" value="0" label="Random state" help="Change this to use different intial states for the optimization"/>
+                <param argument="use_fast_tsne" type="boolean" truevalue="True" falsevalue="False" checked="true" label="Use the MulticoreTSNE package if possible?"/>
             </when>
             <when value="tl.umap">
                 <param argument="min_dist" type="float" value="0.5" label="Effective minimum distance between embedded points" help="Smaller values will result in a more clustered/clumped embedding where nearby points on the manifold are drawn closer together, while larger values will result on a more even dispersal of points. The value should be set relative to the `spread` value, which determines the scale at which embedded points will be spread out. The default of in the `umap-learn` package is 0.1."/>
@@ -277,158 +249,39 @@
                     <option value="spectral" selected="true">Spectral embedding of the graph</option>
                     <option value="random">Initial embedding positions at random</option>
                 </param>
-                <param argument="random_state" type="integer" value="0" label="Random state" help="Change this to use different intial states for the optimization"/>
+                <expand macro="param_random_state"/>
+            </when>
+            <when value="tl.draw_graph">
+                <expand macro="param_layout"/>
+                <expand macro="param_root"/>
+                <expand macro="param_random_state"/>
+                <param argument="init_pos" type="text" optional="true" value="" label="Precomputed coordinates for initialization" help="It should be a valid 2d observation (e.g. paga)"/>
+                <param argument="adjacency" type="data" format="mtx" optional="true" label="Sparse adjacency matrix of the graph" help="If not set, it uses the unstructured annotation (uns) / neighbors / connectivities"/>
+                <param argument="key_ext" type="text" optional="true" value="" label="External key" help="If not set, it appends `layout`"/>
             </when>
-            <when value="pp.neighbors">
-                <param argument="n_neighbors" type="integer" min="0" value="15" label="The size of local neighborhood (in terms of number of neighboring data points) used for manifold approximation" help="Larger values result in more global views of the manifold, while smaller values result in more local data being preserved. In general values should be in the range 2 to 100. If `knn` is `True`, number of nearest neighbors to be searched. If `knn` is `False`, a Gaussian kernel width is set to the distance of the `n_neighbors` neighbor."/>
-                <param argument="n_pcs" type="integer" min="0" value="" optional="true" label="Number of PCs to use" help=""/>
-                <param argument="knn" type="boolean" truevalue="True" falsevalue="False" checked="true" label="Use a hard threshold to restrict the number of neighbors to n_neighbors?" help="If true, it considers a knn graph. Otherwise, it uses a Gaussian Kernel to assign low weights to neighbors more distant than the `n_neighbors` nearest neighbor."/>
-                <param argument="random_state" type="integer" value="0" label="Numpy random seed" help=""/>
-                <param name="pp_neighbors_method" argument="method" type="select" label="Method for computing connectivities" help="">
-                    <option value="umap">umap (McInnes et al, 2018)</option>
-                    <option value="gauss">gauss: Gauss kernel following (Coifman et al 2005) with adaptive width (Haghverdi et al 2016)</option>
-                </param>
-                <param argument="metric" type="select" label="Distance metric" help="">
-                    <expand macro="distance_metric_options"/>
+            <when value="tl.dpt">
+                <param argument="n_dcs" type="integer" min="0" value="10" label="Number of diffusion components to use" help=""/>
+                <param argument="n_branchings" type="integer" min="0" value="0" label="Number of branchings to detect" help=""/>
+                <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."/>
+                <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."/>
+            </when>
+            <when value="tl.paga">
+                <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`)."/>
+                <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."/>
+                <param argument="model" type="select" label="PAGA connectivity model" help="">
+                    <option value="v1.2">v1.2</option>
+                    <option value="v1.0">v1.0</option>
                 </param>
             </when>
-            <when value="tl.rank_genes_groups">
-                <param argument="groupby" type="text" value="" label="The key of the observations grouping to consider" help=""/>
-                <expand macro="param_use_raw"/>
-                <param argument="groups" type="text" value="" label="Subset of groups to which comparison shall be restricted" help="e.g. ['g1', 'g2', 'g3']. If not passed, a ranking will be generated for all groups."/>
-                <conditional name="ref">
-                    <param name="rest" type="select" label="Comparison">
-                        <option value="rest">Compare each group to the union of the rest of the group</option>
-                        <option value="group_id">Compare with respect to a specific group</option>
-                    </param>
-                    <when value="rest"/>
-                    <when value="group_id">
-                        <param argument="reference" type="text" value="" label="Group identifier with respect to which compare"/>
-                    </when>
-                </conditional>
-                <param argument="n_genes" type="integer" min="0" value="100" label="The number of genes that appear in the returned tables" help=""/>
-                <conditional name="tl_rank_genes_groups_method">
-                    <param argument="method" type="select" label="Method">
-                        <option value="t-test">t-test</option>
-                        <option value="wilcoxon">Wilcoxon-Rank-Sum</option>
-                        <option value="t-test_overestim_var" selected="true">t-test with overestimate of variance of each group</option>
-                        <option value="logreg">Logistic regression</option>
-                    </param>
-                    <when value="t-test"/>
-                    <when value="wilcoxon"/>
-                    <when value="t-test_overestim_var"/>
-                    <when value="logreg">
-                        <conditional name="solver">
-                            <param argument="solver" type="select" label="Algorithm to use in the optimization problem" help="For small datasets, ‘liblinear’ is a good choice, whereas ‘sag’ and ‘saga’ are faster for large ones. For multiclass problems, only ‘newton-cg’, ‘sag’, ‘saga’ and ‘lbfgs’ handle multinomial loss; ‘liblinear’ is limited to one-versus-rest schemes. ‘newton-cg’, ‘lbfgs’ and ‘sag’ only handle L2 penalty, whereas ‘liblinear’ and ‘saga’ handle L1 penalty.">
-                                <option value="newton-cg">newton-cg</option>
-                                <option value="lbfgs">lbfgs</option>
-                                <option value="liblinear">liblinear</option>
-                                <option value="sag">sag</option>
-                                <option value="saga">saga</option>
-                            </param>
-                            <when value="newton-cg">
-                                <expand macro="fit_intercept"/>
-                                <expand macro="max_iter"/>
-                                <expand macro="multi_class"/>
-                            </when>
-                            <when value="lbfgs">
-                                <expand macro="fit_intercept"/>
-                                <expand macro="max_iter"/>
-                                <expand macro="multi_class"/>
-                            </when>
-                            <when value="liblinear">
-                                <conditional name="penalty">
-                                    <expand macro="penalty"/>
-                                    <when value="l1"/>
-                                    <when value="l2">
-                                        <param argument="dual" type="boolean" truevalue="True" falsevalue="False" checked="false"
-                                            label="Dual (not primal) formulation?" help="Prefer primal when n_samples > n_features"/>
-                                    </when>
-                                    <when value="customized">
-                                        <expand macro="custom_penalty"/>
-                                    </when>
-                                </conditional>
-                                <conditional name="intercept_scaling">
-                                    <param argument="fit_intercept" type="select"
-                                        label="Should a constant (a.k.a. bias or intercept) be added to the decision function?" help="">
-                                        <option value="True">Yes</option>
-                                        <option value="False">No</option>
-                                    </param>
-                                    <when value="True">
-                                        <param argument="intercept_scaling" type="float" value="1.0"
-                                            label="Intercept scaling"
-                                            help="x becomes [x, self.intercept_scaling], i.e. a 'synthetic' feature with constant value equal to intercept_scaling is appended to the instance vector. The intercept becomes intercept_scaling * synthetic_feature_weight."/>
-                                    </when>
-                                    <when value="False"/>
-                                </conditional>
-                                <expand macro="random_state"/>
-                            </when>
-                            <when value="sag">
-                                <expand macro="fit_intercept"/>
-                                <expand macro="random_state"/>
-                                <expand macro="max_iter"/>
-                                <expand macro="multi_class"/>
-                            </when>
-                            <when value="saga">
-                                <conditional name="penalty">
-                                    <expand macro="penalty"/>
-                                    <when value="l1"/>
-                                    <when value="l2"/>
-                                    <when value="customized">
-                                        <expand macro="custom_penalty"/>
-                                    </when>
-                                </conditional>
-                                <expand macro="fit_intercept"/>
-                                <expand macro="multi_class"/>
-                            </when>
-                        </conditional>
-                        <param argument="tol" type="float" value="1e-4" label="Tolerance for stopping criteria" help=""/>
-                        <param argument="c" type="float" value="1.0" label="Inverse of regularization strength"
-                            help="It must be a positive float. Like in support vector machines, smaller values specify stronger regularization."/>
-                    </when>
-                </conditional>
-                <param argument="only_positive" type="boolean" truevalue="True" falsevalue="False" checked="true"
-                    label="Only consider positive differences?" help=""/>
-            </when>
-        </conditional>
-        <expand macro="anndata_output_format"/>
+        </conditional>            
     </inputs>
     <outputs>
         <expand macro="anndata_outputs"/>
-        <data name="X_pca" format="tabular" label="${tool.name} on ${on_string}: PCA representation of data">
-            <filter>method['method'] == 'pp.pca' or method['method'] == 'tl.pca'</filter>
-        </data>
-        <data name="PCs" format="tabular" label="${tool.name} on ${on_string}: Principal components containing the loadings">
-            <filter>method['method'] == 'pp.pca' or method['method'] == 'tl.pca'</filter>
-        </data>
-        <data name="variance_ratio" format="tabular" label="${tool.name} on ${on_string}: Ratio of explained variance">
-            <filter>method['method'] == 'pp.pca' or method['method'] == 'tl.pca'</filter>
-        </data>
-        <data name="variance" format="tabular" label="${tool.name} on ${on_string}: Explained variance, equivalent to the eigenvalues of the covariance matrix">
-            <filter>method['method'] == 'pp.pca' or method['method'] == 'tl.pca'</filter>
-        </data>
-        <data name="X_diffmap" format="tabular" label="${tool.name} on ${on_string}: Diffusion map representation">
-            <filter>method['method'] == 'tl.diffmap'</filter>
-        </data>
-        <data name="X_tsne" format="tabular" label="${tool.name} on ${on_string}: tSNE coordinates">
-            <filter>method['method'] == 'tl.tsne'</filter>
-        </data>
-        <data name="X_umap" format="tabular" label="${tool.name} on ${on_string}: UMAP coordinates">
-            <filter>method['method'] == 'tl.umap'</filter>
-        </data>
-        <data name="names" format="tabular" label="${tool.name} on ${on_string}: Gene names">
-            <filter>method['method'] == 'tl.rank_genes_groups'</filter>
-        </data>
-        <data name="scores" format="tabular" label="${tool.name} on ${on_string}: Scores">
-            <filter>method['method'] == 'tl.rank_genes_groups'</filter>
-        </data>
     </outputs>
     <tests>
-        <test expect_num_outputs="1">
-            <conditional name="input">
-                <param name="format" value="h5ad" />
-                <param name="adata" value="pp.neighbors_gauss_braycurtis.recipe_weinreb17.paul15_subsample.h5ad" />
-            </conditional>
+        <test>
+            <!-- test 1 -->
+            <param name="adata" value="pp.neighbors_gauss_braycurtis.recipe_weinreb17.paul15_subsample.h5ad" />
             <conditional name="method">
                 <param name="method" value="tl.louvain"/>
                 <conditional name="flavor">
@@ -437,8 +290,9 @@
                 </conditional>
                 <param name="random_state" value="10"/>
                 <param name="key_added" value="louvain"/>
+                <param name="directed" value="true"/>
+                <param name="use_weights" value="false"/>
             </conditional>
-            <param name="anndata_output_format" value="h5ad" />
             <assert_stdout>
                 <has_text_matching expression="sc.tl.louvain"/>
                 <has_text_matching expression="adata=adata"/>
@@ -446,70 +300,63 @@
                 <has_text_matching expression="resolution=1.0"/>
                 <has_text_matching expression="random_state=10"/>
                 <has_text_matching expression="key_added='louvain'"/>
+                <has_text_matching expression="directed=True"/>
+                <has_text_matching expression="use_weights=False"/>
             </assert_stdout>
-            <output name="anndata_out_h5ad" file="tl.louvain.neighbors_gauss_braycurtis.recipe_weinreb17.paul15_subsample.h5ad" ftype="h5" compare="sim_size"/>
+            <output name="anndata_out" file="tl.louvain.neighbors_gauss_braycurtis.recipe_weinreb17.paul15_subsample.h5ad" ftype="h5ad" compare="sim_size"/>
         </test>
-        <test expect_num_outputs="5">
-            <conditional name="input">
-                <param name="format" value="h5ad" />
-                <param name="adata" value="krumsiek11.h5ad" />
+        <test>
+            <!-- test 2 -->
+            <param name="adata" value="pp.neighbors_gauss_braycurtis.recipe_weinreb17.paul15_subsample.h5ad" />
+            <conditional name="method">
+                <param name="method" value="tl.leiden"/>
+                <param name="random_state" value="1"/>
+                <param name="random_state" value="10"/>
+                <param name="key_added" value="leiden"/>
+                <param name="use_weights" value="false"/>
+                <param name="n_iterations" value="-1"/>
             </conditional>
+            <assert_stdout>
+                <has_text_matching expression="sc.tl.leiden"/>
+                <has_text_matching expression="resolution=1"/>
+                <has_text_matching expression="random_state=10"/>
+                <has_text_matching expression="key_added='leiden'"/>
+                <has_text_matching expression="use_weights=False"/>
+                <has_text_matching expression="n_iterations=-1"/>
+            </assert_stdout>
+            <output name="anndata_out" file="tl.leiden.neighbors_gauss_braycurtis.recipe_weinreb17.paul15_subsample.h5ad" ftype="h5ad" compare="sim_size"/>
+        </test>
+        <test>
+            <!-- test 2 -->
+            <param name="adata" value="krumsiek11.h5ad" />
             <conditional name="method">
                 <param name="method" value="pp.pca"/>
                 <param name="n_comps" value="50"/>
                 <param name="dtype" value="float32"/>
                 <conditional name="pca">
                     <param name="chunked" value="False"/>
-                    <param name="zero_center" value="True"/>
+                    <param name="zero_center" value="true"/>
                     <param name="svd_solver" value="auto"/>
                     <param name="random_state" value="0"/>
                 </conditional>
+                <param name="use_highly_variable" value="false"/>
             </conditional>
-            <param name="anndata_output_format" value="h5ad" />
             <assert_stdout>
                 <has_text_matching expression="sc.pp.pca"/>
                 <has_text_matching expression="n_comps=50"/>
                 <has_text_matching expression="dtype='float32'"/>
                 <has_text_matching expression="copy=False"/>
                 <has_text_matching expression="chunked=False"/>
-                <has_text_matching expression="zero_center='True'"/>
+                <has_text_matching expression="zero_center=True"/>
                 <has_text_matching expression="svd_solver='auto'"/>
                 <has_text_matching expression="random_state=0"/>
+                <has_text_matching expression="use_highly_variable=False"/>
             </assert_stdout>
-            <output name="anndata_out_h5ad" file="pp.pca.krumsiek11.h5ad" ftype="h5" compare="sim_size"/>
-            <output name="X_pca">
-                <assert_contents>
-                    <has_text_matching expression="-2.579\d{15}e-01" />
-                    <has_text_matching expression="3.452\d{15}e-01" />
-                    <has_text_matching expression="-6.088\d{15}e-03" />
-                    <has_n_columns n="10" />
-                </assert_contents>
-            </output>
-            <output name="PCs">
-                <assert_contents>
-                    <has_text_matching expression="-2.285\d{15}e-01" />
-                    <has_text_matching expression="-3.042\d{15}e-01" />
-                    <has_text_matching expression="-2.863\d{15}e-02" />
-                    <has_text_matching expression="1.294\d{15}e-01" />
-                    <has_n_columns n="10" />
-                </assert_contents>
-            </output>
-            <output name="variance_ratio">
-                <assert_contents>
-                    <has_text_matching expression="2.148\d{15}e-01" />
-                    <has_text_matching expression="7.596\d{15}e-02" />
-                    <has_text_matching expression="5.033\d{15}e-03" />
-                    <has_text_matching expression="2.801\d{15}e-05" />
-                    <has_n_columns n="1" />
-                </assert_contents>
-            </output>
-            <output name="variance" file="pp.pca.variance.krumsiek11.tabular" />
+            <output name="anndata_out" file="pp.pca.krumsiek11.h5ad" ftype="h5ad" compare="sim_size"/>
         </test>
-        <test expect_num_outputs="5">
-            <conditional name="input">
-                <param name="format" value="h5ad" />
-                <param name="adata" value="krumsiek11.h5ad" />
-            </conditional>
+        <!--<test>
+            < test 3 >
+            <param name="adata" value="krumsiek11.h5ad" />
             <conditional name="method">
                 <param name="method" value="pp.pca"/>
                 <param name="n_comps" value="20"/>
@@ -518,8 +365,8 @@
                     <param name="chunked" value="True"/>
                     <param name="chunk_size" value="50"/>
                 </conditional>
+                <param name="use_highly_variable" value="false"/>
             </conditional>
-            <param name="anndata_output_format" value="h5ad" />
             <assert_stdout>
                 <has_text_matching expression="sc.pp.pca"/>
                 <has_text_matching expression="data=adata"/>
@@ -528,45 +375,14 @@
                 <has_text_matching expression="copy=False"/>
                 <has_text_matching expression="chunked=True"/>
                 <has_text_matching expression="chunk_size=50"/>
+                <has_text_matching expression="use_highly_variable=False"/>
             </assert_stdout>
-            <output name="anndata_out_h5ad" file="pp.pca.krumsiek11_chunk.h5ad" ftype="h5" compare="sim_size"/>
-            <output name="X_pca">
-                <assert_contents>
-                    <has_text_matching expression="1.290\d{15}e-03" />
-                    <has_text_matching expression="9.231\d{15}e-04" />
-                    <has_text_matching expression="-3.498\d{15}e-02" />
-                    <has_text_matching expression="-4.921\d{15}e-03" />
-                    <has_n_columns n="10" />
-                </assert_contents>
-            </output>
-            <output name="PCs">
-                <assert_contents>
-                    <has_text_matching expression="2.35298924\d\d\d\d\d\d\d\d\d\de-0\d" />
-                    <has_text_matching expression="2.4286999\d\d\d\d\d\d\d\d\d\d\de-0\d" />
-                    <has_n_columns n="10" />
-                </assert_contents>
-            </output>
-            <output name="variance_ratio">
-                <assert_contents>
-                    <has_text text="6.4362" />
-                    <has_text text="2.7348" />
-                    <has_n_columns n="1" />
-                </assert_contents>
-            </output>
-            <output name="variance">
-                <assert_contents>
-                    <has_text_matching expression="7.540\d{15}e-01" />
-                    <has_text_matching expression="1.173\d{15}e-03" />
-                    <has_text_matching expression="3.204\d{15}e-05" />
-                    <has_n_columns n="1" />
-                </assert_contents>
-            </output>
+            <output name="anndata_out" file="pp.pca.krumsiek11_chunk.h5ad" ftype="h5ad" compare="sim_size"/>
         </test>
-        <test expect_num_outputs="5">
-            <conditional name="input">
-                <param name="format" value="h5ad" />
-                <param name="adata" value="krumsiek11.h5ad" />
-            </conditional>
+        -->
+        <test>
+            <!-- test 3 -->
+            <param name="adata" value="krumsiek11.h5ad" />
             <conditional name="method">
                 <param name="method" value="tl.pca"/>
                 <param name="n_comps" value="50"/>
@@ -577,75 +393,36 @@
                     <param name="svd_solver" value="auto"/>
                     <param name="random_state" value="0"/>
                 </conditional>
+                <param name="use_highly_variable" value="false"/>
             </conditional>
-            <param name="anndata_output_format" value="h5ad" />
             <assert_stdout>
                 <has_text_matching expression="sc.tl.pca"/>
                 <has_text_matching expression="n_comps=50"/>
                 <has_text_matching expression="dtype='float32'"/>
                 <has_text_matching expression="copy=False"/>
                 <has_text_matching expression="chunked=False"/>
-                <has_text_matching expression="zero_center='True'"/>
+                <has_text_matching expression="zero_center=True"/>
                 <has_text_matching expression="svd_solver='auto'"/>
+                <has_text_matching expression="use_highly_variable=False"/>
             </assert_stdout>
-            <output name="anndata_out_h5ad" file="tl.pca.krumsiek11.h5ad" ftype="h5" compare="sim_size"/>
-            <output name="X_pca">
-                <assert_contents>
-                    <has_text_matching expression="-6.366\d{15}e-01" />
-                    <has_text_matching expression="5.702\d{15}e-03" />
-                    <has_text_matching expression="1.862\d{15}e-02" />
-                    <has_text_matching expression="-6.861\d{15}e-02" />
-                    <has_n_columns n="10" />
-                </assert_contents>
-            </output>
-            <output name="PCs">
-                <assert_contents>
-                    <has_text_matching expression="1.341\d{15}e-01" />
-                    <has_text_matching expression="-3.478\d{15}e-03" />
-                    <has_text_matching expression="-4.890\d{15}e-02" />
-                    <has_text_matching expression="-2.628\d{15}e-02" />
-                    <has_n_columns n="10" />
-                </assert_contents>
-            </output>
-            <output name="variance_ratio">
-                <assert_contents>
-                    <has_text_matching expression="6.436\d{15}e-01" />
-                    <has_text_matching expression="1.316\d{15}e-04" />
-                    <has_text_matching expression="2.801\d{15}e-05" />
-                    <has_n_columns n="1" />
-                </assert_contents>
-            </output>
-            <output name="variance">
-                <assert_contents>
-                    <has_text_matching expression="4.575\d{15}e-02" />
-                    <has_text_matching expression="2.166\d{15}e-02" />
-                    <has_text_matching expression="5.896\d{15}e-03" />
-                    <has_n_columns n="1" />
-                </assert_contents>
-            </output>
+            <output name="anndata_out" file="tl.pca.krumsiek11.h5ad" ftype="h5ad" compare="sim_size"/>
         </test>
-        <test expect_num_outputs="2">
-            <conditional name="input">
-                <param name="format" value="h5ad" />
-                <param name="adata" value="pp.neighbors_gauss_braycurtis.recipe_weinreb17.paul15_subsample.h5ad" />
-            </conditional>
+        <test>
+            <!-- test 4 -->
+            <param name="adata" value="pp.neighbors_gauss_braycurtis.recipe_weinreb17.paul15_subsample.h5ad" />
             <conditional name="method">
                 <param name="method" value="tl.diffmap"/>
                 <param name="n_comps" value="15"/>
             </conditional>
-            <param name="anndata_output_format" value="h5ad" />
             <assert_stdout>
                 <has_text_matching expression="sc.tl.diffmap"/>
                 <has_text_matching expression="n_comps=15"/>
             </assert_stdout>
-            <output name="anndata_out_h5ad" file="tl.diffmap.neighbors_gauss_braycurtis.recipe_weinreb17.paul15_subsample.h5ad" ftype="h5" compare="sim_size"/>
-            <output name="X_diffmap" file="tl.diffmap.neighbors_gauss_braycurtis.recipe_weinreb17.paul15_subsample.X_diffmap.tabular"/>
+            <output name="anndata_out" file="tl.diffmap.neighbors_gauss_braycurtis.recipe_weinreb17.paul15_subsample.h5ad" ftype="h5ad" compare="sim_size"/>
         </test>
-        <test expect_num_outputs="2">
-            <conditional name="input">
-                <param name="format" value="h5ad" />
-                <param name="adata" value="krumsiek11.h5ad" />
-            </conditional>
+        <test>
+            <!-- test 5 -->
+            <param name="adata" value="krumsiek11.h5ad" />
             <conditional name="method">
                 <param name="method" value="tl.tsne"/>
                 <param name="n_pcs" value="10"/>
@@ -653,8 +430,8 @@
                 <param name="early_exaggeration" value="12.0"/>
                 <param name="learning_rate" value="1000"/>
                 <param name="random_state" value="0"/>
+                <param name="use_fast_tsne" value="true"/>
             </conditional>
-            <param name="anndata_output_format" value="h5ad" />
             <assert_stdout>
                 <has_text_matching expression="sc.tl.tsne"/>
                 <has_text_matching expression="n_pcs=10"/>
@@ -662,15 +439,13 @@
                 <has_text_matching expression="early_exaggeration=12.0"/>
                 <has_text_matching expression="learning_rate=1000.0"/>
                 <has_text_matching expression="random_state=0"/>
+                <has_text_matching expression="use_fast_tsne=True"/>
             </assert_stdout>
-            <output name="anndata_out_h5ad" file="tl.tsne.krumsiek11.h5ad" ftype="h5" compare="sim_size"/>
-            <output name="X_tsne" file="tl.tsne.krumsiek11_X_tsne.tabular"/>
+            <output name="anndata_out" file="tl.tsne.krumsiek11.h5ad" ftype="h5ad" compare="sim_size"/>
         </test>
-        <test expect_num_outputs="2" >
-            <conditional name="input">
-                <param name="format" value="h5ad" />
-                <param name="adata" value="pp.neighbors_umap_euclidean.recipe_weinreb17.paul15_subsample.h5ad" />
-            </conditional>
+        <test>
+            <!-- test 6 -->
+            <param name="adata" value="pp.neighbors_umap_euclidean.recipe_weinreb17.paul15_subsample.h5ad" />
             <conditional name="method">
                 <param name="method" value="tl.umap"/>
                 <param name="min_dist" value="0.5"/>
@@ -683,7 +458,6 @@
                 <param name="init_pos" value="spectral"/>
                 <param name="random_state" value="0"/>
             </conditional>
-            <param name="anndata_output_format" value="h5ad" />
             <assert_stdout>
                 <has_text_matching expression="sc.tl.umap"/>
                 <has_text_matching expression="min_dist=0.5"/>
@@ -696,263 +470,67 @@
                 <has_text_matching expression="init_pos='spectral'"/>
                 <has_text_matching expression="random_state=0"/>
             </assert_stdout>
-            <output name="anndata_out_h5ad" file="tl.umap.neighbors_umap_euclidean.recipe_weinreb17.paul15_subsample.h5ad" ftype="h5" compare="sim_size">
-                <assert_contents>
-                    <has_h5_keys keys="X, obs, obsm, uns, var" />
-                </assert_contents>
-            </output>
-            <output name="X_umap">
-                <assert_contents>
-                    <has_text text="2.31791388" />
-                    <has_text text="-4.8602690" />
-                    <has_text text="-1.8031970" />
-                    <has_text text="2.31166780" />
-                    <has_n_columns n="2" />
-                </assert_contents>
-            </output>
-        </test>
-        <test expect_num_outputs="1">
-            <conditional name="input">
-                <param name="format" value="h5ad" />
-                <param name="adata" value="pp.recipe_weinreb17.paul15_subsample.h5ad" />
-            </conditional>
-            <conditional name="method">
-                <param name="method" value="pp.neighbors"/>
-                <param name="n_neighbors" value="15"/>
-                <param name="knn" value="True"/>
-                <param name="random_state" value="0"/>
-                <param name="pp_neighbors_method" value="umap"/>
-                <param name="metric" value="euclidean"/>
-            </conditional>
-            <param name="anndata_output_format" value="h5ad" />
-            <assert_stdout>
-                <has_text_matching expression="sc.pp.neighbors"/>
-                <has_text_matching expression="n_neighbors=15"/>
-                <has_text_matching expression="knn=True"/>
-                <has_text_matching expression="random_state=0"/>
-                <has_text_matching expression="method='umap'"/>
-                <has_text_matching expression="metric='euclidean'"/>
-            </assert_stdout>
-            <output name="anndata_out_h5ad" file="pp.neighbors_umap_euclidean.recipe_weinreb17.paul15_subsample.h5ad" ftype="h5" compare="sim_size">
+            <output name="anndata_out" file="tl.umap.neighbors_umap_euclidean.recipe_weinreb17.paul15_subsample.h5ad" ftype="h5ad" compare="sim_size">
                 <assert_contents>
                     <has_h5_keys keys="X, obs, obsm, uns, var" />
                 </assert_contents>
             </output>
         </test>
-        <test expect_num_outputs="1">
-            <conditional name="input">
-                <param name="format" value="h5ad" />
-                <param name="adata" value="pp.recipe_weinreb17.paul15_subsample.h5ad" />
-            </conditional>
+        <test>
+            <!-- test 7 -->
+            <param name="adata" value="pp.neighbors_umap_euclidean.recipe_weinreb17.paul15_subsample.h5ad"/>
             <conditional name="method">
-                <param name="method" value="pp.neighbors"/>
-                <param name="n_neighbors" value="15"/>
-                <param name="knn" value="True"/>
-                <param name="pp_neighbors_method" value="gauss"/>
-                <param name="metric" value="braycurtis"/>
+                <param name="method" value="tl.draw_graph"/>
+                <param name="layout" value="fa"/>
+                <param name="random_state" value="0"/>
             </conditional>
-            <param name="anndata_output_format" value="h5ad" />
-            <assert_stdout>
-                <has_text_matching expression="sc.pp.neighbors"/>
-                <has_text_matching expression="n_neighbors=15"/>
-                <has_text_matching expression="knn=True"/>
-                <has_text_matching expression="random_state=0"/>
-                <has_text_matching expression="method='gauss'"/>
-                <has_text_matching expression="metric='braycurtis'"/>
-            </assert_stdout>
-            <output name="anndata_out_h5ad" file="pp.neighbors_gauss_braycurtis.recipe_weinreb17.paul15_subsample.h5ad" ftype="h5" compare="sim_size"/>
-        </test>
-        <test expect_num_outputs="3">
-            <conditional name="input">
-                <param name="format" value="h5ad" />
-                <param name="adata" value="krumsiek11.h5ad" />
-            </conditional>
-            <conditional name="method">
-                <param name="method" value="tl.rank_genes_groups"/>
-                <param name="groupby" value="cell_type"/>
-                <param name="use_raw" value="True"/>
-                <conditional name="ref">
-                    <param name="rest" value="rest"/>
-                </conditional>
-                <param name="n_genes" value="100"/>
-                <conditional name="tl_rank_genes_groups_method">
-                    <param name="method" value="t-test_overestim_var"/>
-                </conditional>
-                <param name="only_positive" value="True"/>
-            </conditional>
-            <param name="anndata_output_format" value="h5ad" />
             <assert_stdout>
-                <has_text_matching expression="sc.tl.rank_genes_groups"/>
-                <has_text_matching expression="groupby='cell_type'"/>
-                <has_text_matching expression="use_raw=True"/>
-                <has_text_matching expression="reference='rest'"/>
-                <has_text_matching expression="n_genes=100"/>
-                <has_text_matching expression="method='t-test_overestim_var'"/>
-                <has_text_matching expression="only_positive=True"/>
+                <has_text_matching expression="sc.tl.draw_graph"/>
+                <has_text_matching expression="layout='fa'"/>
+                <has_text_matching expression="random_state=0"/>
             </assert_stdout>
-            <output name="anndata_out_h5ad" file="tl.rank_genes_groups.krumsiek11.h5ad" ftype="h5" compare="sim_size"/>
-            <output name="names">
-                <assert_contents>
-                    <has_n_columns n="5" />
-                    <has_text_matching expression="Ery\tMk\tMo\tNeu\tprogenitor"/>
-                    <has_text_matching expression="Gata1\tFog1\tCebpa\tFli1\tGata2"/>
-                    <has_text_matching expression="EgrNab\tEgrNab\tSCL\tSCL\tGfi1"/>
-                </assert_contents>
-            </output>
-            <output name="scores">
-                <assert_contents>
-                    <has_n_columns n="5" />
-                    <has_text_matching expression="Ery\tMk\tMo\tNeu\tprogenitor"/>
-                    <has_text_matching expression="18.86\d{4}"/>
-                    <has_text_matching expression="17.85\d{4}"/>
-                    <has_text_matching expression="-2.63\d{4}"/>
-                    <has_text_matching expression="-2.98\d{4}"/>
-                    <has_text_matching expression="-6.41\d{4}"/>
-                </assert_contents>
-            </output>
+            <output name="anndata_out" file="tl.draw_graph.pp.neighbors_umap_euclidean.recipe_weinreb17.paul15_subsample.h5ad" ftype="h5ad" compare="sim_size"/>
         </test>
-        <test expect_num_outputs="3">
-            <conditional name="input">
-                <param name="format" value="h5ad" />
-                <param name="adata" value="pbmc68k_reduced.h5ad" />
-            </conditional>
+        <test>
+            <!-- test 8 -->
+            <param name="adata" value="pp.neighbors_gauss_braycurtis.recipe_weinreb17.paul15_subsample.h5ad"/>
             <conditional name="method">
-                <param name="method" value="tl.rank_genes_groups"/>
-                <param name="groupby" value="louvain"/>
-                <param name="use_raw" value="True"/>
-                <conditional name="ref">
-                    <param name="rest" value="rest"/>
-                </conditional>
-                <param name="n_genes" value="100"/>
-                <conditional name="tl_rank_genes_groups_method">
-                    <param name="method" value="logreg"/>
-                    <conditional name="solver">
-                        <param name="solver" value="newton-cg"/>
-                        <param name="fit_intercept" value="True"/>
-                        <param name="max_iter" value="100"/>
-                        <param name="multi_class" value="auto"/>
-                    </conditional>
-                    <param name="tol" value="1e-4"/>
-                    <param name="c" value="1.0"/>
-                </conditional>
-                <param name="only_positive" value="True"/>
+                <param name="method" value="tl.paga"/>
+                <param name="groups" value="paul15_clusters"/>
+                <param name="use_rna_velocity" value="False"/>
+                <param name="model" value="v1.2"/>
             </conditional>
-            <param name="anndata_output_format" value="h5ad" />
             <assert_stdout>
-                <has_text_matching expression="sc.tl.rank_genes_groups"/>
-                <has_text_matching expression="groupby='louvain'"/>
-                <has_text_matching expression="use_raw=True"/>
-                <has_text_matching expression="reference='rest'"/>
-                <has_text_matching expression="n_genes=100"/>
-                <has_text_matching expression="method='logreg'"/>
-                <has_text_matching expression="solver='newton-cg'"/>
-                <has_text_matching expression="penalty='l2'"/>
-                <has_text_matching expression="fit_intercept=True"/>
-                <has_text_matching expression="max_iter=100"/>
-                <has_text_matching expression="multi_class='auto'"/>
-                <has_text_matching expression="tol=0.0001"/>
-                <has_text_matching expression="C=1.0"/>
-                <has_text_matching expression="only_positive=True"/>
+                <has_text_matching expression="sc.tl.paga"/>
+                <has_text_matching expression="groups='paul15_clusters'"/>
+                <has_text_matching expression="use_rna_velocity=False"/>
+                <has_text_matching expression="model='v1.2'"/>
             </assert_stdout>
-            <output name="anndata_out_h5ad" ftype="h5">
-                <assert_contents>
-                    <has_h5_keys keys="X, obs, obsm, raw.X, raw.var, uns, var" />
-                </assert_contents>
-            </output>
-            <output name="names">
-                <assert_contents>
-                    <has_n_columns n="7" />
-                    <has_text_matching expression="IL32\tFCGR3A\tFCER1A\tLTB\tCPVL\tIGJ\tPRSS57"/>
-                    <has_text_matching expression="KIAA0101\tFCER1G\tHLA-DMA\tHLA-DQA1\tNAAA\tMANF\tCCDC104"/>
-                    <has_text_matching expression="CCNB2\t"/>
-                </assert_contents>
-            </output>
-            <output name="scores">
-                <assert_contents>
-                    <has_n_columns n="7" />
-                    <has_text_matching expression="0.088\d+"/>
-                    <has_text_matching expression="0.114\d+"/>
-                    <has_text_matching expression="0.034\d+"/>
-                    <has_text_matching expression="0.035\d+"/>
-                    <has_text_matching expression="0.041\d+"/>
-                </assert_contents>
-            </output>
+            <output name="anndata_out" file="tl.paga.neighbors_gauss_braycurtis.recipe_weinreb17.paul15_subsample.h5ad" ftype="h5ad" compare="sim_size"/>
         </test>
-        <test expect_num_outputs="3">
-            <conditional name="input">
-                <param name="format" value="h5ad" />
-                <param name="adata" value="pbmc68k_reduced.h5ad" />
-            </conditional>
+        <test>
+            <!-- test 9 -->
+            <param name="adata" value="tl.diffmap.neighbors_gauss_braycurtis.recipe_weinreb17.paul15_subsample.h5ad" />
             <conditional name="method">
-                <param name="method" value="tl.rank_genes_groups"/>
-                <param name="groupby" value="louvain"/>
-                <param name="use_raw" value="True"/>
-                <conditional name="ref">
-                    <param name="rest" value="rest"/>
-                </conditional>
-                <param name="n_genes" value="100"/>
-                <conditional name="tl_rank_genes_groups_method">
-                    <param name="method" value="logreg"/>
-                    <conditional name="solver">
-                        <param name="solver" value="liblinear"/>
-                        <conditional name="penalty">
-                            <param name="penalty" value="l2"/>
-                            <param name="dual" value="False"/>
-                            <conditional name="intercept_scaling">
-                                <param name="fit_intercept" value="True"/>
-                                <param name="intercept_scaling" value="1.0" />
-                            </conditional>
-                            <param name="random_state" value="1"/>
-                        </conditional>
-                    </conditional>
-                    <param name="tol" value="1e-4"/>
-                    <param name="c" value="1.0"/>
-                </conditional>
-                <param name="only_positive" value="True"/>
+                <param name="method" value="tl.dpt"/>
+                <param name="n_dcs" value="15"/>
+                <param name="n_branchings" value="1"/>
+                <param name="min_group_size" value="0.01"/>
+                <param name="allow_kendall_tau_shift" value="True"/>
             </conditional>
-            <param name="anndata_output_format" value="h5ad" />
             <assert_stdout>
-                <has_text_matching expression="sc.tl.rank_genes_groups"/>
-                <has_text_matching expression="groupby='louvain'"/>
-                <has_text_matching expression="use_raw=True"/>
-                <has_text_matching expression="reference='rest'"/>
-                <has_text_matching expression="n_genes=100"/>
-                <has_text_matching expression="method='logreg'"/>
-                <has_text_matching expression="solver='liblinear'"/>
-                <has_text_matching expression="penalty='l2'"/>
-                <has_text_matching expression="dual=False"/>
-                <has_text_matching expression="fit_intercept=True"/>
-                <has_text_matching expression="intercept_scaling=1.0"/>
-                <has_text_matching expression="tol=0.0001"/>
-                <has_text_matching expression="C=1.0"/>
-                <has_text_matching expression="only_positive=True"/>
+                <has_text_matching expression="sc.tl.dpt"/>
+                <has_text_matching expression="n_dcs=15"/>
+                <has_text_matching expression="n_branchings=1"/>
+                <has_text_matching expression="min_group_size=0.01"/>
+                <has_text_matching expression="allow_kendall_tau_shift=True"/>
             </assert_stdout>
-            <output name="anndata_out_h5ad" ftype="h5">
-                <assert_contents>
-                    <has_h5_keys keys="X, obs, obsm, raw.X, raw.var, uns, var" />
-                </assert_contents>
-            </output>
-            <output name="names">
-                <assert_contents>
-                    <has_n_columns n="7" />
-                    <has_text_matching expression="AES\tLST1\tRNASE6\tPLAC8\tCST3\tSEC11C\tNASP"/>
-                    <has_text_matching expression="GIMAP4\tMIS18BP1\tLILRB4\tTUBA4A\tCOMTD1\tSLC25A4\tLEPROT"/>
-                    <has_text_matching expression="GGH\tLYN\tMAGOHB\tAL928768.3\tITGB2-AS1\tCENPH\tASRGL1"/>
-                </assert_contents>
-            </output>
-            <output name="scores">
-                <assert_contents>
-                    <has_n_columns n="7" />
-                    <has_text_matching expression="0.1680\d{4}\t0.2156\d{4}\t0.281\d{4}\t0.2100\d{4}\t0.2332\d{4}\t0.1586\d{4}\t0.12057\d{4}"/>
-                    <has_text_matching expression="0.0784\d{4}\t0.0699\d{4}\t0.06912\d{4}\t0.05364\d{4}\t0.03933\d{4}\t0.03994\d{4}\t0.0411\d{4}"/>
-                    <has_text_matching expression="0.06232\d{4}\t0.05563\d{4}\t0.0565\d{4}\t0.04164\d{4}\t0.02636\d{4}\t0.03002\d{4}\t0.032\d{4}"/>
-                </assert_contents>
-            </output>
+            <output name="anndata_out" file="tl.dpt.diffmap.neighbors_gauss_braycurtis.recipe_weinreb17.paul15_subsample.h5ad" ftype="h5ad" compare="sim_size"/>
         </test>
     </tests>
     <help><![CDATA[
-Cluster cells into subgroups, using `tl.louvain`
-================================================
+Cluster cells into subgroups (`tl.louvain`)
+===========================================
 
 Cluster cells using the Louvain algorithm (Blondel et al, 2008) in the implementation
 of Traag et al,2017. The Louvain algorithm has been proposed for single-cell
@@ -961,25 +539,33 @@
 This requires to run `pp.neighbors`, first.
 
 More details on the `scanpy documentation
-<https://scanpy.readthedocs.io/en/latest/api/scanpy.api.tl.louvain.html#scanpy.api.tl.louvain>`_
+<https://icb-scanpy.readthedocs-hosted.com/en/stable/api/scanpy.tl.louvain.html>`_
+
+Cluster cells into subgroups (`tl.leiden`)
+==========================================
+
+Cluster cells using the Leiden algorithm (Traag et al, 2018), an improved version of the Louvain algorithm (Blondel et al, 2008).
+
+The Louvain algorithm has been proposed for single-cell analysis by Levine et al, 2015.
+
+More details on the `scanpy documentation
+<https://icb-scanpy.readthedocs-hosted.com/en/stable/api/scanpy.tl.leiden.html>`_
 
 Computes PCA (principal component analysis) coordinates, loadings and variance decomposition, using `pp.pca`
 ============================================================================================================
 
-It uses the implementation of *scikit-learn*.
+@CMD_pca_outputs@
 
 More details on the `scanpy documentation
-<https://scanpy.readthedocs.io/en/latest/api/scanpy.api.pp.pca.html#scanpy.api.pp.pca>`__
+<https://icb-scanpy.readthedocs-hosted.com/en/stable/api/scanpy.pp.pca.html>`__
 
 Computes PCA (principal component analysis) coordinates, loadings and variance decomposition, using `tl.pca`
 ============================================================================================================
 
-It uses the implementation of *scikit-learn*.
-
-Diffusion Maps
+@CMD_pca_outputs@
 
 More details on the `scanpy documentation
-<https://scanpy.readthedocs.io/en/latest/api/scanpy.api.tl.pca.html#scanpy.api.tl.pca>`__
+<https://icb-scanpy.readthedocs-hosted.com/en/stable/api/scanpy.tl.pca.html>`__
 
 Diffusion Maps, using `tl.diffmap`
 ==================================
@@ -996,10 +582,12 @@
 `method=='umap'`. Differences between these options shouldn't usually be
 dramatic.
 
-It returns `X_diffmap`, diffusion map representation of data, which is the right eigen basis of the transition matrix with eigenvectors as columns.
+The diffusion map representation of data are added to the return AnnData in the multi-dimensional 
+observations annotation (obsm). It is the right eigen basis of the transition matrix with eigenvectors 
+as colum. It can be accessed using the inspect tool for AnnData
 
 More details on the `scanpy documentation
-<https://scanpy.readthedocs.io/en/latest/api/scanpy.api.tl.diffmap.html#scanpy.api.tl.diffmap>`__
+<https://icb-scanpy.readthedocs-hosted.com/en/stable/api/scanpy.tl.diffmap.html>`__
 
 t-distributed stochastic neighborhood embedding (tSNE), using `tl.tsne`
 =======================================================================
@@ -1011,7 +599,7 @@
 It returns `X_tsne`, tSNE coordinates of data.
 
 More details on the `scanpy documentation
-<https://scanpy.readthedocs.io/en/latest/api/scanpy.api.tl.tsne.html#scanpy.api.tl.tsne>`__
+<https://icb-scanpy.readthedocs-hosted.com/en/stable/api/scanpy.tl.tsne.html>`__
 
 Embed the neighborhood graph using UMAP, using `tl.umap`
 ========================================================
@@ -1027,34 +615,90 @@
 (McInnes et al, 2018). For a few comparisons of UMAP with tSNE, see this `preprint
 <https://doi.org/10.1101/298430>`__.
 
-It returns `X_umap`, UMAP coordinates of data.
+The UMAP coordinates of data are added to the return AnnData in the multi-dimensional 
+observations annotation (obsm). This data is accessible using the inspect tool for AnnData
+
+More details on the `scanpy documentation
+<https://icb-scanpy.readthedocs-hosted.com/en/stable/api/scanpy.tl.umap.html>`__
+
+Force-directed graph drawing, using `tl.draw_graph`
+===================================================
+
+Force-directed graph drawing describes a class of long-established algorithms for visualizing graphs. 
+It has been suggested for visualizing single-cell data by Islam et al, 11. 
+Many other layouts as implemented in igraph are available. Similar approaches have been used by 
+Zunder et al, 2015 or Weinreb et al, 2016.
+
+This is an alternative to tSNE that often preserves the topology of the data better. 
+This requires to run `pp.neighbors`, first.
+
+The default layout (ForceAtlas2) uses the package fa2.
+
+The coordinates of graph layout are added to the return AnnData in the multi-dimensional 
+observations annotation (obsm). This data is accessible using the inspect tool for AnnData.
 
 More details on the `scanpy documentation
-<https://scanpy.readthedocs.io/en/latest/api/scanpy.api.tl.umap.html#scanpy.api.tl.umap>`__
+<https://icb-scanpy.readthedocs-hosted.com/en/stable/api/scanpy.tl.draw_graph.html>`__
+
+Infer progression of cells through geodesic distance along the graph (`tl.dpt`)
+===============================================================================
 
-Compute a neighborhood graph of observations, using `pp.neighbors`
-==================================================================
+Reconstruct the progression of a biological process from snapshot
+data. `Diffusion Pseudotime` has been introduced by Haghverdi et al (2016) and
+implemented within Scanpy (Wolf et al, 2017). Here, we use a further developed
+version, which is able to deal with disconnected graphs (Wolf et al, 2017) and can
+be run in a `hierarchical` mode by setting the parameter
+`n_branchings>1`. We recommend, however, to only use
+`tl.dpt` for computing pseudotime (`n_branchings=0`) and
+to detect branchings via `paga`. For pseudotime, you need
+to annotate your data with a root cell. 
 
-The neighbor search efficiency of this heavily relies on UMAP (McInnes et al, 2018),
-which also provides a method for estimating connectivities of data points -
-the connectivity of the manifold (`method=='umap'`). If `method=='diffmap'`,
-connectivities are computed according to Coifman et al (2005), in the adaption of
-Haghverdi et al (2016).
+This requires to run `pp.neighbors`, first. In order to
+reproduce the original implementation of DPT, use `method=='gauss'` in
+this. Using the default `method=='umap'` only leads to minor quantitative
+differences, though.
+
+
+If `n_branchings==0`, no field `dpt_groups` will be written.
+
+- 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.
+- 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.
+
+The tool is similar to the R package `destiny` of Angerer et al (2016).
+
+More details on the `tl.dpt scanpy documentation
+<https://icb-scanpy.readthedocs-hosted.com/en/stable/api/scanpy.tl.dpt.html>`_
 
-More details on the `scanpy documentation
-<https://scanpy.readthedocs.io/en/latest/api/scanpy.api.pp.neighbors.html#scanpy.api.pp.neighbors>`__
+
+Generate cellular maps of differentiation manifolds with complex topologies (`tl.paga`)
+=======================================================================================
 
-Rank genes for characterizing groups, using `tl.rank_genes_groups`
-==================================================================
+By quantifying the connectivity of partitions (groups, clusters) of the
+single-cell graph, partition-based graph abstraction (PAGA) generates a much
+simpler abstracted graph (*PAGA graph*) of partitions, in which edge weights
+represent confidence in the presence of connections. By tresholding this
+confidence in `paga`, a much simpler representation of data
+can be obtained.
 
-It returns:
+The confidence can be interpreted as the ratio of the actual versus the
+expected value of connetions under the null model of randomly connecting
+partitions. We do not provide a p-value as this null model does not
+precisely capture what one would consider "connected" in real data, hence it
+strongly overestimates the expected value. See an extensive discussion of
+this in Wolf et al (2017).
+
+Together with a random walk-based distance measure, this generates a partial
+coordinatization of data useful for exploring and explaining its variation.
 
-- `Gene names`: Gene names ordered in column by group id and in rows according to scores
-- `Scores`: Score for each gene (rows) for each group (columns), same order as for the names
+The returned AnnData object contains:
+
+- Full adjacency matrix of the abstracted graph, weights correspond to confidence in the connectivities of partition (connectivities)
+- Adjacency matrix of the tree-like subgraph that best explains the topology (connectivities_tree)
 
-More details on the `scanpy documentation
-<https://scanpy.readthedocs.io/en/latest/api/scanpy.api.tl.rank_genes_groups.html#scanpy.api.tl.rank_genes_groups>`__
+These datasets are stored in the unstructured annotation (uns) and can be accessed using the inspect tool for AnnData objects
 
+More details on the `tl.paga scanpy documentation
+<https://icb-scanpy.readthedocs-hosted.com/en/stable/api/scanpy.tl.paga.html>`_
     ]]></help>
     <expand macro="citations"/>
 </tool>