annotate metascreenPost.xml @ 0:c8089729e678 draft default tip

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