view scanpy-plot-embedding.xml @ 6:49fe4e682059 draft

planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit d52bedbcef249117567014584058429525883ef7-dirty
author ebi-gxa
date Wed, 19 Feb 2020 11:52:20 -0500
parents 109cfa259d8b
children 452e0f19c2a2
line wrap: on
line source

<?xml version="1.0" encoding="utf-8"?>
<tool id="scanpy_plot_embed" name="Scanpy PlotEmbed" version="@TOOL_VERSION@+galaxy8" profile="@PROFILE@">
  <description>visualise cell embeddings</description>
  <macros>
    <import>scanpy_macros2.xml</import>
  </macros>
  <expand macro="requirements"/>
  <command detect_errors="exit_code"><![CDATA[
ln -s '${input_obj_file}' input.h5 &&
PYTHONIOENCODING=utf-8 scanpy-cli plot embed
    @INPUT_OPTS@
    --basis '${basis}'
    --color '${color_by}'
    ${use_raw}
    --legend-loc '${legend_loc}'
    --legend-fontsize '${legend_fontsize}'
#if $point_size
    --size ${point_size}
#end if
#if $gene_symbols_field
    --gene-symbols ${gene_symbols_field}
#end if
    @PLOT_OPTS@
]]></command>

  <inputs>
    <expand macro="input_object_params"/>
    <param name="basis" argument="--basis" type="text" label="Name of the embedding to plot"/>
    <param name="color_by" argument="--color" type="text" label="Color by attributes, comma separated texts">
      <sanitizer>
        <valid initial="string.printable"/>
      </sanitizer>
    </param>
    <param name="gene_symbols_field" argument="--gene-symbols" type="text" optional="true" label="Field for gene symbols" help="The field used in the AnnData object to store gene symbols, leave blank for the default (index), else a common value is 'gene_symbols'"/>
    <param name="use_raw" argument="--use-raw" type="boolean" checked="true" truevalue="--use-raw" falsevalue="--no-raw" label="Use raw attributes if present"/>
    <param name="legend_loc" argument="--legend-loc" type="select" label="Location of legend">
      <option value="right margin" selected="true">Right margin</option>
      <option value="on data">On data</option>
    </param>
    <param name="legend_fontsize" argument="--legend-fontsize" type="integer" value="15" label="Legend font size"/>
    <param name="point_size" argument="--size" type="integer" optional="true" label="Point size"
           help="Automatically determined if not specified."/>
    <expand macro="output_plot_params"/>
  </inputs>

  <outputs>
    <data name="output_png" format="png" from_work_dir="output.png" label="${tool.name} on ${on_string}: ${basis} embedding plot"/>
  </outputs>

  <tests>
    <test>
      <param name="input_obj_file" value="find_cluster.h5"/>
      <param name="input_format" value="anndata"/>
      <param name="color_by" value="louvain"/>
      <output name="output_png" file="run_tsne.png" ftype="png" compare="sim_size"/>
    </test>
  </tests>

  <help><![CDATA[
=============================================================
Plot embeddings of a given method of dimensionality reduction
=============================================================

It yields a scatter plot in png format, wherein cells are placed in space of
reduced dimensionality and coloured by attribute of choice.

Requires calculating the specified embeddings first. For example, to make
UMAP/TSNE plots, run `Scanpy RunUMAP`/`Scanpy RunTSNE` first, then enter
"umap"/"tsne" as the name of the embedding to plot here.

@HELP@

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