view seurat_find_clusters.xml @ 2:0715bcb14547 draft

planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/ commit bbe3c1f7fd8489951f2d90415fe80dd5cf961ca0
author ebi-gxa
date Fri, 10 Jul 2020 21:28:54 -0400
parents bdabb6af06e4
children 8ed848ef86fd
line wrap: on
line source

<tool id="seurat_find_clusters" name="Seurat FindClusters" version="@SEURAT_VERSION@+galaxy0">
    <description>find clusters of cells</description>
    <macros>
        <import>seurat_macros.xml</import>
    </macros>
    <expand macro="requirements" />
    <expand macro="version" />
    <command detect_errors="exit_code"><![CDATA[
        seurat-find-clusters.R

        @INPUT_OBJECT@
        @OUTPUT_OBJECT@
        --output-text-file output_tab

        #if str($adv.resolution):
          --resolution '$adv.resolution'
        #end if

        #if str($adv.algorithm):
          --algorithm '$adv.algorithm'
        #end if

        #if str($adv.modularity_fxn):
          --modularity-fxn '$adv.modularity_fxn'
        #end if

        #if str($adv.method):
          --method '$adv.method'
        #end if

        #if str($adv.graph_name):
          --graph-name '$adv.graph_name'
        #end if

        #if str($adv.nrandom_starts):
          --nrandom-starts '$adv.nrandom_starts'
        #end if

        $adv.group_singletons



  ## TODO add pdf support as optional
  ]]></command>

      <inputs>
        <expand macro="input_object_params"/>
        <expand macro="output_object_params"/>
          <section name="adv" title="Advanced Options">
            <param name="resolution" argument="--resolution" optional="true" type="float" label="Resolution" help="Value of the resolution parameter, use a value above (below) 1.0 if you want to obtain a larger (smaller) number of communities. Defaults to 0.8."/>
            <param name="algorithm" argument="--algorithm" optional="true" type="select" label="Modularity organization algorithm">
              <option value="1" selected="true">Louvain</option>
              <option value="2">Louvain algorithm with multilevel refinement</option>
              <option value="3">SLM algorithm</option>
              <option value="4">Leiden</option>
            </param>
            <param name="modularity_fxn" argument="--modularity-fxn" optional="true" type="select" label="Modularity function">
              <option value="1" selected="true">Standard</option>
              <option value="2">Alternative</option>
            </param>
            <param name="method" argument="--method" type="select" label="Method for Leiden" help="Method for leiden  (defaults to matrix which is fast for small datasets). Select iGraph to avoid casting large data to a dense matrix.">
              <option value="matrix" selected="true">Matrix</option>
              <option value="igraph">iGraph</option>
            </param>
            <param name="graph_name" argument="--graph-name" type="text" value="RNA_nn" label="Graph Name" help="Name of graph to use for the clustering algorith."/>
            <param name="nrandom_starts" argument="--nrandom-starts" type="integer" optional="true" label="Random starts" help="Number of random starts, 10 by default."/>
            <param name="group_singletons" argument="--group-singletons" type="boolean" truevalue="--group-singletons" falsevalue="" checked="false" label="Group singletons" help="Group singletons into nearest cluster. If FALSE, assign all singletons to a 'singleton' group."/>
            <param name="random_seed" argument="--random-seed" type="integer" optional="true" label="Random seed" help="Seed of the random number generator"/>
          </section>

      </inputs>
      <outputs>
          <!-- <data name="out_pdf" format="pdf" from_work_dir="out.pdf" label="${tool.name} on ${on_string}: Plots" /> -->
          <expand macro="output_files"/>
          <data name="output_tab" format="csv" from_work_dir="output_tab" label="${tool.name} on ${on_string}: CSV Seurat Clusters"/>
      </outputs>

    <tests>
        <!-- Ensure count matrix input works -->
        <test>
            <param name="input" ftype="rdata" value="out_runpca.rds"/>
            <output name="rds_seurat_file" ftype="rdata" value="out_findclust.rds" compare="sim_size"/>
        </test>
    </tests>
    <help><![CDATA[
.. class:: infomark

**What it does**

Identify clusters of cells by a shared nearest neighbor (SNN) modularity optimization
based clustering algorithm. First calculate k-nearest neighbors and construct t
he SNN graph (using Seurat find neighbours).
Then optimize the modularity function to determine clusters.
For a full description of the algorithms, see Waltman and van Eck (2013)
The European Physical Journal B.

@SEURAT_INTRO@

-----

**Inputs**

    * RDS object

-----

**Outputs**

    * Seurat RDS object

.. _Seurat: https://www.nature.com/articles/nbt.4096
.. _Satija Lab: https://satijalab.org/seurat/

@VERSION_HISTORY@

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