comparison FCSflowAI.R @ 2:fab7c5deeb65 draft

planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flowai commit 2482f9499096cc780cf1bf688ea07de150191be5
author azomics
date Tue, 26 Sep 2023 23:19:04 +0000
parents 34397a84faf1
children
comparison
equal deleted inserted replaced
1:34397a84faf1 2:fab7c5deeb65
5 # Reference: flowAI: automatic and interactive anomaly discerning 5 # Reference: flowAI: automatic and interactive anomaly discerning
6 # tools for flow cytometry data. 6 # tools for flow cytometry data.
7 # Gianni Monaco, Hao Chen, Michael Poidinger, Jinmiao Chen, 7 # Gianni Monaco, Hao Chen, Michael Poidinger, Jinmiao Chen,
8 # Joao Pedro de Magalhaes and Anis Larbi 8 # Joao Pedro de Magalhaes and Anis Larbi
9 # Bioinformatics (2016) 9 # Bioinformatics (2016)
10 # doi: 10.1093/bioinformatics/btw191 10 # doi 10.1093/bioinformatics/btw191
11 # 11 #
12 12
13 library(flowAI) 13 library(flowAI)
14 library(methods) 14 library(methods)
15 15
16 # parse arguments 16 # parse arguments
17 17
18 args <- commandArgs(trailingOnly = TRUE) 18 args <- commandArgs(trailingOnly = TRUE)
19 19
20 remFS <- if(args[4]) c("FSC", "SSC") else NULL 20 rem_fs <- if (args[4]) c("FSC", "SSC") else NULL
21 21
22 flow_auto_qc( 22 flow_auto_qc(
23 fcsfiles = args[1], 23 fcsfiles = args[1],
24 remove_from = args[2], 24 remove_from = args[2],
25 alphaFR = as.numeric(args[3]), 25 alphaFR = as.numeric(args[3]),
26 ChRemoveFS = remFS, 26 ChRemoveFS = rem_fs,
27 outlierFS = args[5], 27 outlierFS = args[5],
28 pen_valueFS = as.numeric(args[6]), 28 pen_valueFS = as.numeric(args[6]),
29 sideFM = args[7], 29 sideFM = args[7],
30 fcs_QC = ifelse(args[9] == "None", FALSE, "_QC"), 30 fcs_QC = ifelse(args[9] == "None", FALSE, "_QC"),
31 fcs_highQ = ifelse(args[10] == "None", FALSE, "_highQ"), 31 fcs_highQ = ifelse(args[10] == "None", FALSE, "_highQ"),
32 fcs_lowQ = ifelse(args[11] == "None", FALSE, "_lowQ"), 32 fcs_lowQ = ifelse(args[11] == "None", FALSE, "_lowQ"),
33 folder_results = FALSE) 33 folder_results = FALSE)
34 34
35 try(file.rename(dir(".", pattern = ".*_QC.html"), args[8]), silent =TRUE) 35 try(file.rename(dir(".", pattern = ".*_QC.html"), args[8]), silent = TRUE)
36 try(file.rename(dir(".", pattern = ".*_QC.fcs"), args[9]), silent =TRUE) 36 try(file.rename(dir(".", pattern = ".*_QC.fcs"), args[9]), silent = TRUE)
37 try(file.rename(dir(".", pattern = ".*_highQ.fcs"), args[10]), silent =TRUE) 37 try(file.rename(dir(".", pattern = ".*_highQ.fcs"), args[10]), silent = TRUE)
38 try(file.rename(dir(".", pattern = ".*_lowQ.fcs"), args[11]), silent =TRUE) 38 try(file.rename(dir(".", pattern = ".*_lowQ.fcs"), args[11]), silent = TRUE)