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