comparison flow-compensate.xml @ 0:ca7ba337b727 draft

"planemo upload for repository https://github.com/AstraZeneca-Omics/immport-galaxy-tools/tree/master/flowtools/flow_compensate commit 386fcc6286d3e2d2769ac9856a653b04d5c6b0ad"
author azomics
date Tue, 25 May 2021 00:07:44 +0000
parents
children ffc083c86d44
comparison
equal deleted inserted replaced
-1:000000000000 0:ca7ba337b727
1 <tool id="flow-compensate" name="Flow compensate" version="0.1.0+galaxy0" profile="19.01" python_template_version="3.5">
2 <description>
3 compensates a set of FCS objects through a compensation matrix
4 </description>
5 <requirements>
6 <requirement type="package" version="2.2.0">bioconductor-flowcore</requirement>
7 </requirements>
8 <command detect_errors="exit_code"><![CDATA[
9 mkdir -p input_dir;
10 #for $fcs in $fcs_list:
11 ln -s '$fcs' input_dir/'$fcs.element_identifier';
12 #end for
13 mkdir -p output_dir;
14 Rscript '$compensate_script' '$compensation_matrix' input_dir output_dir
15 ]]></command>
16 <configfiles>
17 <configfile name="compensate_script"><![CDATA[
18 library(flowCore)
19
20 args <- commandArgs( TRUE )
21
22 if ( length( args ) != 3 ) {
23 cat( "ERROR: no arguments with directory, matrix file for compensation and out_dir",
24 file = stderr() )
25 stop()
26 }
27
28 comp_matrix <- read.table(file=args[[ 1 ]], sep="\t", header=TRUE, check.names = FALSE)
29 comp_matrix<-as.matrix(comp_matrix[,-1])
30 ## Square matrix, reuse colnames into rownames
31 rownames(comp_matrix)<-colnames(comp_matrix)
32 fcs_dir <- args[[ 2 ]]
33
34 samp<-read.flowSet(files=list.files(path=fcs_dir, pattern=".*.fcs\$"), path=fcs_dir)
35
36 samp<-compensate(samp, comp_matrix)
37
38 write.flowSet(samp, outdir=args[[ 3 ]])
39
40 ]]></configfile>
41 </configfiles>
42 <inputs>
43 <param type="data" name="fcs_list" format="fcs" multiple="true" label="FCS files" help="FCS files to compensate using the provided matrix"/>
44 <param type="data" name="compensation_matrix" format="tabular" label="Matrix to use for compensation" />
45 </inputs>
46 <outputs>
47 <collection name="compensated_fcs" format="fcs" label="${tool.name} compensated FCS files on ${on_string}" type="list">
48 <discover_datasets pattern="__designation_and_ext__" directory="output_dir" visible="true" />
49 </collection>
50 </outputs>
51 <help><![CDATA[
52 TODO: Fill in help.
53 ]]></help>
54 </tool>