comparison FlowSOMMApIndividualFCS.xml @ 0:e796ed5dfd02 draft

"planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flowsom_cross_comp commit 2f04d23cb47d9b233d159c54ff406e56c87746e0"
author azomics
date Tue, 23 Jun 2020 19:49:33 -0400
parents
children a1054bd1060a
comparison
equal deleted inserted replaced
-1:000000000000 0:e796ed5dfd02
1 <tool id="flowsom_cross_comp" name="Map individual FCS to reference SOM" version="1.0">
2 <description>using FlowSOM.</description>
3 <requirements>
4 <requirement type="package" version="1.8.0">bioconductor-flowsom</requirement>
5 </requirements>
6 <stdio>
7 <exit_code range="10" level="fatal" description="Please provide valid input files (FCS or flowFrame)." />
8 <exit_code range="11" level="fatal" description="Please provide a valid reference SOM tree." />
9 <exit_code range="12" level="fatal" description="Input files should all be in the same format." />
10 <exit_code range="13" level="fatal" description="There are inconsistencies in marker names between FCS files." />
11 <exit_code range="14" level="fatal" description="FCS file and reference tree markers are inconsistent." />
12 </stdio>
13 <command><![CDATA[
14 Rscript $__tool_directory__/FlowSOMMApIndividualFCS.R '${reftree}' 'newDataOutput' '${cluster}' '${tablecontent}' '${mfi}' '${stats}' '${mfistats}' '${allstats}'
15 #if $plot == "TRUE"
16 'newDataTrees'
17 #end if
18 #if $mplot == "TRUE"
19 'newDataMarkers'
20 #end if
21 #for $f in $input
22 '${f}' '${f.name}'
23 #end for
24 ]]>
25 </command>
26 <inputs>
27 <param format="fcs, flowframe" name="input" type="data_collection" collection_type="list" label="FCS files or flowFrames Collection"/>
28 <param format="fsom" name="reftree" type="data" label="Reference SOM tree"/>
29 <param name="tablecontent" type="select" label="Associate each event to SOM clusters or meta-clusters?">
30 <option value="FlowSOM">FlowSOM Clusters</option>
31 <option value="meta">Meta-Clusters</option>
32 </param>
33 <param name="cluster" type="integer" value="10" optional="true" label="Number of expected metaclusters" help="By default, the number of expected metaclusters is set to 10" />
34 <param name="plot" type="boolean" label="Plot SOM Tree?" checked="false" truevalue="TRUE" falsevalue="FALSE" />
35 <param name="mplot" type="boolean" label="Plot individual marker trees?" checked="false" truevalue="TRUE" falsevalue="FALSE" />
36 <param name="mfi" type="select" label="Calculate centroids using:">
37 <option value="mfi" selected="true">Mean Fluorescence Intensity</option>
38 <option value="mdfi">Median Fluorescence Intensity</option>
39 <option value="gmfi">Geometric Mean Fluorescence Intensity</option>
40 </param>
41 </inputs>
42 <outputs>
43 <collection type="list" label="Mapping of ${input.name} to ${reftree.name}" name="output">
44 <discover_datasets pattern="(?P&lt;name&gt;.*)" directory="newDataOutput" format="flowclr" />
45 </collection>
46 <data format="flowstat1" name="stats" label="${tablecontent} cluster distribution in ${input.name}"/>
47 <data format="flowstat2" name="mfistats" label="${tablecontent} cluster ${mfi} centroids in ${input.name}"/>
48 <data format="flowstat3" name="allstats" label="${tablecontent} cluster descriptive stats of ${input.name}"/>
49 <collection type="list" label="Tree representations of mapping ${input.name} to ${reftree.name}" name="trees">
50 <discover_datasets pattern="(?P&lt;name&gt;.*)" directory="newDataTrees" format="png" />
51 <filter>(plot)</filter>
52 </collection>
53 <collection type="list" label="Marker trees from mapping ${input.name} to ${reftree.name}" name="mtrees">
54 <discover_datasets pattern="(?P&lt;name&gt;.*)" directory="newDataMarkers" format="pdf" />
55 <filter>(mplot)</filter>
56 </collection>
57 </outputs>
58 <tests>
59 <test>
60 <param name="input">
61 <collection type="list">
62 <element name="input1.flowframe" value="input1.flowframe"/>
63 <element name="input2.flowframe" value="input2.flowframe"/>
64 <element name="input3.flowframe" value="input3.flowframe"/>
65 </collection>
66 </param>
67 <param name="reftree" value="input.fsom"/>
68 <param name="tablecontent" value="meta"/>
69 <param name="cluster" value="10"/>
70 <param name="plot" value="FALSE"/>
71 <param name="mplot" value="FALSE"/>
72 <param name="mfi" value="mfi"/>
73 <output name="stats" file="out1.flowstat1" compare="sim_size"/>
74 <output name="mfistats" file="out1.flowstat2" compare="sim_size"/>
75 <output name="allstats" file="out1.flowstat3" compare="sim_size"/>
76 <output_collection name="output" type="list" count="3">
77 <element name="input1.flowframe_clustered.flowclr" file="run1/input1.flowclr" compare="sim_size"/>
78 <element name="input2.flowframe_clustered.flowclr" file="run1/input2.flowclr" compare="sim_size"/>
79 <element name="input3.flowframe_clustered.flowclr" file="run1/input3.flowclr" compare="sim_size"/>
80 </output_collection>
81 </test>
82 <test>
83 <param name="input">
84 <collection type="list">
85 <element name="input1.fcs" value="input1.fcs"/>
86 <element name="input2.fcs" value="input2.fcs"/>
87 <element name="input3.fcs" value="input3.fcs"/>
88 </collection>
89 </param>
90 <param name="reftree" value="input.fsom"/>
91 <param name="tablecontent" value="FlowSOM"/>
92 <param name="cluster" value="10"/>
93 <param name="plot" value="TRUE"/>
94 <param name="mplot" value="TRUE"/>
95 <param name="mfi" value="mfi"/>
96 <output name="stats" file="out2.flowstat1" compare="sim_size"/>
97 <output name="mfistats" file="out2.flowstat2" compare="sim_size"/>
98 <output name="allstats" file="out2.flowstat3" compare="sim_size"/>
99 <output_collection name="output" type="list" count="3">
100 <element name="input1.fcs_clustered.flowclr" file="run2/input1.flowclr" compare="sim_size"/>
101 <element name="input2.fcs_clustered.flowclr" file="run2/input2.flowclr" compare="sim_size"/>
102 <element name="input3.fcs_clustered.flowclr" file="run2/input3.flowclr" compare="sim_size"/>
103 </output_collection>
104 <output_collection name="trees" type="list" count="3">
105 <element name="input1.fcs_tree.png" file="run2/input1.png" compare="sim_size"/>
106 <element name="input2.fcs_tree.png" file="run2/input2.png" compare="sim_size"/>
107 <element name="input3.fcs_tree.png" file="run2/input3.png" compare="sim_size"/>
108 </output_collection>
109 <output_collection name="mtrees" type="list" count="3">
110 <element name="input1.fcs_marker_plots.pdf" file="run2/input1.pdf" compare="sim_size" delta="100000"/>
111 <element name="input2.fcs_marker_plots.pdf" file="run2/input2.pdf" compare="sim_size" delta="100000"/>
112 <element name="input3.fcs_marker_plots.pdf" file="run2/input3.pdf" compare="sim_size" delta="100000"/>
113 </output_collection>
114 </test>
115 </tests>
116 <help><![CDATA[
117 Map fcs samples to SOM
118 -------------------
119
120 This tool uses FlowSOM to compare individual FCS or flowframes to a SOM reference tree.
121
122 **Input**
123
124 This tool compares FCS files or flowframes from a data collection to the reference Self-Organizing Map generated by a FlowSOM run. The same data collection merged and run with FlowSOM should ideally be used to ensure consistency in the attribution of events to clusters or meta-clusters.
125
126 .. class:: infomark
127
128 The option chosen for the centroids (mean, median or geometric mean) is used to generate descriptive statistics.
129
130 **Output**
131
132 Each individual FCS files or flowframe from the input collection is mapped to the reference tree, and a table mapping events to FlowSOM clusters or meta-clusters is generated for each. Two sets of plots can be optionally generated, one representing the resulting SOM Trees, and the other displaying each marker's contribution to the trees. The text files can be used as input for vizualisation tools. A table of the custer or meta-cluster composition of each file is generated as well as MFI and population descriptive statistics.
133
134 -----
135
136 **Example**
137
138 *Input*::
139
140 - FCS files or flowFrame (binary formats)
141 - FlowSOM tree (binary format)
142
143 *Output* for each text file - fluorescence intensities per marker and cluster ID per event::
144
145 Marker1 Marker2 Marker3 ... Population
146 33 47 11 ... 1
147 31 64 11 ... 6
148 21 62 99 ... 2
149 14 34 60 ... 7
150 ... ... ... ... ...
151
152 *Summary table* - distribution of events in each population in each file::
153
154 Filename SampleName Pop1 Pop2 Pop3 ...
155 File1 Biosample1 0.1 0.25 0.14 ...
156 File2 Biosample2 0.02 0.1 0.17 ...
157 File3 Biosample3 0.4 0.05 0.21 ...
158 File4 Biosample4 0.05 0.3 0.08 ...
159 ... ... ... ... ... ...
160
161 *Cluster MFI Summary table* - for each file, mean, median or geometric mean fluorescence intensities per marker per population::
162
163 Marker1 Marker2 Marker3 ... Population Percentage SampleName
164 154 885 24 ... 1 0.2 Biosample1
165 458 74 574 ... 2 0.3 Biosample1
166 3 210 86 ... 3 0.05 Biosample1
167 140 921 19 ... 1 0.1 Biosample2
168 428 79 508 ... 2 0.25 Biosample2
169 9 225 90 ... 3 0.3 Biosample2
170 ... ... ... ... ... ... ...
171
172 *Cluster 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::
173
174 Population Marker1_mean Marker1_median Marker1_stdev ... Percentage_mean Percentage_median Percentage_stdev
175 1 94.65 90.86 25.8 ... 1.84 0.55 2.48
176 2 132.18 131.58 5.02 ... 9.89 9.76 0.33
177 3 71.8 69.68 10.53 ... 3.02 1.49 3.45
178 4 84.85 84.85 nan ... 8.52 8.52 nan
179 5 161.82 132.77 61.29 ... 0.95 0.37 1.06
180 ... ... ... ... ... ... ... ...
181
182 *FlowSOM tree*:
183
184 .. image:: ./static/images/flowtools/tree_mapflowSOM.png
185
186 *Marker plots*:
187
188 .. image:: ./static/images/flowtools/flowSOM_marker.png
189 ]]>
190 </help>
191 <citations>
192 <citation type="doi">10.1002/cyto.a.22625</citation>
193 </citations>
194 </tool>