view flow-compensate.xml @ 0:ca7ba337b727 draft

"planemo upload for repository commit 386fcc6286d3e2d2769ac9856a653b04d5c6b0ad"
author azomics
date Tue, 25 May 2021 00:07:44 +0000
children ffc083c86d44
line wrap: on
line source

<tool id="flow-compensate" name="Flow compensate" version="0.1.0+galaxy0" profile="19.01" python_template_version="3.5">
        compensates a set of FCS objects through a compensation matrix
      <requirement type="package" version="2.2.0">bioconductor-flowcore</requirement>
    <command detect_errors="exit_code"><![CDATA[
        mkdir -p input_dir;
        #for $fcs in $fcs_list:
          ln -s '$fcs' input_dir/'$fcs.element_identifier';
        #end for 
        mkdir -p output_dir;
        Rscript '$compensate_script' '$compensation_matrix' input_dir output_dir
      <configfile name="compensate_script"><![CDATA[

args <- commandArgs( TRUE )

if ( length( args ) != 3 ) {
    cat( "ERROR: no arguments with directory, matrix file for compensation and out_dir",
        file = stderr() )

comp_matrix <- read.table(file=args[[ 1 ]], sep="\t", header=TRUE, check.names = FALSE)
## Square matrix, reuse colnames into rownames
fcs_dir <- args[[ 2 ]]

samp<-read.flowSet(files=list.files(path=fcs_dir, pattern=".*.fcs\$"), path=fcs_dir)

samp<-compensate(samp, comp_matrix)

write.flowSet(samp, outdir=args[[ 3 ]])

        <param type="data" name="fcs_list" format="fcs" multiple="true" label="FCS files" help="FCS files to compensate using the provided matrix"/>
        <param type="data" name="compensation_matrix" format="tabular" label="Matrix to use for compensation" />
      <collection name="compensated_fcs" format="fcs" label="${} compensated FCS files on ${on_string}" type="list">
        <discover_datasets pattern="__designation_and_ext__" directory="output_dir" visible="true" />
        TODO: Fill in help.