view scanpy-filter-genes.xml @ 1:7aebd6265a97 draft

"planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 4846776f55931e176f7e77af7c185ec6fec7d142"
author ebi-gxa
date Mon, 16 Sep 2019 08:15:32 -0400
parents d1b97a5d5a8d
children a797a810d7e9
line wrap: on
line source

<?xml version="1.0" encoding="utf-8"?>
<tool id="scanpy_filter_genes" name="Scanpy FilterGenes" version="@TOOL_VERSION@+galaxy1">
  <description>based on counts and numbers of cells expressed</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-filter-genes
#if $parameters
    #set pars = ' '.join(['--param {name} {min} {max}'.format(**$p) for $p in $parameters])
    ${pars}
#end if
#if $categories
    #set cats = ' '.join(['--category {name} {values}'.format(**$c) for $c in $categories])
    ${cats}
#end if
#if $subsets
    #set subs = ' '.join(['--subsets {name} {subset}'.format(**$s) for $c in $subsets])
    ${subs}
#end if
    @INPUT_OPTS@
    @OUTPUT_OPTS@
]]></command>

  <inputs>
    <expand macro="input_object_params"/>
    <expand macro="output_object_params"/>

    <repeat name="parameters" title="Parameters used to filter cells" min="1">
      <param name="name" type="text" value="n_cells" label="Name of parameter to filter on" help="for example n_genes or n_counts">
        <option value="n_cells">n_cells</option>
        <option value="gene:n_counts">n_counts</option>
      </param>
      <param name="min" type="float" min="0" value="0" label="Min value"/>
      <param name="max" type="float" min="0" value="1e9" label="Max value"/>
    </repeat>

    <repeat name="categories" title="Categories used to filter genes" min="0">
      <param name="name" type="text" value="" label="Name of the categorical variable to filter on"/>
      <param name="values" type="text" value="" label="Comma-separated values"/>
    </repeat>

    <repeat name="subsets" title="Subsets used to filter genes" min="0">
      <param name="name" type="text" value="" label="Name of the categorical variable to filter on"/>
      <param name="subset" type="data" format="tabular" label="List of values"/>
    </repeat>
    <expand macro="export_mtx_params"/>
  </inputs>

  <outputs>
    <data name="output_h5" format="h5" from_work_dir="output.h5" label="${tool.name} on ${on_string}: Filtered genes"/>
    <expand macro="export_mtx_outputs"/>
  </outputs>

  <tests>
    <test>
      <param name="input_obj_file" value="filter_cells.h5"/>
      <param name="input_format" value="anndata"/>
      <param name="output_format" value="anndata"/>
      <repeat name="parameters">
        <param name="name" value="n_cells"/>
        <param name="min" value="3"/>
        <param name="max" value="1e9"/>
      </repeat>
      <repeat name="parameters">
        <param name="name" value="gene:n_counts"/>
        <param name="min" value="0"/>
        <param name="max" value="1e9"/>
      </repeat>
      <output name="output_h5" file="filter_genes.h5" ftype="h5" compare="sim_size"/>
    </test>
  </tests>

  <help><![CDATA[
===================================================================
Filter genes based on number of cells or counts (`pp.filter_genes`)
===================================================================

Keep genes that have at least `min_counts` counts or are expressed in at
least `min_cells` cells or have at most `max_counts` counts or are expressed
in at most `max_cells` cells.

Only provide one of the optional parameters `min_counts`, `min_cells`,
`max_counts`, `max_cells` per call.


@HELP@

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