0
|
1 <tool id="metascreenPre" name="mscreen: pre-experimental" version="0.2.0">
|
|
2 <description>Pre-experimental setup of drug combination screens</description>
|
|
3 <command detect_errors="aggressive"><![CDATA[
|
|
4 ln -s $input_data.list_of_drugs "$input_data.list_of_drugs.element_identifier" &&
|
|
5 #set drugs_csv = './' + str($input_data.list_of_drugs.element_identifier)
|
|
6
|
|
7 ln -s $input_data.list_of_volumes "$input_data.list_of_volumes.element_identifier" &&
|
|
8 #set volumes_csv = './' + str($input_data.list_of_volumes.element_identifier)
|
|
9
|
|
10 ln -s $input_data.list_of_doses "$input_data.list_of_doses.element_identifier" &&
|
|
11 #set doses_csv = './' + str($input_data.list_of_doses.element_identifier)
|
|
12
|
|
13 ln -s $input_data.list_of_ctrls "$input_data.list_of_ctrls.element_identifier" &&
|
|
14 #set ctrls_csv = './' + str($input_data.list_of_ctrls.element_identifier)
|
|
15
|
|
16 ln -s $input_data.list_of_stock_cons "$input_data.list_of_stock_cons.element_identifier" &&
|
|
17 #set stock_cons_csv = './' + str($input_data.list_of_stock_cons.element_identifier)
|
|
18
|
|
19 #for $pmap in $input_data.platemaps
|
|
20 ln -s '$pmap' '$pmap.element_identifier';
|
|
21 #end for
|
|
22
|
|
23
|
|
24 #set excluded_well_ids_file = ''
|
|
25 #if $dispensing_options.well_exclusion.exclude_wells
|
|
26 echo $dispensing_options.well_exclusion.well_ids | sed 's/__cn__/\n/g' > excl_well_ids.csv &&
|
|
27 #set excluded_well_ids_file = './excl_well_ids.csv'
|
|
28 #end if
|
|
29
|
|
30 R -e 'suppressPackageStartupMessages(library(metascreen));
|
|
31
|
|
32 custom_excluded_wells = NULL;
|
|
33 #if $excluded_well_ids_file
|
|
34 custom_excluded_wells = read.csv(
|
|
35 "$excluded_well_ids_file", stringsAsFactors = F, header = F);
|
|
36 custom_excluded_wells = custom_excluded_wells[[1]];
|
|
37 #end if
|
|
38
|
|
39 list_of_drugs_raw <- read.csv(
|
|
40 file = "$drugs_csv",
|
|
41 check.names = FALSE,
|
|
42 na.strings = "",
|
|
43 dec = ".", encoding = "UTF-8");
|
|
44 list_of_volumes_raw <- read.csv(
|
|
45 file = "$volumes_csv",
|
|
46 check.names = FALSE,
|
|
47 na.strings = "",
|
|
48 dec = ".", encoding = "UTF-8");
|
|
49 list_of_doses_raw <- read.csv(
|
|
50 file = "$doses_csv",
|
|
51 check.names = FALSE,
|
|
52 na.strings = "",
|
|
53 dec = ".", encoding = "UTF-8");
|
|
54 list_of_controls_raw <- read.csv(
|
|
55 file = "$ctrls_csv",
|
|
56 check.names = FALSE,
|
|
57 na.strings = "",
|
|
58 dec = ".", encoding = "UTF-8");
|
|
59 list_of_stock_cons_raw <- read.csv(
|
|
60 file = "$stock_cons_csv",
|
|
61 check.names = FALSE,
|
|
62 na.strings = "",
|
|
63 dec = ".", encoding = "UTF-8");
|
|
64
|
|
65 listofDoses <-
|
|
66 metascreen::generateListofDoses(
|
|
67 list_of_doses_raw,
|
|
68 .dropCol = TRUE);
|
|
69
|
|
70
|
|
71 sourcePlate = data.frame();
|
|
72 #for $pmap in $input_data.platemaps
|
|
73
|
|
74 sourcePlate = dplyr::bind_rows(
|
|
75 sourcePlate,
|
|
76 metascreen::importPlateMap(
|
|
77 "$pmap.element_identifier",
|
|
78 .fileFormat = "PlateMap",
|
|
79 galaxy = TRUE,
|
|
80 .sourcePlateConv = $input_data.convert_platemap_format
|
|
81 )
|
|
82 );
|
|
83 #end for
|
|
84
|
|
85 combine_doses = c(1:min(unique(table(listofDoses[,"Drug"]))));
|
|
86 exclude_outer_wells = FALSE;
|
|
87
|
|
88 #if $dispensing_options.well_exclusion.exclude_wells
|
|
89 exclude_outer_wells = $dispensing_options.well_exclusion.outer_wells;
|
|
90 #end if
|
|
91
|
|
92 #if $combination_options.combo_design.type_combination == "all"
|
|
93 #if $combination_options.combo_design.inner_dosing
|
|
94 combine_doses = c(2:(min(unique(table(listofDoses[,"Drug"])))-1));
|
|
95 #end if
|
|
96 #end if
|
|
97
|
|
98 add_untreated = NULL;
|
|
99 #if $dispensing_options.add_untreated.untreated
|
|
100 add_untreated = list(
|
|
101 name = "$dispensing_options.add_untreated.untreated_name",
|
|
102 replicates = $dispensing_options.add_untreated.untreated_replicates);
|
|
103 #end if
|
|
104
|
|
105
|
|
106 listofExWells <-
|
|
107 metascreen::excludeWells(
|
|
108 plateType = $input_data.plateformat,
|
|
109 wells = custom_excluded_wells,
|
|
110 outer.wells = exclude_outer_wells);
|
|
111
|
|
112
|
|
113 listofCombinations <-
|
|
114 metascreen::combineDrugs(
|
|
115 listofDoses,
|
|
116 .combineDoses = combine_doses,
|
|
117 .noReplicates = $combination_options.num_replicates,
|
|
118 .drugRepAttrib = "$combination_options.combo_design.type_combination");
|
|
119
|
|
120
|
|
121 dispensingData <-
|
|
122 metascreen::generateDispensingData(
|
|
123 listofCombinations,
|
|
124 list_of_drugs_raw,
|
|
125 listofDoses,
|
|
126 list_of_volumes_raw,
|
|
127 list_of_controls_raw,
|
|
128 list_of_stock_cons_raw,
|
|
129 sourcePlate,
|
|
130 listofExWells,
|
|
131 .ctrlReplicates = $dispensing_options.num_control_replicates,
|
|
132 .addUntreated = add_untreated,
|
|
133 .finalWellVolume = $dispensing_options.well_volume,
|
|
134 .plateFormat = $input_data.plateformat,
|
|
135 .destinationPlateID = "$dispensing_options.dest_plate_ID",
|
|
136 .randomizeDispensing = $dispensing_options.randomise_dispensing,
|
|
137 .probeDispensing = $dispensing_options.probe_dispensing);
|
|
138
|
|
139 df = as.data.frame(dispensingData[["output"]]);
|
|
140 readr::write_tsv(listofCombinations,file="$doseComb",col_names=T, quote="none");
|
|
141 readr::write_tsv(df,file="$dispensingDF", col_names = T, quote = "none");' 2>&1
|
|
142
|
|
143 ]]></command>
|
|
144 <inputs>
|
|
145
|
|
146 <section name="input_data" title="User-defined input files - see below for strict formatting requirements" expanded="true">
|
|
147 <param name="list_of_doses" type="data" format="txt" label="List of drug doses (CSV)" multiple="false"/>
|
|
148 <param name="list_of_drugs" type="data" format="txt" label="List of drugs (CSV)" multiple="false"/>
|
|
149 <param name="list_of_volumes" type="data" format="txt" label="List of volumes (CSV)" multiple="false"/>
|
|
150 <param name="list_of_ctrls" type="data" format="txt" label="List of controls (CSV)" multiple="false"/>
|
|
151 <param name="list_of_stock_cons" type="data" format="txt" label="List of stock concentrations (CSV)" multiple="false"/>
|
|
152 <param name="platemaps" type="data" format="xml" label="PlateMap file (XML)" multiple="true"/>
|
|
153 <param name="convert_platemap_format" type="boolean" label="Convert platemap to a source plate format" truevalue="T" falsevalue="F" checked="false"/>
|
|
154 <param name="plateformat" type="select" label="Plate format" display="radio" multiple="false">
|
|
155 <option value="6">6</option>
|
|
156 <option value="12">12</option>
|
|
157 <option value="24">24</option>
|
|
158 <option value="48">48</option>
|
|
159 <option value="96">96</option>
|
|
160 <option value="384">384</option>
|
|
161 <option value="1536">1536</option>
|
|
162 </param>
|
|
163 </section>
|
|
164
|
|
165 <section name="combination_options" title="Options - drug combination design" expanded="true">
|
|
166 <conditional name="combo_design">
|
|
167 <param name="type_combination" type="select" display="radio" multiple="false" label="Type of dose combinations">
|
|
168 <option value="all">All - both single treatments and combination treatments</option>
|
|
169 <option value="single">Single - only single treatments</option>
|
|
170 </param>
|
|
171 <when value="all">
|
|
172 <param name="inner_dosing" type="boolean" label="Exclude lowest and highest dose (inner dosing only)" truevalue="T" falsevalue="F" checked="false"/>
|
|
173 </when>
|
|
174 </conditional>
|
|
175 <param type="integer" name="num_replicates" label="Number of replicates for each dose combination" value="3" min="1" max="20"/>
|
|
176 </section>
|
|
177 <section name="dispensing_options" title="Options - dispensing layout" expanded="true">
|
|
178 <conditional name="well_exclusion">
|
|
179 <param name="exclude_wells" type="boolean" label="Exclusion of wells" truevalue="T" falsevalue="F" checked="false"/>
|
|
180 <when value="T">
|
|
181 <param name="well_ids" type="text" label="Custom set of well identifiers to exclude (one per line):" area="true"/>
|
|
182 <param name="outer_wells" type="boolean" label="Exclude all outer wells" truevalue="T" falsevalue="F" checked="true"/>
|
|
183 </when>
|
|
184 </conditional>
|
|
185 <param name="num_control_replicates" type="integer" label="Number of control replicates" value="5" min="1" max="10"/>
|
|
186 <param name="well_volume" type="integer" label="Final well volume" value="10" min="1" max="500"/>
|
|
187 <param name="randomise_dispensing" type="boolean" label="Randomise dispensing" truevalue="T" falsevalue="F" checked="true"/>
|
|
188 <param name="probe_dispensing" type="boolean" label="Probe dispensing" truevalue="T" falsevalue="F" checked="false"/>
|
|
189 <param name="dest_plate_ID" type="text" value="PLATE_012" label="A unique destination plate ID - for destination plate barcode"/>
|
|
190 <conditional name="add_untreated">
|
|
191 <param name="untreated" type="boolean" label="Add untreated" truevalue="T" falsevalue="F" checked="true"/>
|
|
192 <when value="T">
|
|
193 <param name="untreated_name" type="text" label="Identifier (name) for untreated" value="Untreated"/>
|
|
194 <param name="untreated_replicates" type="integer" label="Number of untreated replicates" value="5" min="1" max="500"/>
|
|
195 </when>
|
|
196 </conditional>
|
|
197
|
|
198 </section>
|
|
199 </inputs>
|
|
200 <outputs>
|
|
201 <!--data format="xlsx" name="output_xlsx" label="crisprFPA - xlsx"/-->
|
|
202 <data format="txt" name="doseComb" label="doseCombinations - tsv"/>
|
|
203 <data format="txt" name="dispensingDF" label="dispensingData - tsv"/>
|
|
204 </outputs>
|
|
205
|
|
206
|
|
207 <help><![CDATA[
|
|
208 .. class:: infomark
|
|
209
|
|
210 Limitations etc:
|
|
211
|
|
212 -----
|
|
213
|
|
214 **Dataset formats**
|
|
215
|
|
216 The input datasets are in text_ (CSV) format and in XML format. The output datasets are also in text_ formats.
|
|
217
|
|
218 .. _text: ${static_path}/formatHelp.html#text
|
|
219
|
|
220 Specific input file requirements:
|
|
221
|
|
222 - **List of drug doses** - `CSV <https://en.wikipedia.org/wiki/Comma-separated_values/>`_ file
|
|
223
|
|
224 Provides a list of all the doses for each drug used in
|
|
225 a drug sensitivity screen. The list needs to include a column with the drug number,
|
|
226 drug name, one or multiple columns for the doses, and a column with the unit.
|
|
227 ['Number', 'Drug', '6th Dose', ..., '1st Dose', 'Unit'].
|
|
228 An example is shown with https://raw.githubusercontent.com/Enserink-lab/metascreen/main/inst/extdata/library/listofdoses.csv
|
|
229
|
|
230 - **List of drugs.** - `CSV <https://en.wikipedia.org/wiki/Comma-separated_values/>`_ file
|
|
231
|
|
232 Provides a list of drugs used in the drug screen. The list
|
|
233 needs to include a column with a unique drug number / id for each drug, the
|
|
234 drug name and the CAS number. ['ID', 'NAME', 'CAS_NUMBER']. For custom
|
|
235 compunds without CAS number, include column, but leave field empty.
|
|
236 An example is shown with https://raw.githubusercontent.com/Enserink-lab/metascreen/main/inst/extdata/library/listofdrugs.csv
|
|
237
|
|
238 - **List of stock concentrations.** - A `CSV <https://en.wikipedia.org/wiki/Comma-separated_values/>`_ file
|
|
239
|
|
240 Provides a list of the stock concentrations
|
|
241 for each drug used in the drug screen. If the stock concentrations are not
|
|
242 known, use the highest dose. The list needs to include column with the unique
|
|
243 drug number / id, the drug name, the stock concentration and the concentration unit.
|
|
244 ['NUMBER', 'NAME', 'CONCENTRATION', 'UNIT'].
|
|
245 An example is shown with https://raw.githubusercontent.com/Enserink-lab/metascreen/main/inst/extdata/library/listofstockconcentrations.csv
|
|
246
|
|
247 - **List of controls.** - A `CSV <https://en.wikipedia.org/wiki/Comma-separated_values/>`_ file
|
|
248
|
|
249 Provides the controls to be used in a drug
|
|
250 screen. The list needs to include a column with the name, CAS number,
|
|
251 dose, unit, the source plate from which the control is dispensed from and the
|
|
252 volume. ['NAME', 'CAS_NUMBER', 'DOSE', 'UNIT', 'SOURCE_PLATE', 'VOLUME'].
|
|
253 An example is shown with https://raw.githubusercontent.com/Enserink-lab/metascreen/main/inst/extdata/library/listofctrls.csv
|
|
254
|
|
255 - **List of drug volumes.** - A `CSV <https://en.wikipedia.org/wiki/Comma-separated_values/>`_ file
|
|
256
|
|
257 Provides the volumes for each drug that
|
|
258 have been or will be dispensed. The list follows the same format as the
|
|
259 list of drug doses. The list needs to include a column with the drug number,
|
|
260 drug name, one or multiple columns with doses, and a column with the unit.
|
|
261 ['Number', 'Drug', 'Vol 6th Dose', ..., 'Vol 1st Dose', 'Unit'].
|
|
262 An example is shown with https://raw.githubusercontent.com/Enserink-lab/metascreen/main/inst/extdata/library/listofvolumes.csv
|
|
263
|
|
264
|
|
265 - **plateMap** - XML file (s)
|
|
266
|
|
267 One or more plate map files with the contents (usually compounds/drugs) of the
|
|
268 source plate from which drugs are dispensed from. Plate maps can currently be imported
|
|
269 using .PlateMap (XML files) provided by the IncuCyte® Plate Map Editor. **IMPORTANT: when uploading
|
|
270 PlateMap files to Galaxy, please make sure you denote file 'Type' as XML.**
|
|
271
|
|
272 An example is shown with https://github.com/Enserink-lab/metascreen/blob/main/inst/extdata/library/C008.PlateMap
|
|
273
|
|
274 -----
|
|
275
|
|
276 **What it does**
|
|
277
|
|
278 The *pre-experimental* modules of metascreen is intended to serve the following purposes:
|
|
279
|
|
280 allowing to set-up a drug combination screens by (a) generating drug combinations from a list of drugs and
|
|
281 (b) distributing those drug combinations across a number of experimental plates. (c) generating instructions
|
|
282 for dispensing robots for the creation of those experimental plates.
|
|
283
|
|
284
|
|
285
|
|
286
|
|
287
|
|
288
|
|
289 ]]>
|
|
290 </help>
|
|
291
|
|
292 </tool>
|