view plot.xml @ 0:397d2c97af05 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:14:25 -0500
parents
children e4c0f5ee8e17
line wrap: on
line source

<tool id="scanpy_plot" name="Plot with scanpy" version="@galaxy_version@">
    <description></description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="requirements"/>
    <stdio>
        <regex match="... storing" source="stderr" level="warning"/>
    </stdio>
    <expand macro="version_command"/>
    <command detect_errors="exit_code"><![CDATA[
@CMD@
      ]]></command>
    <configfiles>
        <configfile name="script_file"><![CDATA[
@CMD_imports@
@CMD_read_inputs@

sc.settings.figdir = '.'

#if $method.method == 'pl.scatter'

sc.pl.scatter(
    @CMD_param_plot_inputs@
    #if $method.type.type == 'xy'
    x='$method.type.x',
    y='$method.type.y',
    layers=('$method.type.layer_x', '$method.type.layer_y', '$method.type.layer_color'),
    #else
    basis='$method.type.basis',
        #if str($method.type.color) != ''
            #set $color = ([x.strip() for x in str($method.type.color).split(',')])
    color=$color,
        #else
    color=None,
        #end if
    #end if
    use_raw=$method.use_raw,
    sort_order=$method.sort_order,
    @CMD_params_pl_groups@
    @CMD_params_pl_components@
    projection='$method.plot.projection',
    legend_loc='$method.plot.legend_loc',
    legend_fontsize=$method.plot.legend_fontsize,
    legend_fontweight='$method.plot.legend_fontweight',
    color_map='$method.plot.color_map',
    palette='$method.plot.palette',
    frameon=$method.plot.frameon,
    #if $method.plot.title
    title='$method.plot.title',
    #end if
    size=$method.plot.size)

#elif $method.method == 'pl.heatmap'
sc.pl.heatmap(
    @CMD_param_plot_inputs@
    @CMD_params_plots@
    swap_axes=$method.swap_axes,
    show_gene_labels=$method.show_gene_labels,
    cmap='$method.matplotlib_pyplot_imshow.cmap',
    interpolation='$method.matplotlib_pyplot_imshow.interpolation',
    #if $method.matplotlib_pyplot_imshow.alpha
    alpha=$method.matplotlib_pyplot_imshow.alpha,
    #end if
    #if $method.matplotlib_pyplot_imshow.vmin
    vmin=$method.matplotlib_pyplot_imshow.vmin,
    #end if
    #if $method.matplotlib_pyplot_imshow.vmax
    vmax=$method.matplotlib_pyplot_imshow.vmax,
    #end if
    origin='$method.matplotlib_pyplot_imshow.origin')

#elif $method.method == 'pl.dotplot'
sc.pl.dotplot(
    @CMD_param_plot_inputs@
    @CMD_params_plots@
    color_map='$method.color_map',
    #if $method.dot_max
    dot_max=$method.dot_max,
    #end if
    #if $method.dot_min
    dot_min=$method.dot_min,
    #end if
    @CMD_params_matplotlib_pyplot_scatter@)

#elif $method.method == 'pl.violin'
sc.pl.violin(
    @CMD_param_plot_inputs@
    #if $method.key_variables.type == "var_names"
        #set $key_list = adata.var_names
    #elif $method.key_variables.type == "obs"
        #set $key_list = adata.obs.select_dtypes(exclude=['category']).columns
    #elif $method.key_variables.type == "custom"
        #set $key_list=([x.strip() for x in str($method.key_variables.keys).split(',')])
    #end if
    keys=$key_list,
    #if $method.groupby
    groupby='$method.groupby',
    #end if
    log=$method.log,
    use_raw=$method.use_raw,
    sstripplot=$method.violin_plot.stripplot.stripplot,
    #if $method.violin_plot.stripplot.stripplot == "True"
    jitter=$method.violin_plot.stripplot.jitter.jitter,
        #if $method.violin_plot.stripplot.jitter.jitter == "True"
    size=$method.violin_plot.stripplot.jitter.size,
        #end if
    #end if
    multi_panel=$method.violin_plot.multi_panel.multi_panel, 
    scale='$method.violin_plot.scale',
    #if $method.xlabel
    xlabel='$method.xlabel',
    #end if
    #if $method.rotation
    rotation=$method.rotation,
    #end if
    @CMD_params_seaborn_violinplot@)

#elif $method.method == 'pl.matrixplot'
sc.pl.matrixplot(
    @CMD_param_plot_inputs@
    @CMD_params_plots@
    swap_axes=$method.swap_axes,
    cmap='$method.matplotlib_pyplot_pcolor.cmap',
    #if $method.matplotlib_pyplot_pcolor.vmin
    vmin=$method.matplotlib_pyplot_pcolor.vmin,
    #end if
    #if $method.matplotlib_pyplot_pcolor.vmax
    vmax=$method.matplotlib_pyplot_pcolor.vmax,
    #end if
    edgecolors='$method.matplotlib_pyplot_pcolor.edgecolors',
    #if $method.matplotlib_pyplot_pcolor.alpha
    alpha=$method.matplotlib_pyplot_pcolor.alpha,
    #end if
    snap=$method.matplotlib_pyplot_pcolor.snap)

#elif $method.method == 'pl.clustermap'
sc.pl.clustermap(
    #if str($method.use_raw) == 'True'
    adata=adata.X,
    #else
    adata=adata,
    #end if
    show=False,
    obs_keys='$method.obs_keys',
    use_raw=$method.use_raw,
    method='$method.seaborn_clustermap.method',
    metric='$method.seaborn_clustermap.metric',
    #if str($method.seaborn_clustermap.z_score) == 'None'
    z_score=None,
    #else
    z_score=$method.seaborn_clustermap.z_score,
    #end if
    #if str($method.seaborn_clustermap.standard_scale) == 'None'
    standard_scale=None,
    #else
    standard_scale=$method.seaborn_clustermap.standard_scale,
    #end if
    col_cluster=$method.seaborn_clustermap.col_cluster,
    row_cluster=$method.seaborn_clustermap.row_cluster).savefig(fname="output.$format")

#elif $method.method == 'pl.highest_expr_genes'
sc.pl.highest_expr_genes(
    @CMD_param_plot_inputs@
    n_top=$method.n_top,
    #if str($method.gene_symbols) != ''
    gene_symbols='$method.gene_symbols',
    #end if
    #if str($method.setseaborn_boxplot.color) != ''
    color='$method.setseaborn_boxplot.color',
    #end if
    #if str($method.setseaborn_boxplot.palette) != 'None'
    palette='$method.setseaborn_boxplot.palette',
    #end if
    saturation=$method.setseaborn_boxplot.saturation)

#elif $method.method == 'pl.pca'
sc.pl.pca(
    @CMD_param_plot_inputs@
    @CMD_param_color@
    use_raw=$method.use_raw,
    sort_order=$method.sort_order,
    @CMD_params_pl_groups@
    @CMD_params_pl_components@
    @CMD_pl_attribute_section@
    @CMD_params_matplotlib_pyplot_scatter@)

#elif $method.method == 'pl.pca_loadings'
sc.pl.pca_loadings(
    @CMD_param_plot_inputs@
    #set $components = ([int(x.strip()) for x in str($method.components).split(',')])
    components=$components)

#elif $method.method == 'pl.pca_variance_ratio'
sc.pl.pca_variance_ratio(
    @CMD_param_plot_inputs@
    n_pcs=$method.n_pcs,
    log=$method.log)

#elif $method.method == 'pl.pca_overview'
sc.pl.pca_overview(
    @CMD_param_plot_inputs@
    @CMD_param_color@
    use_raw=$method.use_raw,
    sort_order=$method.sort_order,
    @CMD_params_pl_groups@
    @CMD_params_pl_components@
    @CMD_pl_attribute_section@
    @CMD_params_matplotlib_pyplot_scatter@)

#elif $method.method == 'pl.tsne'
sc.pl.tsne(
    @CMD_param_plot_inputs@
    @CMD_param_color@
    use_raw=$method.use_raw,
    @CMD_pl_edges@
    arrows=$method.arrows,
    sort_order=$method.sort_order,
    @CMD_params_pl_groups@
    @CMD_params_pl_components@
    @CMD_pl_attribute_section@
    @CMD_params_matplotlib_pyplot_scatter@)

#elif $method.method == 'pl.umap'
sc.pl.umap(
    @CMD_param_plot_inputs@
    @CMD_param_color@
    use_raw=$method.use_raw,
    @CMD_pl_edges@
    arrows=$method.arrows,
    sort_order=$method.sort_order,
    @CMD_params_pl_groups@
    @CMD_params_pl_components@
    @CMD_pl_attribute_section@
    @CMD_params_matplotlib_pyplot_scatter@)

#elif $method.method == 'pl.diffmap'
sc.pl.diffmap(
    @CMD_param_plot_inputs@
    @CMD_param_color@
    use_raw=$method.use_raw,
    sort_order=$method.sort_order,
    @CMD_params_pl_groups@
    @CMD_params_pl_components@
    @CMD_pl_attribute_section@
    @CMD_params_matplotlib_pyplot_scatter@)

#elif $method.method == 'pl.dpt_groups_pseudotime'
sc.pl.dpt_groups_pseudotime(
    @CMD_param_plot_inputs@
    color_map='$method.color_map')

#elif $method.method == 'pl.dpt_timeseries'
sc.pl.dpt_timeseries(
    @CMD_param_plot_inputs@
    #if $method.heatmap.as_heatmap == "True"
    color_map='$method.heatmap.color_map',
    #end if
    as_heatmap=$method.heatmap.as_heatmap)

#elif $method.method == 'pl.paga'
sc.pl.paga(
    @CMD_param_plot_inputs@
    @CMD_params_pl_paga@)
#end if
]]></configfile>
    </configfiles>
    <inputs>
        <expand macro="inputs_anndata"/>
        <expand macro="param_plot_format"/>
        <conditional name="method">
            <param argument="method" type="select" label="Method used for plotting">
                <option value="pl.scatter">Generic: Scatter plot along observations or variables axes, using `pl.scatter`</option>
                <option value="pl.heatmap">Generic: Heatmap of the expression values of set of genes, using `pl.heatmap`</option>
                <option value="pl.dotplot">Generic: Makes a dot plot of the expression values, using `pl.dotplot`</option>
                <option value="pl.violin">Generic: Violin plot, using `pl.violin`</option>
                <!--<option value="pl.stacked_violin">Generic: </option>!-->
                <option value="pl.matrixplot">Generic: Heatmap of the mean expression values per cluster, using `pl.matrixplot`</option>
                <option value="pl.clustermap">Generic: Hierarchically-clustered heatmap, using `pl.clustermap`</option>
                <!--<option value="pl.ranking">Generic: </option>!-->
                <option value="pl.highest_expr_genes">Preprocessing: Plot the fraction of counts assigned to each gene over all cells, using `pl.highest_expr_genes`</option>
                <!--<option value="pl.filter_genes_dispersion">Preprocessing: Plot dispersions versus means for genes, using `pl.filter_genes_dispersion`</option>-->
                <!--<option value="pl.highly_variable_genes">Preprocessing: </option>!-->
                <!--<option value="pl.calculate_qc_metrics">Preprocessing: </option>!-->
                <option value="pl.pca">PCA: Scatter plot in PCA coordinates, using `pl.pca`</option>
                <option value="pl.pca_loadings">PCA: Rank genes according to contributions to PCs, using `pl.pca_loadings`</option>
                <option value="pl.pca_variance_ratio">PCA: Scatter plot in PCA coordinates, using `pl.pca_variance_ratio`</option>
                <option value="pl.pca_overview">PCA: Plot PCA results, using `pl.pca_overview`</option>
                <option value="pl.tsne">Embeddings: Scatter plot in tSNE basis, using `pl.tsne`</option>
                <option value="pl.umap">Embeddings: Scatter plot in UMAP basis, using `pl.umap`</option>
                <option value="pl.diffmap">Embeddings: Scatter plot in Diffusion Map basis, using `pl.diffmap`</option>
                <!--<option value="pl.draw_graph">Embeddings: </option>!-->
                <option value="pl.dpt_groups_pseudotime">Branching trajectories and pseudotime, clustering: Plot groups and pseudotime, using `pl.dpt_groups_pseudotime`</option>
                <option value="pl.dpt_timeseries">Branching trajectories and pseudotime, clustering: Heatmap of pseudotime series, using `pl.dpt_timeseries`</option>
                <option value="pl.paga">Branching trajectories and pseudotime, clustering: Plot the abstracted graph through thresholding low-connectivity edges, using `pl.paga`</option>
                <!--<option value="pl.paga_compare">Branching trajectories and pseudotime, clustering: </option>!-->
                <!--<option value="pl.paga_path">Branching trajectories and pseudotime, clustering: </option>!-->
                <!--<option value="pl.rank_gene_groups">Marker genes: Plot ranking of genes using dotplot plot, using `pl.rank_gene_groups`</option>!-->
                <!--<option value="pl.rank_genes_groups_dotplot">Marker genes: </option>!-->
                <!--<option value="pl.rank_genes_groups_heatmap">Marker genes: </option>!-->
                <!--<option value="pl.rank_genes_groups_matrixplot">Marker genes: </option>!-->
                <!--<option value="pl.rank_genes_groups_stacked_violin">Marker genes: </option>!-->
                <!--<option value="pl.rank_genes_groups_violin">Marker genes: </option>!-->
                <!--<option value="pl.phate">Misc: </option>!-->
                <!--<option value="pl.matrix">Misc: </option>!-->
                <!--<option value="pl.paga_adjacency">Misc: </option>!-->
                <!--<option value="pl.timeseries">Misc: </option>!-->
                <!--<option value="pl.timeseries_as_heatmap">Misc: </option>!-->
                <!--<option value="pl.timeseries_subplot">Misc: </option>!-->
            </param>
            <when value="pl.scatter">
                <conditional name="type">
                    <param name="type" type="select" label="Plotting tool that computed coordinates" help="">
                        <option value="xy">Using coordinates</option>
                        <option value="basis">Using tool that computes coordinates</option>
                    </param>
                    <when value="xy">
                        <param argument="x" type="text" value="" label="x coordinate" help="Index or key from either `.obs` or `.var`"/>
                        <param argument="y" type="text" value="" label="y coordinate" help="Index or key from either `.obs` or `.var`"/>
                        <param argument="layer_x" type="text" value="X" label="Layers for x coordinate" help="Use the `layers` attribute of `adata` if present"/>
                        <param argument="layer_y" type="text" value="X" label="Layers for y coordinate" help="Use the `layers` attribute of `adata` if present"/>
                        <param argument="layer_color" type="text" value="X" label="Layers for color" help="Use the `layers` attribute of `adata` if present"/>
                    </when>
                    <when value="basis">
                        <param argument="basis" type="select" label="Plotting tool that computes coordinates" help="">
                            <option value="pca">pca (need to run on `tl.pca` output)</option>
                            <option value="tsne">tsne (need to run on `tl.tsne` output)</option>
                            <option value="umap">umap (need to run on `tl.umap` output)</option>
                            <option value="diffmap">diffmap (need to run on `tl.diffmap` output)</option>
                            <option value="draw_graph_fr">draw_graph_fr (need to run on `tl.draw_graph` output)</option>
                        </param>
                        <expand macro="param_color"/>
                    </when>
                </conditional>
                <expand macro="param_use_raw"/>
                <param argument="sort_order" type="boolean" truevalue="True" falsevalue="False" checked="true" label="Plot data points with higher values on top of others?" help="For continuous annotations used as color parameter"/>
                <expand macro="pl_groups"/>
                <section name="plot" title="Plot attributes">
                    <expand macro="pl_components"/>
                    <expand macro="param_projection"/>
                    <expand macro="param_legend_loc"/>
                    <expand macro="param_legend_fontsize"/>
                    <expand macro="param_legend_fontweight"/>
                    <expand macro="param_color_map"/>
                    <expand macro="param_palette"/>
                    <expand macro="param_frameon"/>
                    <expand macro="param_size"/>
                    <expand macro="param_title"/>
                </section>
            </when>
            <when value="pl.heatmap">
                <expand macro="params_plots"/>
                <expand macro="param_swap_axes"/>
                <param argument="show_gene_labels" type="boolean" truevalue="True" falsevalue="False" checked="false" label="Show gene labels?" help="By default gene labels are shown when there are 50 or less genes. Otherwise the labels are removed."/>
                <section name="matplotlib_pyplot_imshow" title="Parameters for matplotlib.pyplot.imshow">
                    <expand macro="param_cmap"/>
                    <param name="interpolation" type="select" label="Interpolation method" help="">
                        <option value="none">none</option>
                        <option value="nearest">nearest</option>
                        <option value="bilinear">bilinear</option>
                        <option value="bicubic">bicubic</option>
                        <option value="spline16">spline16</option>
                        <option value="spline36">spline36</option>
                        <option value="hanning">hanning</option>
                        <option value="hamming">hamming</option>
                        <option value="hermite">hermite</option>
                        <option value="kaiser">kaiser</option>
                        <option value="quadric">quadric</option>
                        <option value="catrom">catrom</option>
                        <option value="gaussian">gaussian</option>
                        <option value="bessel">bessel</option>
                        <option value="sinc">sinc</option>
                        <option value="mitchell">mitchell</option>
                        <option value="lanczos">lanczos</option>
                    </param>
                    <expand macro="param_alpha"/>
                    <expand macro="param_vmin"/>
                    <expand macro="param_vmax"/>
                    <param name="origin" type="select" label="Place the [0,0] index of the array in the upper left or lower left corner of the axes" help=" The convention 'upper' is typically used for matrices and images.">
                        <option value="upper">Upper</option>
                        <option value="lower">Lower</option>
                    </param>
                </section>
            </when>
            <when value="pl.dotplot">
                <expand macro="params_plots"/>
                <param argument="color_map" type="select" label="Color palette">
                    <expand macro="matplotlib_pyplot_colormap"/>
                </param>
                <param argument="dot_max" type="float" value="" min="0" max="1" optional="true" label="Maximum dot size" help="If none, the maximum dot size is set to the maximum fraction value found (e.g. 0.6). If given, the value should be a number between 0 and 1. All fractions larger than dot_max are clipped to this value."/>
                <param argument="dot_min" type="float" value="" min="0" max="1" optional="true" label="Minimum dot size" help="If none, the minimum dot size is set to 0. If given, the value should be a number between 0 and 1. All fractions smaller than dot_min are clipped to this value."/>
                <expand macro="section_matplotlib_pyplot_scatter"/>
            </when>
            <when value="pl.violin">
                <conditional name="key_variables">
                    <param name="type" type="select" label="Keys for accessing variables">
                        <option value="var_names">All variables in `.var_names`</option>
                        <option value="obs">All fields in `.obs`</option>
                        <option value="custom">Subset of variables in `adata.var_names` or fields of `.obs`"</option>
                    </param>
                    <when value="var_names"/>
                    <when value="obs"/>
                    <when value="custom">
                        <param argument="keys" type="text" value="" label="Keys for accessing variables" help="One or a list of comma-separated index or key from `.var_names` or fields of `.obs`"/>
                    </when>
                </conditional>
                <expand macro="param_groupby"/>
                <expand macro="param_log"/>
                <expand macro="param_use_raw"/>
                <expand macro="section_violin_plots"/>
                <param argument="xlabel" type="text" value="" optional="true" label="Label of the x axis" help="Defaults to `groupby` if `rotation` is `None`,    otherwise, no label is shown."/>
                <param argument="rotation" type="float" value="" optional="true" label="Rotation of xtick labels" help=""/>
                <expand macro="seaborn_violinplot"/>
            </when>
            <when value="pl.matrixplot">
                <expand macro="params_plots"/>
                <expand macro="param_swap_axes"/>
                <section name="matplotlib_pyplot_pcolor" title="Parameters for matplotlib.pyplot.pcolor">
                    <param argument="cmap" type="select" label="Color palette">
                        <expand macro="seaborn_color_palette_options"/>
                    </param>
                    <param argument="vmin" type="float" value="" optional="true" label="Minimum value to anchor the colormap" help=""/>
                    <param argument="vmax" type="float" value="" optional="true" label="Maximum value to anchor the colormap" help=""/>
                    <expand macro="param_matplotlib_pyplot_edgecolors"/>
                    <expand macro="param_alpha"/>
                    <param argument="snap" type="boolean" truevalue="True" falsevalue="False" checked="false" label="Snap the mesh to pixel boundaries?" help=""/>
                </section>
            </when>
            <when value="pl.clustermap">
                <param argument="obs_keys" type="text" value="" label="Categorical annotation to plot with a different color map" help="Currently, only a single key is supported."/>
                <expand macro="param_use_raw"/>
                <section name="seaborn_clustermap" title="Parameters for seaborn.clustermap">
                    <param name="method" type="select" label="Linkage method to use for calculating clusters" help="More details in https://docs.scipy.org/doc/scipy/reference/generated/scipy.cluster.hierarchy.linkage.html">
                        <option value="single">single: Nearest Point Algorithm</option>
                        <option value="complete">complete: Farthest Point Algorithm or Voor Hees Algorithm</option>
                        <option value="average">average: UPGMA algorithm</option>
                        <option value="weighted">weighted: WPGMA algorithm</option>
                        <option value="centroid">centroid: UPGMC algorithm</option>
                        <option value="median">median: WPGMC algorithm</option>
                        <option value="ward">ward: incremental algorithm</option>
                    </param>
                    <param name="metric" type="select" label="Distance metric to use for the data" help="See scipy.spatial.distance.pdist documentation for more options https://docs.scipy.org/doc/scipy/reference/generated/scipy.spatial.distance.pdist.html">
                        <expand macro="distance_metric_options"/>
                    </param>
                    <param name="z_score" type="select" label="Calculate z-scores for the rows or the columns?" help="Z scores are: z = (x - mean)/std, so values in each row (column) will get the mean of the row (column) subtracted, then divided by the standard deviation of the row (column). This ensures that each row (column) has mean of 0 and variance of 1.">
                        <option value="None">No Z-score</option>
                        <option value="0">Rows</option>
                        <option value="1">Columns</option>
                    </param>
                    <param name="standard_scale" type="select" label="Standardize a dimension?" help="It means for each row or column, subtract the minimum and divide each by its maximum.">
                        <option value="None">No standardization</option>
                        <option value="0">Rows</option>
                        <option value="1">Columns</option>
                    </param>
                    <param name="col_cluster" type="boolean" truevalue="True" falsevalue="False" checked="false" label="Cluster the columns?" help=""/>
                    <param name="row_cluster" type="boolean" truevalue="True" falsevalue="False" checked="false" label="Cluster the rows?" help=""/>
                </section>
            </when>
            <when value="pl.highest_expr_genes">
                <param argument="n_top" type="integer" min="0" value="30" label="Number of top genes" help=""/>
                <param argument="gene_symbols" type="text" optional="true" label="Key for field in `.var` that stores gene symbols" help="Fill it if you do not want to use `.var_names`."/>
                <section name="setseaborn_boxplot" title="Plot settings" expanded="false">
                    <param argument="color" type="text" value="" optional="true" label="Color for all of the elements, or seed for a gradient palette" help=""/>
                    <param argument="palette" type="select" optional="true" label="Colors to use for the different levels of the hue variable" help="See https://seaborn.pydata.org/tutorial/color_palettes.html for more details.">
                        <expand macro="seaborn_color_palette_options"/>
                    </param>
                    <param argument="saturation" type="float" value="1" label="Proportion of the original saturation to draw colors at" help="Large patches often look better with slightly desaturated colors, but set this to 1 if you want the plot colors to perfectly match the input color spec."/>            
                </section>
            </when>
            <when value="pl.pca">
                <expand macro="param_color"/>
                <expand macro="param_use_raw"/>
                <expand macro="param_sort_order"/>
                <expand macro="pl_groups"/>
                <expand macro="pl_attribute_section"/>
                <expand macro="section_matplotlib_pyplot_scatter"/>
            </when>
            <when value="pl.pca_loadings">
                <param argument="components" type="text" value="1,2,3" label="Lsit of comma-separated components" help="1, 2, 3 means first, second and third principal components"/>
            </when>
            <when value="pl.pca_variance_ratio">
                <param argument="n_pcs" type="integer" min="0" value="30" label="Number of PCs to show" help=""/>
                <expand macro="param_log"/>
            </when>
            <when value="pl.pca_overview">
                <expand macro="param_color"/>
                <expand macro="param_use_raw"/>
                <expand macro="param_sort_order"/>
                <expand macro="pl_groups"/>
                <expand macro="pl_attribute_section"/>
                <expand macro="section_matplotlib_pyplot_scatter"/>
            </when>
            <when value="pl.tsne">
                <expand macro="param_color"/>
                <expand macro="param_use_raw"/>
                <expand macro="pl_edges"/>
                <expand macro="param_arrows"/>
                <expand macro="param_sort_order"/>
                <expand macro="pl_groups"/>
                <expand macro="pl_attribute_section"/>
                <expand macro="section_matplotlib_pyplot_scatter"/>
            </when>
            <when value="pl.umap">
                <expand macro="param_color"/>
                <expand macro="param_use_raw"/>
                <expand macro="pl_edges"/>
                <expand macro="param_arrows"/>
                <expand macro="param_sort_order"/>
                <expand macro="pl_groups"/>
                <expand macro="pl_attribute_section"/>
                <expand macro="section_matplotlib_pyplot_scatter"/>
            </when>
            <when value="pl.diffmap">
                <expand macro="param_color"/>
                <expand macro="param_use_raw"/>
                <expand macro="param_sort_order"/>
                <expand macro="pl_groups"/>
                <expand macro="pl_attribute_section"/>
                <expand macro="section_matplotlib_pyplot_scatter"/>
            </when>
            <when value="pl.dpt_groups_pseudotime">
                <expand macro="param_color_map"/>
            </when>
            <when value="pl.dpt_timeseries">
                <conditional name="heatmap">
                    <param argument="as_heatmap" type="select" label="Plot the timeseries as heatmap?" help="">
                        <option value="True">Yes</option>
                        <option value="False">No</option>
                    </param>
                    <when value="True">
                        <expand macro="param_color_map"/>
                    </when>
                    <when value="False" />
                </conditional>
            </when>
            <when value="pl.paga">
                <expand macro="inputs_paga"/>
            </when>
        </conditional>
    </inputs>
    <outputs>
        <data name="out_png" format="png" from_work_dir="*.png" label="${tool.name} on ${on_string}">
            <filter>format == 'png'</filter>
        </data>
        <data name="out_pdf" format="pdf" from_work_dir="*.pdf" label="${tool.name} on ${on_string}">
            <filter>format == 'pdf'</filter>
        </data>
        <data name="out_svg" format="svg" from_work_dir="*.svg" label="${tool.name} on ${on_string}">
            <filter>format == 'svg'</filter>
        </data>
    </outputs>
    <tests>
        <test>
            <!-- Test pl.scatter !-->
            <conditional name="input">
                <param name="format" value="h5ad" />
                <param name="adata" value="pp.pca.krumsiek11.h5ad" />
            </conditional>
            <param name="format" value="png"/>
            <conditional name="method">
                <param name="method" value="pl.scatter"/>
                <conditional name="type">
                    <param name="type" value="basis"/>
                    <param name="basis" value="pca"/>
                    <param name="color" value="EgrNab, Gata2"/>
                </conditional>
                <param name="use_raw" value="False"/>
                <param name="sort_order" value="True"/>
                <section name="plot">
                    <param name="projection" value="2d"/>
                    <param name="legend_loc" value="right margin"/>
                    <param name="legend_fontsize" value="1"/>
                    <param name="legend_fontweight" value="normal"/>
                    <param name="color_map" value="inferno"/>
                    <param name="palette" value="inferno"/>
                    <param name="frameon" value="True"/>
                    <param name="size" value="1"/>
                </section>
            </conditional>
            <assert_stdout>
                <has_text_matching expression="sc.pl.scatter"/>
                <has_text_matching expression="basis='pca'" />
                <has_text_matching expression="color=\['EgrNab', 'Gata2'\]"/>
                <has_text_matching expression="use_raw=False"/>
                <has_text_matching expression="sort_order=True"/>
                <has_text_matching expression="groups=None"/>
                <has_text_matching expression="components=None"/>
                <has_text_matching expression="projection='2d'"/>
                <has_text_matching expression="legend_loc='right margin'"/>
                <has_text_matching expression="legend_fontsize=1"/>
                <has_text_matching expression="legend_fontweight='normal'"/>
                <has_text_matching expression="color_map='inferno'"/>
                <has_text_matching expression="palette='inferno'"/>
                <has_text_matching expression="frameon=True"/>
                <has_text_matching expression="size=1.0"/>
            </assert_stdout>
            <output name="out_png" file="pl.scatter.pca.krumsiek11.png" ftype="png" compare="sim_size"/>
        </test>
        <test>
            <!-- Test pl.scatter !-->
            <conditional name="input">
                <param name="format" value="h5ad" />
                <param name="adata" value="krumsiek11.h5ad" />
            </conditional>
            <param name="format" value="png"/>
            <conditional name="method">
                <param name="method" value="pl.scatter"/>
                <conditional name="type">
                    <param name="type" value="xy"/>
                    <param name="x" value="EKLF"/>
                    <param name="y" value="Cebpa"/>
                    <param name="layer_x" value="X"/>
                    <param name="layer_y" value="X"/>
                    <param name="layer_color" value="X"/>
                </conditional>
                <param name="use_raw" value="False"/>
                <param name="sort_order" value="True"/>
                <section name="plot">
                    <param name="projection" value="2d"/>
                    <param name="legend_loc" value="right margin"/>
                    <param name="legend_fontsize" value="1"/>
                    <param name="legend_fontweight" value="normal"/>
                    <param name="palette" value="bwr"/>
                    <param name="frameon" value="False"/>
                    <param name="size" value="1"/>
                    <param name="title" value="A title"/>
                </section>
            </conditional>
            <assert_stdout>
                <has_text_matching expression="sc.pl.scatter"/>
                <has_text_matching expression="x='EKLF'" />
                <has_text_matching expression="y='Cebpa'"/>
                <has_text_matching expression="layers=\('X', 'X', 'X'\)"/>
                <has_text_matching expression="use_raw=False"/>
                <has_text_matching expression="sort_order=True"/>
                <has_text_matching expression="groups=None,"/>
                <has_text_matching expression="components=None,"/>
                <has_text_matching expression="projection='2d'"/>
                <has_text_matching expression="legend_loc='right margin'"/>
                <has_text_matching expression="legend_fontsize=1"/>
                <has_text_matching expression="legend_fontweight='normal'"/>
                <has_text_matching expression="color_map='viridis'"/>
                <has_text_matching expression="palette='bwr'"/>
                <has_text_matching expression="frameon=False"/>
                <has_text_matching expression="size=1.0"/>
                <has_text_matching expression="title='A title'"/>
            </assert_stdout>
            <output name="out_png" file="pl.scatter.krumsiek11.png" ftype="png" compare="sim_size"/>
        </test>
        <test>
            <!-- test pl.heatmap !-->
            <conditional name="input">
                <param name="format" value="h5ad" />
                <param name="adata" value="krumsiek11.h5ad" />
            </conditional>
            <param name="format" value="png"/>
            <conditional name="method">
                <param name="method" value="pl.heatmap"/>
                <conditional name="var_names">
                    <param name="type" value="all"/>
                </conditional>
                <param name="groupby" value="cell_type"/>
                <param name="log" value="False"/>
                <param name="use_raw" value="False"/>
                <param name="num_categories" value="7"/>
                <conditional name="figsize">
                    <param name="test" value="yes"/>
                    <param name="width" value="10" />
                    <param name="height" value="3"/>
                </conditional>
                <param name="dendrogram" value="True"/>
                <param name="swap_axes" value="True"/>
                <param name="show_gene_labels" value="False"/>
                <section name="matplotlib_pyplot_imshow">
                    <param name="cmap" value="YlGnBu"/>
                    <param name="interpolation" value="none"/>
                    <param name="origin" value="upper"/>
                </section>
            </conditional>
            <assert_stdout>
                <has_text_matching expression="sc.pl.heatmap"/>
                <has_text_matching expression="var_names=adata.var_names" />
                <has_text_matching expression="groupby='cell_type'"/>
                <has_text_matching expression="log=False"/>
                <has_text_matching expression="use_raw=False"/>
                <has_text_matching expression="num_categories=7"/>
                <has_text_matching expression="dendrogram=True"/>
                <has_text_matching expression="var_group_positions=None"/>
                <has_text_matching expression="var_group_labels=None"/>
                <has_text_matching expression="figsize=\(10, 3\)"/>
                <has_text_matching expression="swap_axes=True"/>
                <has_text_matching expression="show_gene_labels=False"/>
                <has_text_matching expression="interpolation='none'"/>
                <has_text_matching expression="cmap='YlGnBu'"/>
                <has_text_matching expression="origin='upper'"/>
            </assert_stdout>
            <output name="out_png" file="pl.heatmap.krumsiek11.png" ftype="png" compare="sim_size"/>
        </test>
        <test>
            <!-- test pl.dotplot !-->
            <conditional name="input">
                <param name="format" value="h5ad" />
                <param name="adata" value="pbmc68k_reduced.h5ad" />
            </conditional>
            <param name="format" value="png"/>
            <conditional name="method">
                <param name="method" value="pl.dotplot"/>
                <conditional name="var_names">
                    <param name="type" value="custom"/>
                    <param name="var_names" value="CD79A, MS4A1, CD8A, CD8B, LYZ, GNLY, NKG7, RP3-467N11.1, FCGR3A, FCER1A, CST3, POU2AF1, LINC00402"/>
                </conditional>
                <param name="groupby" value="louvain"/>
                <param name="log" value="False"/>
                <param name="use_raw" value="False"/>
                <param name="num_categories" value="7"/>
                <param name="dendrogram" value="True"/>
                <conditional name="figsize">
                    <param name="test" value="no"/>
                </conditional>
                <param name="dendrogram" value="False"/>
                <repeat name="var_group_positions">
                    <param name="start" value="0"/>
                    <param name="end" value="1"/>
                    <param name="label" value="B cells"/>
                </repeat>
                <repeat name="var_group_positions">
                    <param name="start" value="11"/>
                    <param name="end" value="12"/>
                    <param name="label" value="dendritic"/>
                </repeat>
                <param name="color_map" value="hot"/>
                <param name="dot_max" value="0.7"/>
                <param name="dot_min" value="0.1"/>
                <section name="matplotlib_pyplot_scatter">
                    <param name="linewidths" value="0" />
                    <param name="edgecolors" value="face"/>
                </section>
            </conditional>
            <assert_stdout>
                <has_text_matching expression="sc.pl.dotplot"/>
                <has_text_matching expression="var_names=\['CD79A', 'MS4A1', 'CD8A', 'CD8B', 'LYZ', 'GNLY', 'NKG7', 'RP3-467N11.1', 'FCGR3A', 'FCER1A', 'CST3', 'POU2AF1', 'LINC00402'\]" />
                <has_text_matching expression="groupby='louvain'"/>
                <has_text_matching expression="log=False"/>
                <has_text_matching expression="use_raw=False"/>
                <has_text_matching expression="num_categories=7"/>
                <has_text_matching expression="dendrogram=False"/>
                <has_text_matching expression="var_group_positions=\[\(0, 1\), \(11, 12\)\]"/>
                <has_text_matching expression="var_group_labels=\['B cells', 'dendritic'\]"/>
                <has_text_matching expression="color_map='hot'"/>
                <has_text_matching expression="dot_max=0.7"/>
                <has_text_matching expression="dot_min=0.1"/>
                <has_text_matching expression="linewidths=0.0"/>
                <has_text_matching expression="edgecolors='face'"/>
            </assert_stdout>
            <output name="out_png" file="pl.dotplot.krumsiek11.png" ftype="png" compare="sim_size"/>
        </test>
        <test>
            <!-- test pl.violin !-->
            <conditional name="input">
                <param name="format" value="h5ad" />
                <param name="adata" value="pbmc68k_reduced.h5ad" />
            </conditional>
            <param name="format" value="png"/>
            <conditional name="method">
                <param name="method" value="pl.violin"/>
                <conditional name="key_variables">
                    <param name="type" value="custom"/>
                    <param name="keys" value="n_genes, percent_mito, n_counts" />
                </conditional>
                <param name="log" value="False"/>
                <param name="use_raw" value="False"/>
                <section name="violin_plot">
                    <conditional name="stripplot">
                        <param name="stripplot" value="True"/>
                        <param name="jitter" value="True"/>
                        <param name="size" value="1"/>
                    </conditional>
                    <conditional name="multi_panel">
                        <param name="multi_panel" value="True"/>
                        <param name="width" value="20"/>
                        <param name="height" value="20"/>
                    </conditional>
                    <param name="scale" value="width"/>
                </section>
                <section name="seaborn_violinplot">
                    <param name="bw" value="scott"/>
                    <param name="linewidth" value="0"/>
                    <param name="color" value="AliceBlue"/>
                    <param name="palette" value="viridis"/>
                    <param name="saturation" value="0.75"/>
                </section>
            </conditional>
            <assert_stdout>
                <has_text_matching expression="sc.pl.violin"/>
                <has_text_matching expression="keys=\['n_genes', 'percent_mito', 'n_counts'\]" />
                <has_text_matching expression="log=False"/>
                <has_text_matching expression="use_raw=False"/>
                <has_text_matching expression="sstripplot=True"/>
                <has_text_matching expression="jitter=True"/>
                <has_text_matching expression="size=1"/>
                <has_text_matching expression="multi_panel=True"/>
                <has_text_matching expression="scale='width'"/>
                <has_text_matching expression="bw='scott'"/>
                <has_text_matching expression="scale='width'"/>
                <has_text_matching expression="linewidth=0.0"/>
                <has_text_matching expression="color='AliceBlue'"/>
                <has_text_matching expression="palette='viridis'"/>
                <has_text_matching expression="saturation=0.75"/>
            </assert_stdout>
            <output name="out_png" file="pl.violin.pbmc68k_reduced_custom.png" ftype="png" compare="sim_size"/>
        </test>
        <test>
            <!-- test pl.matrixplot !-->
            <conditional name="input">
                <param name="format" value="h5ad" />
                <param name="adata" value="krumsiek11.h5ad" />
            </conditional>
            <param name="format" value="png"/>
            <conditional name="method">
                <param name="method" value="pl.matrixplot"/>
                <conditional name="var_names">
                    <param name="type" value="all"/>
                </conditional>
                <param name="groupby" value="cell_type"/>
                <param name="log" value="False"/>
                <param name="use_raw" value="False"/>
                <param name="num_categories" value="7"/>
                <param name="dendrogram" value="True"/>
                <conditional name="figsize">
                    <param name="test" value="no"/>
                </conditional>
                <param name="swap_axes" value="True"/>
                <section name="matplotlib_pyplot_pcolor">
                    <param name="cmap" value="viridis"/>
                    <param name="edgecolors" value="face"/>
                    <param name="snap" value="False"/>
                </section>
            </conditional>
            <assert_stdout>
                <has_text_matching expression="sc.pl.matrixplot"/>
                <has_text_matching expression="var_names=adata.var_names" />
                <has_text_matching expression="groupby='cell_type'"/>
                <has_text_matching expression="log=False"/>
                <has_text_matching expression="use_raw=False"/>
                <has_text_matching expression="num_categories=7"/>
                <has_text_matching expression="dendrogram=True"/>
                <has_text_matching expression="var_group_positions=None"/>
                <has_text_matching expression="var_group_labels=None"/>
                <has_text_matching expression="swap_axes=True"/>
                <has_text_matching expression="cmap='viridis'"/>
                <has_text_matching expression="edgecolors='face'"/>
                <has_text_matching expression="snap=False"/>
            </assert_stdout>
            <output name="out_png" file="pl.matrixplot.krumsiek11.png" ftype="png" compare="sim_size"/>
        </test>
        <test>
            <!-- test pl.clustermap !-->
            <conditional name="input">
                <param name="format" value="h5ad" />
                <param name="adata" value="krumsiek11.h5ad" />
            </conditional>
            <param name="format" value="png"/>
            <conditional name="method">
                <param name="method" value="pl.clustermap"/>
                <param name="obs_keys" value="cell_type"/>
                <param name="use_raw" value="False"/>
                <section name="seaborn_clustermap">
                    <param name="method" value="single"/>
                    <param name="metric" value="braycurtis"/>
                    <param name="z_score" value="None"/>
                    <param name="standard_scale" value="None"/>
                    <param name="col_cluster" value="False"/>
                    <param name="row_cluster" value="False"/>
                </section>
            </conditional>
            <assert_stdout>
                <has_text_matching expression="sc.pl.clustermap"/>
                <has_text_matching expression="adata=adata" />
                <has_text_matching expression="obs_keys='cell_type'" />
                <has_text_matching expression="use_raw=False"/>
                <has_text_matching expression="method='single'"/>
                <has_text_matching expression="metric='braycurtis'"/>
                <has_text_matching expression="z_score=None"/>
                <has_text_matching expression="standard_scale=None"/>
                <has_text_matching expression="col_cluster=False"/>
                <has_text_matching expression="row_cluster=False"/>
            </assert_stdout>
            <output name="out_png" file="pl.clustermap.krumsiek11.png" ftype="png" compare="sim_size"/>
        </test>
        <test>
            <!-- test pl.highest_expr_genes !-->
            <conditional name="input">
                <param name="format" value="h5ad" />
                <param name="adata" value="pp.filter_genes_dispersion.krumsiek11-seurat.h5ad" />
            </conditional>
            <param name="format" value="png"/>
            <conditional name="method">
                <param name="method" value="pl.highest_expr_genes"/>
                <param name="n_top" value="30"/>
                <param name="gene_symbols" value="means"/>
                <section name="setseaborn_boxplot">
                    <param name="color" value="blue"/>
                    <param name="saturation" value="0.5"/>
                </section>
            </conditional>
            <assert_stdout>
                <has_text_matching expression="sc.pl.highest_expr_genes"/>
                <has_text_matching expression="n_top=30" />
                <has_text_matching expression="gene_symbols='means'" />
                <has_text_matching expression="color='blue'"/>
                <has_text_matching expression="saturation=0.5"/>
            </assert_stdout>
            <output name="out_png" file="pl.highest_expr_genes.filter_genes_dispersion.krumsiek11-seurat.png" ftype="png" compare="sim_size"/>
        </test>
        <test>
            <!-- test pl.pca !-->
            <conditional name="input">
                <param name="format" value="h5ad" />
                <param name="adata" value="pbmc68k_reduced.h5ad" />
            </conditional>
            <param name="format" value="pdf"/>
            <conditional name="method">
                <param name="method" value="pl.pca"/>
                <param name="color" value="CD3D,CD79A"/>
                <param name="use_raw" value="False"/>
                <param name="sort_order" value="True"/>
                <section name="plot">
                    <repeat name="components">
                        <param name="axis1" value="1"/>
                        <param name="axis2" value="2"/>
                    </repeat>
                    <repeat name="components">
                        <param name="axis1" value="1"/>
                        <param name="axis2" value="3"/>
                    </repeat>
                    <param name="projection" value="2d"/>
                    <param name="legend_loc" value="right margin"/>
                    <param name="legend_fontsize" value="1"/>
                    <param name="legend_fontweight" value="normal"/>
                    <param name="size" value="1"/>
                    <param name="palette" value="viridis"/>
                    <param name="frameon" value="True"/>
                    <param name="ncols" value="2"/>
                    <param name="wspace" value="0.1"/>
                    <param name="hspace" value="0.25"/>
                </section>
                <section name="matplotlib_pyplot_scatter">
                    <param name="linewidths" value="0"/>
                    <param name="edgecolors" value="face"/>
                </section>
            </conditional>
            <assert_stdout>
                <has_text_matching expression="sc.pl.pca"/>
                <has_text_matching expression="save='.pdf'" />
                <has_text_matching expression="color=\['CD3D', 'CD79A'\]" />
                <has_text_matching expression="use_raw=False" />
                <has_text_matching expression="sort_order=True" />
                <has_text_matching expression="groups=None" />
                <has_text_matching expression="components=\['1,2', '1,3'\]" />
                <has_text_matching expression="projection='2d'" />
                <has_text_matching expression="legend_loc='right margin'" />
                <has_text_matching expression="legend_fontsize=1" />
                <has_text_matching expression="legend_fontweight='normal'" />
                <has_text_matching expression="size=1.0" />
                <has_text_matching expression="palette='viridis'" />
                <has_text_matching expression="frameon=True" />
                <has_text_matching expression="ncols=2" />
                <has_text_matching expression="wspace=0.1" />
                <has_text_matching expression="hspace=0.25" />
                <has_text_matching expression="linewidths=0.0" />
                <has_text_matching expression="edgecolors='face" />
            </assert_stdout>
            <output name="out_pdf" file="pl.pca.pbmc68k_reduced.CD3D_CD79A_components_2d.pdf" ftype="pdf" compare="sim_size"/>
        </test>
        <test>
            <!-- test pl.pca_loadings !-->
            <conditional name="input">
                <param name="format" value="h5ad" />
                <param name="adata" value="pp.pca.krumsiek11.h5ad" />
            </conditional>
            <param name="format" value="png"/>
            <conditional name="method">
                <param name="method" value="pl.pca_loadings"/>
                <param name="components" value="1,2,3"/>
            </conditional>
            <assert_stdout>
                <has_text_matching expression="sc.pl.pca_loadings"/>
                <has_text_matching expression="components=\[1, 2, 3\]" />
            </assert_stdout>
            <output name="out_png" file="pl.pca_loadings.pp.pca.krumsiek11.png"/>
        </test>
        <test>
            <!-- test pl.pca_variance_ratio !-->
            <conditional name="input">
                <param name="format" value="h5ad" />
                <param name="adata" value="pp.pca.krumsiek11.h5ad" />
            </conditional>
            <param name="format" value="png"/>
            <conditional name="method">
                <param name="method" value="pl.pca_variance_ratio"/>
                <param name="n_pcs" value="5"/>
                <param name="log" value="False"/>
            </conditional>
            <assert_stdout>
                <has_text_matching expression="sc.pl.pca_variance_ratio"/>
                <has_text_matching expression="n_pcs=5" />
                <has_text_matching expression="log=False" />
            </assert_stdout>
            <output name="out_png" file="pl.pca_variance_ratio.pp.pca.krumsiek11.png"/>
        </test>
        <test>
            <!-- test pl.pca_overview !-->
            <conditional name="input">
                <param name="format" value="h5ad" />
                <param name="adata" value="pp.pca.krumsiek11.h5ad" />
            </conditional>
            <param name="format" value="png"/>
            <conditional name="method">
                <param name="method" value="pl.pca_overview"/>
                <param name="color" value="cell_type"/>
                <param name="use_raw" value="False"/>
                <param name="sort_order" value="True"/>
                <section name="plot">
                    <param name="projection" value="3d"/>
                    <param name="legend_loc" value="right margin"/>
                    <param name="legend_fontsize" value="1"/>
                    <param name="legend_fontweight" value="normal"/>
                    <param name="size" value="1"/>
                    <param name="palette" value="viridis"/>
                    <param name="frameon" value="True"/>
                    <param name="ncols" value="4"/>
                    <param name="wspace" value="0.1"/>
                    <param name="hspace" value="0.25"/>
                </section>
                <section name="matplotlib_pyplot_scatter">
                    <param name="linewidths" value="0"/>
                    <param name="edgecolors" value="face"/>
                    <param name="vmin" value="-5"/>
                    <param name="vmax" value="5"/>
                    <param name="edgecolors" value="face"/>
                </section>
            </conditional>
            <assert_stdout>
                <has_text_matching expression="sc.pl.pca_overview"/>
                <has_text_matching expression="color=\['cell_type'\]"/>
                <has_text_matching expression="use_raw=False"/>
                <has_text_matching expression="sort_order=True"/>
                <has_text_matching expression="groups=None"/>
                <has_text_matching expression="components=None"/>
                <has_text_matching expression="projection='3d'"/>
                <has_text_matching expression="legend_loc='right margin'"/>
                <has_text_matching expression="legend_fontsize=1"/>
                <has_text_matching expression="legend_fontweight='normal'"/>
                <has_text_matching expression="size=1.0"/>
                <has_text_matching expression="palette='viridis'"/>
                <has_text_matching expression="frameon=True"/>
                <has_text_matching expression="ncols=4"/>
                <has_text_matching expression="wspace=0.1"/>
                <has_text_matching expression="hspace=0.25"/>
                <has_text_matching expression="vmin=-5.0"/>
                <has_text_matching expression="vmax=5.0"/>
                <has_text_matching expression="linewidths=0.0"/>
                <has_text_matching expression="edgecolors='face'"/>
            </assert_stdout>
            <output name="out_png" file="pl.pca_overview.pp.pca.krumsiek11.png" compare="sim_size"/>
        </test>
        <test>
            <!-- test pl.tsne !-->
            <conditional name="input">
                <param name="format" value="h5ad" />
                <param name="adata" value="tl.tsne.krumsiek11.h5ad" />
            </conditional>
            <param name="format" value="png"/>
            <conditional name="method">
                <param name="method" value="pl.tsne"/>
                <param name="use_raw" value="False"/>
                <conditional name="edges">
                    <param name="edges" value="False" />
                </conditional>
                <param name="arrows" value="False" />
                <param name="sort_order" value="True"/>
                <section name="plot">
                    <param name="projection" value="2d"/>
                    <param name="legend_loc" value="right margin"/>
                    <param name="legend_fontsize" value="1"/>
                    <param name="legend_fontweight" value="normal"/>
                    <param name="palette" value="viridis"/>
                    <param name="frameon" value="True"/>
                    <param name="size" value="1"/>
                    <param name="ncols" value="4"/>
                    <param name="wspace" value="0.1"/>
                    <param name="hspace" value="0.25"/>
                </section>
                <section name="matplotlib_pyplot_scatter">
                    <param name="linewidths" value="0"/>
                    <param name="edgecolors" value="face"/>
                </section>
            </conditional>
            <assert_stdout>
                <has_text_matching expression="sc.pl.tsne"/>
                <has_text_matching expression="color=None"/>
                <has_text_matching expression="use_raw=False"/>
                <has_text_matching expression="edges=False"/>
                <has_text_matching expression="arrows=False"/>
                <has_text_matching expression="sort_order=True"/>
                <has_text_matching expression="groups=None"/>
                <has_text_matching expression="components=None"/>
                <has_text_matching expression="projection='2d'"/>
                <has_text_matching expression="legend_loc='right margin'"/>
                <has_text_matching expression="legend_fontsize=1"/>
                <has_text_matching expression="legend_fontweight='normal'"/>
                <has_text_matching expression="size=1.0"/>
                <has_text_matching expression="palette='viridis'"/>
                <has_text_matching expression="frameon=True"/>
                <has_text_matching expression="ncols=4"/>
                <has_text_matching expression="wspace=0.1"/>
                <has_text_matching expression="hspace=0.25"/>
                <has_text_matching expression="linewidths=0.0"/>
                <has_text_matching expression="edgecolors='face'"/>
            </assert_stdout>
            <output name="out_png" file="pl.tsne.krumsiek11.png" ftype="png" compare="sim_size"/>
        </test>
        <test>
            <!-- test pl.umap !-->
            <conditional name="input">
                <param name="format" value="h5ad" />
                <param name="adata" value="tl.umap.neighbors_umap_euclidean.recipe_weinreb17.paul15_subsample.h5ad" />
            </conditional>
            <param name="format" value="png"/>
            <conditional name="method">
                <param name="method" value="pl.umap"/>
                <param name="color" value="paul15_clusters"/>
                <param name="use_raw" value="False"/>
                <conditional name="edges">
                    <param name="edges" value="True" />
                    <param name="edges_width" value="0.1" />
                    <param name="edges_color" value="AliceBlue"/>
                </conditional>
                <param name="arrows" value="False" />
                <section name="plot">
                    <param name="projection" value="2d"/>
                    <param name="legend_loc" value="right margin"/>
                    <param name="legend_fontsize" value="1"/>
                    <param name="legend_fontweight" value="normal"/>
                    <param name="size" value="1"/>
                    <param name="palette" value="viridis"/>
                    <param name="frameon" value="True"/>
                    <param name="ncols" value="4"/>
                    <param name="wspace" value="0.1"/>
                    <param name="hspace" value="0.25"/>
                </section>
                <section name="matplotlib_pyplot_scatter">
                    <param name="linewidths" value="0"/>
                    <param name="edgecolors" value="face"/>
                </section>
            </conditional>
            <assert_stdout>
                <has_text_matching expression="sc.pl.umap"/>
                <has_text_matching expression="color=\['paul15_clusters'\]"/>
                <has_text_matching expression="use_raw=False"/>
                <has_text_matching expression="edges=True"/>
                <has_text_matching expression="edges_width=0.1"/>
                <has_text_matching expression="edges_color='AliceBlue'"/>
                <has_text_matching expression="arrows=False"/>
                <has_text_matching expression="sort_order=True"/>
                <has_text_matching expression="groups=None"/>
                <has_text_matching expression="components=None"/>
                <has_text_matching expression="projection='2d'"/>
                <has_text_matching expression="legend_loc='right margin'"/>
                <has_text_matching expression="legend_fontsize=1"/>
                <has_text_matching expression="legend_fontweight='normal'"/>
                <has_text_matching expression="size=1.0"/>
                <has_text_matching expression="palette='viridis'"/>
                <has_text_matching expression="frameon=True"/>
                <has_text_matching expression="ncols=4"/>
                <has_text_matching expression="wspace=0.1"/>
                <has_text_matching expression="hspace=0.25"/>
                <has_text_matching expression="linewidths=0.0"/>
                <has_text_matching expression="edgecolors='face'"/>
            </assert_stdout>
            <output name="out_png" file="pl.umap.neighbors_umap_euclidean.recipe_weinreb17.paul15_subsample.png" ftype="png" compare="sim_size"/>
        </test>
        <test>
            <!-- test pl.diffmap !-->
            <conditional name="input">
                <param name="format" value="h5ad" />
                <param name="adata" value="tl.diffmap.neighbors_gauss_braycurtis.recipe_weinreb17.paul15_subsample.h5ad" />
            </conditional>
            <param name="format" value="png"/>
            <conditional name="method">
                <param name="method" value="pl.diffmap"/>
                <param name="color" value="paul15_clusters"/>
                <param name="use_raw" value="False"/>
                <param name="sort_order" value="True"/>
                <section name="plot">
                    <param name="projection" value="2d"/>
                    <param name="legend_loc" value="right margin"/>
                    <param name="legend_fontsize" value="1"/>
                    <param name="legend_fontweight" value="normal"/>
                    <param name="size" value="1"/>
                    <param name="palette" value="viridis"/>
                    <param name="frameon" value="True"/>
                    <param name="ncols" value="4"/>
                    <param name="wspace" value="0.1"/>
                    <param name="hspace" value="0.25"/>
                </section>
                <section name="matplotlib_pyplot_scatter">
                    <param name="linewidths" value="0"/>
                    <param name="edgecolors" value="face"/>
                </section>
            </conditional>
            <assert_stdout>
                <has_text_matching expression="sc.pl.diffmap"/>
                <has_text_matching expression="color=\['paul15_clusters'\]"/>
                <has_text_matching expression="use_raw=False"/>
                <has_text_matching expression="sort_order=True"/>
                <has_text_matching expression="groups=None"/>
                <has_text_matching expression="components=None"/>
                <has_text_matching expression="projection='2d'"/>
                <has_text_matching expression="legend_loc='right margin'"/>
                <has_text_matching expression="legend_fontsize=1"/>
                <has_text_matching expression="legend_fontweight='normal'"/>
                <has_text_matching expression="size=1.0"/>
                <has_text_matching expression="palette='viridis'"/>
                <has_text_matching expression="frameon=True"/>
                <has_text_matching expression="ncols=4"/>
                <has_text_matching expression="wspace=0.1"/>
                <has_text_matching expression="hspace=0.25"/>
                <has_text_matching expression="linewidths=0.0"/>
                <has_text_matching expression="edgecolors='face'"/>
            </assert_stdout>
            <output name="out_png" file="pl.diffmap.neighbors_gauss_braycurtis.recipe_weinreb17.paul15_subsample.png" ftype="png" compare="sim_size"/>
        </test>
        <!--<test>
            < test pl.dpt_groups_pseudotime >
            <conditional name="input">
                <param name="format" value="h5ad" />
                <param name="adata" value="tl.dpt.diffmap.neighbors_gauss_braycurtis.recipe_weinreb17.paul15_subsample.h5ad" />
            </conditional>
            <param name="format" value="png"/>
            <conditional name="method">
                <param name="method" value="pl.dpt_groups_pseudotime"/>
                <param name="color_map" value="viridis"/>
            </conditional>
            <assert_stdout>
                <has_text_matching expression="sc.pl.dpt_groups_pseudotime"/>
                <has_text_matching expression="color_map='viridis'"/>
            </assert_stdout>
            <output name="out_png" file="pl.dpt_groups_pseudotime.dpt.diffmap.neighbors_gauss_braycurtis.recipe_weinreb17.paul15_subsample.png" ftype="png" compare="sim_size"/>
        </test>!-->
        <test>
            <!-- test pl.dpt_timeseries !-->
            <conditional name="input">
                <param name="format" value="h5ad" />
                <param name="adata" value="tl.dpt.diffmap.neighbors_gauss_braycurtis.recipe_weinreb17.paul15_subsample.h5ad" />
            </conditional>
            <param name="format" value="png"/>
            <conditional name="method">
                <param name="method" value="pl.dpt_timeseries"/>
                <conditional name="heatmap">
                    <param name="as_heatmap" value="True"/>
                    <param name="color_map" value="viridis"/>
                </conditional>
            </conditional>
            <assert_stdout>
                <has_text_matching expression="sc.pl.dpt_timeseries"/>
                <has_text_matching expression="color_map='viridis'"/>
                <has_text_matching expression="as_heatmap=True"/>
            </assert_stdout>
            <output name="out_png" file="pl.dpt_timeseries.dpt.diffmap.neighbors_gauss_braycurtis.recipe_weinreb17.paul15_subsample.png" ftype="png" compare="sim_size"/>
        </test>
        <!--<test>
             test pl.paga
            <conditional name="input">
                <param name="format" value="h5ad" />
                <param name="adata" value="tl.paga.neighbors.paul15_gauss_braycurtis.h5ad" />
            </conditional>
            <param name="format" value="png"/>
            <conditional name="method">
                <param name="method" value="pl.paga"/>
                <param name="threshold" value="0.01"/>
                <param name="color" value="paul15_clusters"/>
                <param name="labels" value="label" />
                <param name="layout" value="fr"/>
                <param name="random_state" value="0"/>
                <param name="solid_edges" value="connectivities"/>
                <param name="single_component" value="False"/>
                <param name="fontsize" value="1"/>
                <param name="node_size_scale" value="1.0"/>
                <param name="node_size_power" value="0.5"/>
                <param name="edge_width_scale" value="5"/>
                <param name="arrowsize" value="30"/>
                <param name="normalize_to_color" value="False"/>
                <param name="cmap" value="viridis"/>
                <param name="frameon" value="True"/>
            </conditional>
            <output name="out_png" file="pl.paga.paul15_gauss_braycurtis.png" ftype="png" compare="sim_size"/>
        </test>!-->
    </tests>
    <help><![CDATA[
Generic: Scatter plot along observations or variables axes (`pl.scatter`)
=========================================================================

Color the plot using annotations of observations (`.obs`), variables
(`.var`) or expression of genes (`.var_names`).

More details on the `scanpy documentation
<https://scanpy.readthedocs.io/en/latest/api/scanpy.pl.scatter.html>`__

Generic: Heatmap of the expression values of set of genes (`pl.heatmap`)
========================================================================

If `groupby` is given, the heatmap is ordered by the respective group. For
example, a list of marker genes can be plotted, ordered by clustering. If
the `groupby` observation annotation is not categorical the observation
annotation is turned into a categorical by binning the data into the number
specified in `num_categories`.

More details on the `scanpy documentation
<https://scanpy.readthedocs.io/en/latest/api/scanpy.pl.heatmap.html>`__

Generic: Makes a dot plot of the expression values (`pl.dotplot`)
=================================================================

For each var_name and each `groupby` category a dot is plotted. Each dot
represents two values: mean expression within each category (visualized by
color) and fraction of cells expressing the var_name in the
category. (visualized by the size of the dot).  If groupby is not given, the
dotplot assumes that all data belongs to a single category. A gene is not
considered expressed if the expression value in the adata (or adata.raw) is
equal to zero.

For instance, for each marker gene, the mean value and the percentage of cells
expressing the gene can be visualized for each cluster.

More details on the `scanpy documentation
<https://scanpy.readthedocs.io/en/latest/api/scanpy.pl.dotplot.html>`__

Generic: Violin plot (`pl.violin`)
==================================

Wraps `seaborn.violinplot` for `anndata.AnnData`.

More details on the `scanpy documentation
<https://scanpy.readthedocs.io/en/latest/api/scanpy.pl.stacked_violin.html>`__

Generic: Heatmap of the mean expression values per cluster (`pl.matrixplot`)
============================================================================

Creates a heatmap of the mean expression values per cluster of each var_names

If groupby is not given, the matrixplot assumes that all data belongs to a single
category.

More details on the `scanpy documentation
<https://scanpy.readthedocs.io/en/latest/api/scanpy.pl.matrixplot.html>`__

Generic: Hierarchically-clustered heatmap (`pl.clustermap`)
===========================================================

Wraps `seaborn.clustermap
<https://seaborn.pydata.org/generated/seaborn.clustermap.html>`__ for
`anndata.AnnData`.

The returned object has a savefig() method that should be used if you want
to save the figure object without clipping the dendrograms.

To access the reordered row indices, use:
clustergrid.dendrogram_row.reordered_ind

Column indices, use: clustergrid.dendrogram_col.reordered_ind

More details on the `scanpy documentation
<https://scanpy.readthedocs.io/en/latest/api/scanpy.pl.clustermap.html>`__

Preprocessing: Plot the fraction of counts assigned to each gene over all cells (`pl.highest_expr_genes`)
=========================================================================================================

Computes, for each gene, the fraction of counts assigned to that gene within
a cell. The `n_top` genes with the highest mean fraction over all cells are
plotted as boxplots.

This plot is similar to the `scater` package function `plotHighestExprs(type= "highest-expression")`, see `here
<https://bioconductor.org/packages/devel/bioc/vignettes/scater/inst/doc/vignette-qc.html>`__.
-- Davis McCarthy and Aaron Lun

More details on the `scanpy documentation
<https://scanpy.readthedocs.io/en/latest/api/scanpy.pl.highest_expr_genes.html>`__

PCA: Scatter plot in PCA coordinates (`pl.pca`)
===============================================

More details on the `scanpy documentation
<https://scanpy.readthedocs.io/en/latest/api/scanpy.pl.pca.html>`__

PCA: Rank genes according to contributions to PCs (`pl.pca_loadings`)
=====================================================================

More details on the `scanpy documentation
<https://scanpy.readthedocs.io/en/latest/api/scanpy.pl.pca_loadings.html>`__

PCA: Plot the variance ratio (`pl.pca_variance_ratio`)
======================================================

More details on the `scanpy documentation
<https://scanpy.readthedocs.io/en/latest/api/scanpy.pl.pca_variance_ratio.html>`__

PCA: Plot PCA results (`pl.pca_overview`)
=========================================

The parameters are the ones of the scatter plot. Call pca_ranking separately
if you want to change the default settings.

More details on the `scanpy documentation
<https://scanpy.readthedocs.io/en/latest/api/scanpy.pl.pca_overview.html>`__

Embedding: Scatter plot in tSNE basis (`pl.tsne`)
=================================================

More details on the `scanpy documentation
<https://scanpy.readthedocs.io/en/latest/api/scanpy.pl.tsne.html>`__

Embeddings: Scatter plot in UMAP basis (`pl.umap`)
==================================================

More details on the `scanpy documentation
<https://scanpy.readthedocs.io/en/latest/api/scanpy.pl.umap.html>`__

Embeddings: Scatter plot in Diffusion Map basis (`pl.diffmap`)
==============================================================

More details on the `scanpy documentation
<https://scanpy.readthedocs.io/en/latest/api/scanpy.pl.diffmap.html>`__

Branching trajectories and pseudotime, clustering: Plot groups and pseudotime (`pl.dpt_groups_pseudotime`)
===========================================================================================================

More details on the `scanpy documentation
<https://scanpy.readthedocs.io/en/latest/api/scanpy.pl.dpt_groups_pseudotime.html>`__

Branching trajectories and pseudotime, clustering: Heatmap of pseudotime series (`pl.dpt_timeseries`)
=====================================================================================================

More details on the `scanpy documentation
<https://scanpy.readthedocs.io/en/latest/api/scanpy.pl.dpt_timeseries.html>`__


Branching trajectories and pseudotime, clustering: Plot the abstracted graph through thresholding low-connectivity edges (`pl.paga`)
====================================================================================================================================

This uses ForceAtlas2 or igraph's layout algorithms for most layouts.

When initializing the positions, note that - for some reason - igraph
mirrors coordinates along the x axis... that is, you should increase the
`maxiter` parameter by 1 if the layout is flipped.

More details on the `scanpy documentation
<https://scanpy.readthedocs.io/en/latest/api/scanpy.pl.paga.html>`__


    ]]></help>
    <expand macro="citations"/>
</tool>