annotate 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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
34397a84faf1 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flowai commit 83ef47729f2d2cdae84171761a6795df9fb63389"
azomics
parents:
diff changeset
1 #!/usr/bin/env Rscript
34397a84faf1 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flowai commit 83ef47729f2d2cdae84171761a6795df9fb63389"
azomics
parents:
diff changeset
2 #
34397a84faf1 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flowai commit 83ef47729f2d2cdae84171761a6795df9fb63389"
azomics
parents:
diff changeset
3 # Authors: Gianni Monaco
34397a84faf1 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flowai commit 83ef47729f2d2cdae84171761a6795df9fb63389"
azomics
parents:
diff changeset
4 #
34397a84faf1 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flowai commit 83ef47729f2d2cdae84171761a6795df9fb63389"
azomics
parents:
diff changeset
5 # Reference: flowAI: automatic and interactive anomaly discerning
34397a84faf1 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flowai commit 83ef47729f2d2cdae84171761a6795df9fb63389"
azomics
parents:
diff changeset
6 # tools for flow cytometry data.
34397a84faf1 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flowai commit 83ef47729f2d2cdae84171761a6795df9fb63389"
azomics
parents:
diff changeset
7 # Gianni Monaco, Hao Chen, Michael Poidinger, Jinmiao Chen,
34397a84faf1 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flowai commit 83ef47729f2d2cdae84171761a6795df9fb63389"
azomics
parents:
diff changeset
8 # Joao Pedro de Magalhaes and Anis Larbi
34397a84faf1 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flowai commit 83ef47729f2d2cdae84171761a6795df9fb63389"
azomics
parents:
diff changeset
9 # Bioinformatics (2016)
2
fab7c5deeb65 planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flowai commit 2482f9499096cc780cf1bf688ea07de150191be5
azomics
parents: 1
diff changeset
10 # doi 10.1093/bioinformatics/btw191
1
34397a84faf1 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flowai commit 83ef47729f2d2cdae84171761a6795df9fb63389"
azomics
parents:
diff changeset
11 #
34397a84faf1 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flowai commit 83ef47729f2d2cdae84171761a6795df9fb63389"
azomics
parents:
diff changeset
12
34397a84faf1 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flowai commit 83ef47729f2d2cdae84171761a6795df9fb63389"
azomics
parents:
diff changeset
13 library(flowAI)
34397a84faf1 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flowai commit 83ef47729f2d2cdae84171761a6795df9fb63389"
azomics
parents:
diff changeset
14 library(methods)
34397a84faf1 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flowai commit 83ef47729f2d2cdae84171761a6795df9fb63389"
azomics
parents:
diff changeset
15
34397a84faf1 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flowai commit 83ef47729f2d2cdae84171761a6795df9fb63389"
azomics
parents:
diff changeset
16 # parse arguments
34397a84faf1 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flowai commit 83ef47729f2d2cdae84171761a6795df9fb63389"
azomics
parents:
diff changeset
17
34397a84faf1 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flowai commit 83ef47729f2d2cdae84171761a6795df9fb63389"
azomics
parents:
diff changeset
18 args <- commandArgs(trailingOnly = TRUE)
34397a84faf1 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flowai commit 83ef47729f2d2cdae84171761a6795df9fb63389"
azomics
parents:
diff changeset
19
2
fab7c5deeb65 planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flowai commit 2482f9499096cc780cf1bf688ea07de150191be5
azomics
parents: 1
diff changeset
20 rem_fs <- if (args[4]) c("FSC", "SSC") else NULL
1
34397a84faf1 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flowai commit 83ef47729f2d2cdae84171761a6795df9fb63389"
azomics
parents:
diff changeset
21
34397a84faf1 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flowai commit 83ef47729f2d2cdae84171761a6795df9fb63389"
azomics
parents:
diff changeset
22 flow_auto_qc(
2
fab7c5deeb65 planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flowai commit 2482f9499096cc780cf1bf688ea07de150191be5
azomics
parents: 1
diff changeset
23 fcsfiles = args[1],
fab7c5deeb65 planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flowai commit 2482f9499096cc780cf1bf688ea07de150191be5
azomics
parents: 1
diff changeset
24 remove_from = args[2],
fab7c5deeb65 planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flowai commit 2482f9499096cc780cf1bf688ea07de150191be5
azomics
parents: 1
diff changeset
25 alphaFR = as.numeric(args[3]),
fab7c5deeb65 planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flowai commit 2482f9499096cc780cf1bf688ea07de150191be5
azomics
parents: 1
diff changeset
26 ChRemoveFS = rem_fs,
fab7c5deeb65 planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flowai commit 2482f9499096cc780cf1bf688ea07de150191be5
azomics
parents: 1
diff changeset
27 outlierFS = args[5],
fab7c5deeb65 planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flowai commit 2482f9499096cc780cf1bf688ea07de150191be5
azomics
parents: 1
diff changeset
28 pen_valueFS = as.numeric(args[6]),
fab7c5deeb65 planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flowai commit 2482f9499096cc780cf1bf688ea07de150191be5
azomics
parents: 1
diff changeset
29 sideFM = args[7],
fab7c5deeb65 planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flowai commit 2482f9499096cc780cf1bf688ea07de150191be5
azomics
parents: 1
diff changeset
30 fcs_QC = ifelse(args[9] == "None", FALSE, "_QC"),
fab7c5deeb65 planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flowai commit 2482f9499096cc780cf1bf688ea07de150191be5
azomics
parents: 1
diff changeset
31 fcs_highQ = ifelse(args[10] == "None", FALSE, "_highQ"),
fab7c5deeb65 planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flowai commit 2482f9499096cc780cf1bf688ea07de150191be5
azomics
parents: 1
diff changeset
32 fcs_lowQ = ifelse(args[11] == "None", FALSE, "_lowQ"),
fab7c5deeb65 planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flowai commit 2482f9499096cc780cf1bf688ea07de150191be5
azomics
parents: 1
diff changeset
33 folder_results = FALSE)
1
34397a84faf1 "planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flowai commit 83ef47729f2d2cdae84171761a6795df9fb63389"
azomics
parents:
diff changeset
34
2
fab7c5deeb65 planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flowai commit 2482f9499096cc780cf1bf688ea07de150191be5
azomics
parents: 1
diff changeset
35 try(file.rename(dir(".", pattern = ".*_QC.html"), args[8]), silent = TRUE)
fab7c5deeb65 planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flowai commit 2482f9499096cc780cf1bf688ea07de150191be5
azomics
parents: 1
diff changeset
36 try(file.rename(dir(".", pattern = ".*_QC.fcs"), args[9]), silent = TRUE)
fab7c5deeb65 planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flowai commit 2482f9499096cc780cf1bf688ea07de150191be5
azomics
parents: 1
diff changeset
37 try(file.rename(dir(".", pattern = ".*_highQ.fcs"), args[10]), silent = TRUE)
fab7c5deeb65 planemo upload for repository https://github.com/ImmPortDB/immport-galaxy-tools/tree/master/flowtools/flowai commit 2482f9499096cc780cf1bf688ea07de150191be5
azomics
parents: 1
diff changeset
38 try(file.rename(dir(".", pattern = ".*_lowQ.fcs"), args[11]), silent = TRUE)