0
|
1 <tool id="metascreenPost" name="metascreen: post-experimental" version="0.2.6">
|
|
2 <description>Consolidation of drug combination screens</description>
|
|
3 <requirements>
|
|
4 <container type="docker">sigven/metascreen:0.2.1</container>
|
|
5 </requirements>
|
|
6 <command detect_errors="aggressive"><![CDATA[
|
|
7
|
|
8 ln -f -s $input_data.barcode_reference "$input_data.barcode_reference.element_identifier" &&
|
|
9 #set barcode_reference_csv = './' + str($input_data.barcode_reference.element_identifier)
|
|
10
|
|
11 ln -f -s $input_data.dispensing_data "$input_data.dispensing_data.element_identifier" &&
|
|
12 #set dispensing_data_tsv = './' + str($input_data.dispensing_data.element_identifier)
|
|
13
|
|
14 #for $raw_assay_file in $input_data.assay_raw
|
|
15 ln -f -s '$raw_assay_file' '$raw_assay_file.element_identifier';
|
|
16 #end for
|
|
17
|
|
18 R -e 'suppressPackageStartupMessages(library(metascreen));
|
|
19
|
|
20 barcode_reference <- read.csv(
|
|
21 file = "$barcode_reference_csv",
|
|
22 check.names = FALSE,
|
|
23 colClasses = c("PlateID"="character"),
|
|
24 na.strings = "",
|
|
25 encoding = "UTF-8");
|
|
26
|
|
27 dispData <- as.data.frame(
|
|
28 readr::read_tsv(
|
|
29 file = "$dispensing_data_tsv",
|
|
30 col_names = TRUE, show_col_types = FALSE
|
|
31 )
|
|
32 );
|
|
33
|
|
34 dispData[,"Plate.Number"] <-
|
|
35 as.factor(dispData[,"Plate.Number"]);
|
|
36 dispData[,"Combination.ID"] <-
|
|
37 as.integer(dispData[,"Combination.ID"]);
|
|
38
|
|
39 rfs = list();
|
|
40 #for $raw_assay_file in $input_data.assay_raw
|
|
41
|
|
42 rfs = append(
|
|
43 rfs,
|
|
44 metascreen::readRAWData(
|
|
45 .readfrom = "$raw_assay_file.element_identifier",
|
|
46 .format = "$input_data.assay_format"
|
|
47 )
|
|
48 );
|
|
49 #end for
|
|
50
|
|
51 names(rfs) <- stringr::str_replace(names(rfs),".csv","");
|
|
52
|
|
53 clData <- metascreen::consolidateData(
|
|
54 dispensingData = dispData,
|
|
55 rawMeasurements = rfs,
|
|
56 .barcodeReference = barcode_reference);
|
|
57
|
|
58
|
|
59 df = as.data.frame(clData[["consolidated"]]);
|
|
60 readr::write_tsv(
|
|
61 df, file="$consolidatedData", col_names=T, quote="none");' 2>&1
|
|
62
|
|
63 ]]></command>
|
|
64 <inputs>
|
|
65
|
|
66 <section name="input_data" title="User-defined input files - see below for formatting requirements" expanded="true">
|
|
67 <param name="barcode_reference" type="data" format="txt" label="Barcode reference (CSV)" multiple="false"/>
|
|
68 <param name="dispensing_data" type="data" format="txt" label="Dispensing data (TSV)" multiple="false"/>
|
|
69 <param name="assay_raw" type="data" format="txt" label="Raw assay measurement data (CSV)" multiple="true"/>
|
|
70 <!--param name="convert_platemap_format" type="boolean" label="Convert platemap to a source plate format" truevalue="T" falsevalue="F" checked="false"/-->
|
|
71 <param name="assay_format" type="select" label="Assay measurement format" display="radio" multiple="false">
|
|
72 <option value="EnVision">EnVision</option>
|
|
73 <option value="raw">raw</option>
|
|
74 <option value="VICTOR">VICTOR</option>
|
|
75 </param>
|
|
76 </section>
|
|
77
|
|
78 </inputs>
|
|
79 <outputs>
|
|
80 <data format="txt" name="consolidatedData" label="consolidatedData - tsv"/>
|
|
81 </outputs>
|
|
82
|
|
83
|
|
84 <help><![CDATA[
|
|
85 .. class:: infomark
|
|
86
|
|
87 Limitations etc:
|
|
88
|
|
89 -----
|
|
90
|
|
91 **Dataset formats**
|
|
92
|
|
93 The input datasets are in text_ (CSV/TSV) format format. The output dataset is also in text_ (TSV) formats.
|
|
94
|
|
95 .. _text: ${static_path}/formatHelp.html#text
|
|
96
|
|
97 Specific input file requirements:
|
|
98
|
|
99 - **List of raw assay measurements** - `CSV <https://en.wikipedia.org/wiki/Comma-separated_values/>`_ file
|
|
100
|
|
101 TODO: Briefly describe requirements for *raw* and other available formats for raw assay measurements (EnVision, VICTOR)
|
|
102
|
|
103 - **Plate barcode reference.** - `CSV <https://en.wikipedia.org/wiki/Comma-separated_values/>`_ file
|
|
104
|
|
105 Provides the sample names used in the drug screen and the corresponding plate id and set
|
|
106 Format: ['PlateID', 'Set', 'Number','Sample].
|
|
107 An example is shown with https://raw.githubusercontent.com/Enserink-lab/metascreen/main/inst/extdata/library/platebarcode.csv
|
|
108
|
|
109 - **Dispensing data** - TSV (output from *metascreen: pre-experimental* module)
|
|
110
|
|
111 -----
|
|
112
|
|
113 **What it does**
|
|
114
|
|
115 The intention of the *post-experimental* module of metascreen is to consolidate the raw assay
|
|
116 measurements and the dispensing data (the latter produced as output by the *pre-experimental* module
|
|
117 of metascreen). The module will build a final reference data set, to be used for
|
|
118 any downstream analysis of the drug sensitivity screen. A barcode reference list with the names of
|
|
119 the samples used in the drug screen is necessary so that these can be associated to the
|
|
120 corresponding plate id and set.
|
|
121
|
|
122 ]]>
|
|
123 </help>
|
|
124
|
|
125 </tool>
|