view scanpy-filter-genes.xml @ 0:d1b97a5d5a8d draft

planemo upload for repository commit 9bf9a6e46a330890be932f60d1d996dd166426c4
author ebi-gxa
date Wed, 03 Apr 2019 11:10:01 -0400
children 7aebd6265a97
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>
  <expand macro="requirements"/>
  <command detect_errors="exit_code"><![CDATA[
ln -s '${input_obj_file}' input.h5 &&
    -i input.h5
    -f '${input_format}'
    -o output.h5
    -F '${output_format}'
    #if $parameters
    #set pars = ','.join([str($p['name']) for $p in $parameters])
        -p '${pars}'
    #set mins = ','.join([str($p['min']) for $p in $parameters])
        -l '${mins}'
    #set maxs = ','.join([str($p['max']) for $p in $parameters])
        -j '${maxs}'
    #end if
    #if $subset
        -s '${subset}'
    #end if

    <expand macro="input_object_params"/>
    <expand macro="output_object_params"/>
    <repeat name="parameters" title="Parameters used to filter genes" min="1">
      <param name="name" type="text" value="n_cells" label="Name of parameter to filter on" help="for example n_cells or n_counts">
        <option value="n_cells">n_cells</option>
        <option value="n_counts">n_counts</option>
      <param name="min" type="float" value="0" min="0" label="Min value"/>
      <param name="max" type="float" value="1e9" label="Max value"/>
    <param name="subset" argument="--subset-list" type="data" format="tsv" optional="true" label="List of gene IDs or symbols"/>
    <expand macro="export_mtx_params"/>

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

      <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 name="parameters">
        <param name="name" value="n_counts"/>
        <param name="min" value="0"/>
        <param name="max" value="1e9"/>
      <output name="output_h5" file="filter_genes.h5" ftype="h5" compare="sim_size"/>

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.


  <expand macro="citations"/>