-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathrender_report.R
executable file
·33 lines (27 loc) · 1.2 KB
/
render_report.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
#!/usr/bin/env Rscript
suppressPackageStartupMessages(library(synapser))
suppressPackageStartupMessages(library(optparse))
suppressPackageStartupMessages(library(synapseusagereports))
option_list <- list(
make_option(c("--project_id"), type = "character",
help = "Synapse Project ID. Should be the same that is in the input file.",
dest = "project_id",
metavar = "synapseid"),
make_option(c("--team_order"), type = "character",
help = "Comma separated list of teams to determine team assignment of downloads.",
dest = "team_order",
default = ''),
make_option(c("--synapse_config"), type = "character",
help = "Synapse configuration file.",
dest = "synapse_config",
default="~/.synapseConfig")
)
arguments <- parse_args(OptionParser(usage = "%prog [options] file",
option_list = option_list),
positional_arguments = 1)
opts <- arguments$options
data_file <- arguments$args
login <- capture.output(synLogin())
render_report(project_id = opts$project_id,
team_order = opts$team_order,
data_file = data_file)