diff metascreenPost.xml @ 0:c8089729e678 draft default tip

Uploaded
author sigven
date Wed, 21 Dec 2022 23:24:32 +0000
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/metascreenPost.xml	Wed Dec 21 23:24:32 2022 +0000
@@ -0,0 +1,125 @@
+<tool id="metascreenPost" name="metascreen: post-experimental" version="0.2.6">
+  <description>Consolidation of drug combination screens</description>
+  <requirements>
+	 <container type="docker">sigven/metascreen:0.2.1</container>
+  </requirements>
+  <command detect_errors="aggressive"><![CDATA[
+  
+    ln -f -s $input_data.barcode_reference "$input_data.barcode_reference.element_identifier" &&
+      #set barcode_reference_csv = './' + str($input_data.barcode_reference.element_identifier)
+    
+    ln -f -s $input_data.dispensing_data "$input_data.dispensing_data.element_identifier" &&
+      #set dispensing_data_tsv = './' + str($input_data.dispensing_data.element_identifier)
+
+	  #for $raw_assay_file in $input_data.assay_raw
+	 	  ln -f -s '$raw_assay_file' '$raw_assay_file.element_identifier';
+	  #end for
+
+    R -e 'suppressPackageStartupMessages(library(metascreen));
+
+	  barcode_reference <- read.csv(
+  		file = "$barcode_reference_csv",
+  		check.names = FALSE,
+  		colClasses = c("PlateID"="character"),
+  		na.strings = "",
+  		encoding = "UTF-8");
+  		
+  	dispData <- as.data.frame(
+  	   readr::read_tsv(
+  	      file = "$dispensing_data_tsv",
+  	      col_names = TRUE, show_col_types = FALSE
+  	   )
+  	);
+  	
+  	dispData[,"Plate.Number"] <- 
+  	  as.factor(dispData[,"Plate.Number"]);
+  	dispData[,"Combination.ID"] <- 
+  	  as.integer(dispData[,"Combination.ID"]);
+  	
+    rfs = list();
+	  #for $raw_assay_file in $input_data.assay_raw
+
+	     rfs = append(
+	         rfs,
+     	    metascreen::readRAWData(
+       	   		  .readfrom = "$raw_assay_file.element_identifier",
+             		.format = "$input_data.assay_format"
+			   )
+		   );
+		#end for
+		
+		names(rfs) <- stringr::str_replace(names(rfs),".csv","");
+
+    clData <- metascreen::consolidateData(
+      dispensingData = dispData, 
+      rawMeasurements = rfs, 
+      .barcodeReference = barcode_reference);
+
+
+	   df = as.data.frame(clData[["consolidated"]]);
+	   readr::write_tsv(
+	      df, file="$consolidatedData", col_names=T, quote="none");' 2>&1
+
+  ]]></command>
+  <inputs>
+
+    <section name="input_data" title="User-defined input files - see below for formatting requirements" expanded="true">
+	   <param name="barcode_reference" type="data" format="txt" label="Barcode reference (CSV)" multiple="false"/>
+	   <param name="dispensing_data" type="data" format="txt" label="Dispensing data (TSV)" multiple="false"/>
+	   <param name="assay_raw" type="data" format="txt" label="Raw assay measurement data (CSV)" multiple="true"/>
+        <!--param name="convert_platemap_format" type="boolean" label="Convert platemap to a source plate format" truevalue="T" falsevalue="F" checked="false"/-->
+     <param name="assay_format" type="select" label="Assay measurement format" display="radio" multiple="false">
+        <option value="EnVision">EnVision</option>
+        <option value="raw">raw</option>
+		    <option value="VICTOR">VICTOR</option>
+	   </param>
+    </section>
+
+  </inputs>
+    <outputs>
+        <data format="txt" name="consolidatedData" label="consolidatedData - tsv"/>
+    </outputs>
+
+
+  <help><![CDATA[
+.. class:: infomark
+
+Limitations etc:
+
+-----
+
+**Dataset formats**
+
+The input datasets are in text_ (CSV/TSV) format format. The output dataset is also in text_ (TSV) formats.
+
+.. _text: ${static_path}/formatHelp.html#text
+
+Specific input file requirements:
+
+-  **List of raw assay measurements** - `CSV <https://en.wikipedia.org/wiki/Comma-separated_values/>`_ file
+
+   TODO: Briefly describe requirements for *raw* and other available formats for raw assay measurements (EnVision, VICTOR) 
+   
+-  **Plate barcode reference.** - `CSV <https://en.wikipedia.org/wiki/Comma-separated_values/>`_ file
+
+   Provides the sample names used in the drug screen and the corresponding plate id and set
+   Format: ['PlateID', 'Set', 'Number','Sample]. 
+   An example is shown with https://raw.githubusercontent.com/Enserink-lab/metascreen/main/inst/extdata/library/platebarcode.csv
+
+-  **Dispensing data** - TSV (output from *metascreen: pre-experimental* module)
+
+-----
+
+**What it does**
+
+The intention of the *post-experimental* module of metascreen is to consolidate the raw assay 
+measurements and the dispensing data (the latter produced as output  by the *pre-experimental* module 
+of metascreen). The module will build a final reference data set, to be used for 
+any downstream analysis of the drug sensitivity screen. A barcode reference list with the names of 
+the samples used in the drug screen is necessary so that these can be associated to the 
+corresponding plate id and set.
+
+]]>
+  </help>
+
+</tool>