-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathBatchFlowType.R
54 lines (33 loc) · 1.18 KB
/
BatchFlowType.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/usr/bin/env Rscript
require(docopt)
require(methods)
"
Usage:
BatchFlowType.R (-h | --help | --version)
BatchFlowType.R DIR
Description: This script applies the flowType algorthim to high parameter cytometry data
Options:
--version Show the current version.
Arguments:
DIR Provide directory for cytools.args.Rdata to be found, automatically generated by invoking cyttools.R
" -> doc
args <- docopt(doc)
cat(args$DIR, "\n", args$OUT, "\n")
ARGS_DIR <- args$DIR
ARGS_DIR <- gsub("DataPrepWorkspace\\_.*", "Results/", ARGS_DIR)
ARGS_FILE <- paste(ARGS_DIR, "cyttools.args.Rdata", sep = "")
cat("\nLOADING ARGUEMENTS:", ARGS_FILE, "\n")
load(ARGS_FILE)
RESULTS_DIR <- args$OUT
cat("\nResults will be written to", RESULTS_DIR, "\n")
source("cyttoolsFunctions.R")
file <- args$DIR # grabs directory from initial cyttools call
load(file)
ResList <- flowType(ffb,
MarkerNames = parameters(ffb)$desc,
MemLimit = 15)
workspaceFile <- paste(RESULTS_DIR,
gsub(gsub("BatchFlowTypeResults/", "", RESULTS_DIR),
"",
file), sep = "")
save(ResList, file = workspaceFile)