view runCrossSample.xml @ 4:e80b0f62ffb3 draft default tip

"planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/cross_sample commit e7eab2dca0c1f73f580362f61425a78d4c8892ce"
author azomics
date Wed, 29 Jul 2020 13:32:17 -0400
parents
children
line wrap: on
line source

<tool id="run_cross_sample" name="Run Cross Sample" version="1.1+galaxy0" profile="18.01">
  <description>using a Flow file that was run using FLOCK</description>
  <requirements>
    <requirement type="package" version="1.5.1">scipy</requirement>
    <requirement type="package" version="1.0.5">pandas</requirement>
    <requirement type="package" version="1.0">flock</requirement>
  </requirements>
  <stdio>
    <exit_code range="1" level="fatal"/>
    <exit_code range="2" level="fatal" description="Columns inconsistencies between files and centroids file. See stderr for more details." />
    <exit_code range="3:" level="fatal"/>
  </stdio>
  <command><![CDATA[
    python '$__tool_directory__/runCrossSample.py' -m '${centroid}' -s '${stats}' -S '${mfistats}' -a '${allstats}' -M '${mfi}' -o crossSampleOutputs
  #for $f in $input
    -i $f
    -n '${f.name}'
  #end for

  ]]>
  </command>
  <inputs>
    <param format="flowtext" name="input" type="data_collection" collection_type="list" label="Flowtext files Collection"/>
    <param format="flowmfi" name="centroid" type="data" label="Centroid file"/>
    <param name="mfi" type="select" label="Calculate centroids using:">
      <option value="mfi" selected="true">Mean Fluorescence Intensity</option>
      <option value="mdfi">Median Fluorescence Intensity</option>
      <option value="gmfi">Geometric Mean Fluorescence Intensity</option>
    </param>
  </inputs>
  <outputs>
    <collection type="list" label="CrossSample on ${input.name}" name="output">
        <discover_datasets pattern="(?P&lt;name&gt;.*)" directory="crossSampleOutputs" format="flowclr" />
    </collection>
    <data format="flowstat1" name="stats" label="Population distribution after CrossSample on ${input.name} using ${mfi}"/>
    <data format="flowstat2" name="mfistats" label="${mfi} centroids of CrossSample on ${input.name} using ${mfi}"/>
    <data format="flowstat3" name="allstats" label="${mfi} descriptive stats of CrossSample on ${input.name} using ${mfi}"/>
  </outputs>
  <tests>
    <test>
      <param name="input">
        <collection type="list">
          <element name="input1" value="input1.flowtext"/>
          <element name="input2" value="input2.flowtext"/>
          <element name="input3" value="input3.flowtext"/>
        </collection>
      </param>
      <param name="centroid" value="mfi.flowmfi"/>
      <param name="mfi" value="mfi"/>
      <output name="stats" file="out1.flowstat1" lines_diff="6"/>
      <output name="allstats" file="out1.flowstat3"/>
      <output name="mfistats" file="out1.flowstat2" compare="sim_size"/>
      <output_collection name="output" count="3">
        <element name="input1.flowtext.flowclr" file="run1/input1.flowtext.flowclr" compare="sim_size"/>
        <element name="input2.flowtext.flowclr" file="run1/input2.flowtext.flowclr" compare="sim_size"/>
        <element name="input3.flowtext.flowclr" file="run1/input3.flowtext.flowclr" compare="sim_size"/>
      </output_collection>
    </test>
    <test>
      <param name="input">
        <collection type="list">
          <element name="input1" value="input1.flowtext"/>
          <element name="input2" value="input2.flowtext"/>
          <element name="input3" value="input3.flowtext"/>
        </collection>
      </param>
      <param name="centroid" value="gmfi.flowmfi"/>
      <param name="mfi" value="gmfi"/>
      <output name="stats" file="out2.flowstat1" lines_diff="6"/>
      <output name="allstats" file="out2.flowstat3"/>
      <output name="mfistats" file="out2.flowstat2" compare="sim_size"/>
      <output_collection name="output" type="list" count="3">
        <element name="input1.flowtext.flowclr" file="run2/input1.flowtext.flowclr"/>
        <element name="input2.flowtext.flowclr" file="run2/input2.flowtext.flowclr"/>
        <element name="input3.flowtext.flowclr" file="run2/input3.flowtext.flowclr"/>
      </output_collection>
    </test>
  </tests>
  <help><![CDATA[
   This tool runs CrossSample using the MFI from FLOCK and text-converted FCS files.
-----
**Input**
This tool compares text-converted FCS files from a data collection to the MFI generated by a FLOCK run. The same data collection merged and run with FLOCK should be used to ensure consistency in the attribution of events to populations.
.. class:: infomark
The option chosen for the centroids (mean, median or geometric mean) should be the same as used to run FLOCK.
**Output**
Each event within each file of a dataset collection is attributed to a population depending on its intensity profile.
A table of the population composition of each file is generated as well as MFI and population descriptive statistics.
.. class:: infomark
Tip: If headers in each text-converted FCS file do not match those in the centroid file, the program will not run. Edit the input file using the Remove, rearrange and/or rename columns tool in the Flow Text File Tools section prior to Cross Sample analysis.
-----
**Example**
*Input* - fluorescence intensities per marker per event::
   Marker1 Marker2 Marker3 ...
   33      47      11      ...
   31      64      11      ...
   21      62      99      ...
   14      34      60      ...
   ...     ...     ...     ...
*Centroid file* - mean, geometric mean or median fluorescence intensity per marker per population::
   Population Marker1 Marker2 Marker3 ...
   1          38      49      10      ...
   2          21      63      100     ...
   3          31      52      45      ...
   4          11      78      25      ...
   ...        ...     ...     ...     ...
*Output* for each text file - fluorescence intensities per marker and population ID per event::
   Marker1 Marker2 Marker3 ... Population
   33      47      11      ... 1
   31      64      11      ... 6
   21      62      99      ... 2
   14      34      60      ... 7
   ...     ...     ...     ... ...
*Summary table* - distribution of events in each population in each file::
   Filename SampleName Pop1 Pop2 Pop3 ...
   File1    Biosample1 0.1  0.25 0.14 ...
   File2    Biosample2 0.02 0.1  0.17 ...
   File3    Biosample3 0.4  0.05 0.21 ...
   File4    Biosample4 0.05 0.3  0.08 ...
*Centroid MFI Summary table* - for each file, mean, median or geometric mean fluorescence intensities per marker per population::
   Marker1 Marker2 Marker3 ... Population Percentage SampleName
   154     885     24      ... 1          0.2        Biosample1
   458     74      574     ... 2          0.3        Biosample1
   3       210     86      ... 3          0.05       Biosample1
   ...     ...     ...     ... ...        ...        ...
   140     921     19      ... 1          0.1        Biosample2
   428     79      508     ... 2          0.25       Biosample2
   9       225     90      ... 3          0.3        Biosample2
   ...     ...     ...     ... ...        ...        ...
*MFI Descriptive Statistics table* - for the set of files, mean, median and standard deviation of each centroid per marker per population, as well as mean, median and standard deviation of the population's proportion::
   Population Marker1_mean Marker1_median Marker1_stdev ... Percentage_mean Percentage_median Percentage_stdev
   1          94.65        90.86          25.8          ... 1.84            0.55              2.48
   2          132.18       131.58         5.02          ... 9.89            9.76              0.33
   3          71.8         69.68          10.53         ... 3.02            1.49              3.45
   4          84.85        84.85          nan           ... 8.52            8.52              nan
   5          161.82       132.77         61.29         ... 0.95            0.37              1.06
   ...        ...          ...            ...           ... ...             ...               ...
  ]]>
  </help>
  <citations>
    <citation type="doi">10.1002/cyto.b.20554</citation>
    <citation type="doi">10.3389/fimmu.2012.00302</citation>
    <citation type="doi">10.1371/journal.pone.0038408</citation>
    <citation type="doi">10.1371/journal.ppat.1003076</citation>
    <citation type="doi">10.1016/j.clim.2012.12.003</citation>
    <citation type="doi">10.1038/srep02327</citation>
  </citations>
</tool>