0
|
1 <tool id="flowAI" name="flowAI" version="1.0">
|
|
2 <description> automatic quality control </description>
|
|
3 <requirements>
|
|
4 <requirement type="package" version="3.3.0">r</requirement>
|
|
5 <requirement type="package" version="1.38.2">bioconductor-flowcore</requirement>
|
|
6 <requirement type="package" version="1.2.9">bioconductor-flowai</requirement>
|
|
7 </requirements>
|
|
8 <stdio>
|
|
9 <exit_code range="2:" level="fatal" description="See stderr for more details." />
|
|
10 </stdio>
|
|
11 <command><![CDATA[
|
|
12 Rscript --slave --vanilla $GALAXY_ROOT_DIR/tools/flowtools/FCSflowAI.R --args "${input}" "${remove}" $alphaFR $chremFS $outFS $penFS "${sideFM}" "${full_rep}" $highfcs $lowfcs $qcfcs
|
|
13 ]]>
|
|
14 </command>
|
|
15 <inputs>
|
|
16 <param format="fcs" name="input" type="data" label="FCS file"/>
|
|
17 <param name="remove" type="select" label="Remove low quality cells from:">
|
|
18 <option value="all">Flow rate, Signal acquisition and Dynamic range</option>
|
|
19 <option value="FR_FS">Flow rate and Signal acquisition</option>
|
|
20 <option value="FR_FM">Flow rate and Dynamic range</option>
|
|
21 <option value="FS_FM">Signal acquisition and Dynamic range</option>
|
|
22 <option value="FR">Flow rate</option>
|
|
23 <option value="FS">Signal acquisition</option>
|
|
24 <option value="FM">Dynamic range</option>
|
|
25 </param>
|
|
26 <param name="alphaFR" type="float" label="Significance threshold for flow rate check:" value="0.01"/>
|
|
27 <param name="chremFS" type="boolean" checked="true" truevalue="TRUE" falsevalue="FALSE" label="Do you want to exclude the FSC and SSC parameters from the signal acquisition check?" help="The FSC and SSC parameters will not be taken into account for analysis but will not be removed."/>
|
|
28 <param name="outFS" type="boolean" checked="false" truevalue="TRUE" falsevalue="FALSE" label="Do you want to remove outliers before the signal acquisition check?"/>
|
|
29 <param name="penFS" type="integer" label="Stringency of signal acquisition check (higher tolerance with higher values):" value="200"/>
|
|
30 <param name="sideFM" type="select" label="Include in dynamic range check:">
|
|
31 <option value="both">Both limits</option>
|
|
32 <option value="upper">Upper limit only</option>
|
|
33 <option value="lower">Lower limit only</option>
|
|
34 </param>
|
|
35 <param name="highQ_FCS" type="boolean" checked="true" truevalue="TRUE" falsevalue="FALSE" label="Create FCS file with only high quality events?"/>
|
|
36 <param name="lowQ_FCS" type="boolean" checked="false" truevalue="TRUE" falsevalue="FALSE" label="Create FCS file with only low quality events?"/>
|
|
37 <param name="QC_FCS" type="boolean" checked="false" truevalue="TRUE" falsevalue="FALSE" label="Create FCS file with an additional parameter where low quality events have values higher than 10,000?"/>
|
|
38 </inputs>
|
|
39 <outputs>
|
|
40 <data format="html" name="full_rep" label="QC of ${input.name}">
|
|
41 </data>
|
|
42 <data format="fcs" name="highfcs" label="High quality events only from ${input.name}">
|
|
43 <filter>(highQ_FCS)</filter>
|
|
44 </data>
|
|
45 <data format="fcs" name="lowfcs" label="Low quality events only from ${input.name}">
|
|
46 <filter>(lowQ_FCS)</filter>
|
|
47 </data>
|
|
48 <data format="fcs" name="qcfcs" label="All events (low quality event marked up) from ${input.name}">
|
|
49 <filter>(QC_FCS)</filter>
|
|
50 </data>
|
|
51 </outputs>
|
|
52 <tests>
|
|
53 <test>
|
|
54 <param name="input" value="input.fcs"/>
|
|
55 <param name="remove" value="all"/>
|
|
56 <param name="alphaFR" value="0.01"/>
|
|
57 <param name="chremFS" value="TRUE"/>
|
|
58 <param name="outFS" value="FALSE"/>
|
|
59 <param name="penFS" value="200"/>
|
|
60 <param name="sideFM" value="both"/>
|
|
61 <param name="highQ_FCS" value="TRUE"/>
|
|
62 <param name="lowQ_FCS" value="FALSE"/>
|
|
63 <param name="QC_FCS" value="FALSE"/>
|
|
64 <output name="full_rep" file="std/QCreport.html" lines_diff="2"/>
|
|
65 <output name="highfcs" file="std/hqdata.fcs" compare="sim_size"/>
|
|
66 </test>
|
|
67 <test>
|
|
68 <param name="input" value="input.fcs"/>
|
|
69 <param name="remove" value="all"/>
|
|
70 <param name="alphaFR" value="0.01"/>
|
|
71 <param name="chremFS" value="TRUE"/>
|
|
72 <param name="outFS" value="FALSE"/>
|
|
73 <param name="penFS" value="200"/>
|
|
74 <param name="sideFM" value="both"/>
|
|
75 <param name="highQ_FCS" value="TRUE"/>
|
|
76 <param name="lowQ_FCS" value="TRUE"/>
|
|
77 <param name="QC_FCS" value="TRUE"/>
|
|
78 <output name="full_rep" file="std/QCreport.html" lines_diff="2"/>
|
|
79 <output name="highfcs" file="std/hqdata.fcs" compare="sim_size"/>
|
|
80 <output name="lowfcs" file="std/lqdata.fcs" compare="sim_size"/>
|
|
81 <output name="qcfcs" file="std/alldata.fcs" compare="sim_size"/>
|
|
82 </test>
|
|
83 <test>
|
|
84 <param name="input" value="input.fcs"/>
|
|
85 <param name="remove" value="all"/>
|
|
86 <param name="alphaFR" value="0.01"/>
|
|
87 <param name="chremFS" value="TRUE"/>
|
|
88 <param name="outFS" value="TRUE"/>
|
|
89 <param name="penFS" value="200"/>
|
|
90 <param name="sideFM" value="both"/>
|
|
91 <param name="highQ_FCS" value="TRUE"/>
|
|
92 <param name="lowQ_FCS" value="FALSE"/>
|
|
93 <param name="QC_FCS" value="FALSE"/>
|
|
94 <output name="full_rep" file="nooutliers/QCreport_nooutliers.html" lines_diff="2"/>
|
|
95 <output name="highfcs" file="nooutliers/hqdata_nooutliers.fcs" compare="sim_size"/>
|
|
96 </test>
|
|
97 <test>
|
|
98 <param name="input" value="input.fcs"/>
|
|
99 <param name="remove" value="all"/>
|
|
100 <param name="alphaFR" value="0.01"/>
|
|
101 <param name="chremFS" value="FALSE"/>
|
|
102 <param name="outFS" value="FALSE"/>
|
|
103 <param name="penFS" value="200"/>
|
|
104 <param name="sideFM" value="both"/>
|
|
105 <param name="highQ_FCS" value="TRUE"/>
|
|
106 <param name="lowQ_FCS" value="FALSE"/>
|
|
107 <param name="QC_FCS" value="FALSE"/>
|
|
108 <output name="full_rep" file="withsfsc/QCreport_sfsc.html" lines_diff="2"/>
|
|
109 <output name="highfcs" file="withsfsc/hqdata_sfsc.fcs" compare="sim_size"/>
|
|
110 </test>
|
|
111 </tests>
|
|
112 <help><![CDATA[
|
|
113 This tool automatically performs quality control of flow cytometry data.
|
|
114
|
|
115 -----
|
|
116
|
|
117 **Input files**
|
|
118
|
|
119 • One or more FCS files.
|
|
120
|
|
121 **Output files**
|
|
122
|
|
123 • full HTML report
|
|
124 • new FCS file containing only high quality events (default)
|
|
125 • new FCS file containing only low quality events (optional)
|
|
126 • original FCS file containing an additional parameter where the low quality events have a value higher than 10,000 (optional)
|
|
127
|
|
128
|
|
129 The files generated will be FCS 3.0.
|
|
130
|
|
131 ----
|
|
132
|
|
133 Description of the approach
|
|
134 '''''''''''''''''''''''''''
|
|
135 This tool identifies anomalies from three fundamental properties of flow cytometry data:
|
|
136
|
|
137 - *Flow rate*. Surges and substantial shifts of the rate of the cells passing through the capillary tube are detected.
|
|
138
|
|
139 - *Signal acquisition*. Instability in the signal acquired for each channel are detected. In most cases it corresponds to flow rate surges and shifts.
|
|
140
|
|
141 - *Dynamic range*. Values recorded in the upper limit (margin events) and negative outliers are removed.
|
|
142
|
|
143 .. class:: infomark
|
|
144
|
|
145 An HTML report with informative plots is generated. Users are advised to review the report and also::
|
|
146
|
|
147 1. Eventually adjust the quality control parameters
|
|
148 2. Discard the entire FCS file because of an unacceptable number of anomalies
|
|
149 3. Program a flow cytometry maintenance because of recurrent issues
|
|
150
|
|
151
|
|
152 Parameters
|
|
153 ''''''''''
|
|
154 Default settings work well in the majority of cases. Setting customization may be needed to address properties of unique datasets. For example, high-dimensional FCS files may perform best with more tolerant setttings for signal acquisition checks.
|
|
155
|
|
156 Example
|
|
157 '''''''
|
|
158 This section provides an example of a flowAI quality control html report with plots:
|
|
159
|
|
160
|
|
161 Flow rate check: anomalies are flagged with a green circle. In this instance a surge was detected and discarded as well as a shift from the median value later in the experiment.
|
|
162
|
|
163 .. image:: static/images/autoflowrate.png
|
|
164
|
|
165 Signal acquistion check: Orange background (or yellow depending on the user's computer) highlights the stable region. Signal acquistion shifts are identified on a per channel basis and the largest region containing no anomalies is retained.
|
|
166
|
|
167 .. image:: static/images/autosignal.png
|
|
168
|
|
169 Dynamic range check: red and blue lines reflect the detected number of events over time. The x-axis corresponds to that of the signal acquisition plot.
|
|
170
|
|
171 .. image:: static/images/margins.png
|
|
172
|
|
173 ]]>
|
|
174 </help>
|
|
175 <citations>
|
|
176 <citation type="doi">10.1093/bioinformatics/btw191</citation>
|
|
177 </citations>
|
|
178 </tool>
|