annotate metascreenPost.xml @ 0:44fa507ac6e7 draft default tip

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