view FlowSOMCompare.xml @ 1:33b8673272cf draft default tip

planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flowsom_compare commit bbff20e20dc2b9dbb40b613a0d5f16ee8132446d
author azomics
date Fri, 29 Sep 2023 07:19:42 +0000
parents bd35f3b66a1e
children
line wrap: on
line source

<tool id="flowsom_compare" name="Compare Samples" version="1.0+galaxy2">
  <description>using a FlowSOM tree</description>
  <requirements>
    <requirement type="package" version="1.18.0">bioconductor-flowsom</requirement>
    <requirement type="package" version="0.0.1">mscorefonts</requirement>
  </requirements>
  <stdio>
    <exit_code range="10" level="fatal" description="Please provide valid input FCS files." />
    <exit_code range="11" level="fatal" description="Please provide a valid reference SOM tree." />
    <exit_code range="12" level="fatal" description="There are inconsistencies in markers and/or channels between FCS files." />
    <exit_code range="13" level="fatal" description="FCS file and reference tree markers and/or channels are inconsistent." />
    <exit_code range="14" level="fatal" description="Some FCS files are used more than once." />
  </stdio>
  <command><![CDATA[
    Rscript $__tool_directory__/FlowSOMCompare.R '${reftree}' '${groups}' '${plot}' '${thresh}'
  #if $count == "TRUE"
    'counts' '${count_out}'
  #end if
  #if $mean == "TRUE"
    'means' '${mean_out}'
  #end if
  #if $med == "TRUE"
    'medians' '${med_out}'
  #end if
  #if $prctg == "TRUE"
    'pctgs' '${p_out}'
  #end if
    '${name1}'
  #for $f in $group1
    '${f}' '${f.name}'
  #end for
    'DONE' '${name2}'
  #for $ff in $group2
    '${ff}' '${ff.name}'
  #end for
  ]]>
  </command>
  <inputs>
    <param format="fsom" name="reftree" type="data" label="FlowSOM Reference Tree"/>
    <param name="name1" value="Group 1" type="text" label="Label for first group of files" help="This label will be used in the output tables."/>
    <param format="fcs" name="group1" type="data_collection" collection_type="list" label="FCS files Collection"/>
    <param name="name2" value="Group 2" type="text" label="Label for second group of files" help="This label will be used in the output tables."/>
    <param format="fcs" name="group2" type="data_collection" collection_type="list" label="FCS files Collection"/>
    <param name="thresh" type="float" value="0.05" label="Wilcox-test threshold for differential"  help="By default, the threshold is set to 0.05" />
    <param name="count" type="boolean" label="Output counts of events in clusters for each file?" checked="false" truevalue="TRUE" falsevalue="FALSE" />
    <param name="prctg" type="boolean" label="Output proportions of events in clusters for each file?" checked="false" truevalue="TRUE" falsevalue="FALSE" />
    <param name="mean" type="boolean" label="Output means of proportions for each group?" checked="false" truevalue="TRUE" falsevalue="FALSE" />
    <param name="med" type="boolean" label="Output medians of proportions for each group?" checked="false" truevalue="TRUE" falsevalue="FALSE" />
  </inputs>
  <outputs>
    <data format="tabular" name="groups" label="Comparison of '${name1}' and '${name2}' to ${reftree.name}"/>
    <data format="pdf" name="plot" label="Plot of comparison of '${name1}' and '${name2}' to ${reftree.name}"/>
    <data format="tabular" name="count_out" label="Counts of events in samples of '${name1}' and '${name2}' in comparison to ${reftree.name}">
      <filter>(count)</filter>
    </data>
    <data format="tabular" name="med_out" label="Median of proportions of event in '${name1}' and '${name2}' in comparison to ${reftree.name}">
      <filter>(med)</filter>
    </data>
    <data format="tabular" name="mean_out" label="Means of proportions of events in '${name1}' and '${name2}' in comparison to ${reftree.name}">
      <filter>(mean)</filter>
    </data>
    <data format="tabular" name="p_out" label="Proportions of events in samples of '${name1}' and '${name2}' in comparison to ${reftree.name}">
      <filter>(prctg)</filter>
    </data>
  </outputs>
  <tests>
    <test>
      <param name="reftree" value="reftree.fsom"/>
      <param name="name1" value="Group 1"/>
      <param name="thresh" value="0.05"/>
      <param name="group1">
        <collection type="list">
          <element name="input1.fcs" value="input1.fcs"/>
        </collection>
      </param>
      <param name="name2" value="Group 2"/>
      <param name="group2">
        <collection type="list">
          <element name="input2.fcs" value="input2.fcs"/>
          <element name="input3.fcs" value="input3.fcs"/>
        </collection>
      </param>
      <param name="count" value="FALSE"/>
      <param name="mean" value="FALSE"/>
      <param name="med" value="FALSE"/>
      <param name="prctg" value="FALSE"/>
      <output name="groups" file="out1.tabular" compare="sim_size"/>
      <output name="plot" file="out1.pdf" compare="sim_size" delta="100000"/>
    </test>
    <test>
      <param name="reftree" value="reftree.fsom"/>
      <param name="name1" value="Group 1"/>
      <param name="thresh" value="0.05"/>
      <param name="group1">
        <collection type="list">
          <element name="input1.fcs" value="input1.fcs"/>
        </collection>
      </param>
      <param name="name2" value="Group 2"/>
      <param name="group2">
        <collection type="list">
          <element name="input2.fcs" value="input2.fcs"/>
          <element name="input3.fcs" value="input3.fcs"/>
        </collection>
      </param>
      <param name="count" value="TRUE"/>
      <param name="mean" value="TRUE"/>
      <param name="med" value="TRUE"/>
      <param name="prctg" value="TRUE"/>
      <output name="groups" file="out2.tabular" compare="sim_size"/>
      <output name="plot" file="out2.pdf" compare="sim_size" delta="100000"/>
      <output name="count_out" file="count.tabular" compare="sim_size"/>
      <output name="mean_out" file="mean.tabular" compare="sim_size"/>
      <output name="med_out" file="median.tabular" compare="sim_size"/>
      <output name="p_out" file="prop.tabular" compare="sim_size"/>
    </test>
  </tests>
  <help><![CDATA[
Compare sample
-------------------

This tool uses FlowSOM to compare two or more groups of files to a reference FlowSOM tree.

**Input**

This tool requires a reference FlowSOM tree, as well as two dataset collections of FCS files. Each group is compared to the reference tree. The statistical differential threshold is based on a Wilcox-test, with a p-value of 0.05 by default.

.. class:: infomark

If there is only one group to compare to the tree, the first set of FCS files should be the one used to generate the reference tree.

**Output**

This tool generates a table with groups attribution to each FlowSOM node, as well as a plot per comparison. Tables of counts, mean, median, proportion and normalized mean per node and files or groups are optionally produced.

-----

**Example**

*Output* - Node Table::

   Node Group1-Group2
   1    group1
   2    --
   3    group2
   4    group1
   ...  ...

*Output* - Counts of events in file per node Table::

   Filename filename1 filename2 filename3 filename4 ...
   Group    group1    group1    group2    group2    ...
   1        17        2230      18        5054      ...
   2        760       9         249       178       ...
   3        155       9         1337      4         ...
   4        53        2         1754      0         ...
   5        42        1739      140       1320      ...
   ...      ...       ...       ...       ...       ...

*Output* - Proportion of events in file per node Table::

   Filename filename1 filename2 filename3 filename4 ...
   Group    group1    group1    group2    group2    ...
   1        0.0002528 0.0346386 0.0003068 0.0905507 ...
   2        0.0113029 0.0001397 0.0042441 0.0031891 ...
   3        0.0023052 0.0001397 0.0227888 7.1666606 ...
   4        0.0007882 3.1066030 0.0298965 0.00017   ...
   5        0.0006246 0.0270119 0.0023862 0.2365714 ...
   ...      ...       ...       ...       ...       ...

*Output* - Means of proportions of events in group per node Table::

   Nodes group1  group2
   1     0.00025 0.01747
   2     0.01130 0.00219
   3     0.00230 0.01146
   4     0.00078 0.01496
   5     0.00062 0.01469
   ...   ...     ...

*Output* - Medians of proportions of events in group per node Table::

   Nodes group1  group2
   1     0.00025 0.01747
   2     0.01130 0.00219
   3     0.00230 0.01146
   4     0.00078 0.01496
   5     0.00062 0.01469
   ...   ...     ...

  ]]>
  </help>
  <citations>
    <citation type="doi">10.1002/cyto.a.22625</citation>
  </citations>
</tool>