StatGenPRD / GDCgtx

routine PGx analysis pipeline (gtx R package) in GSK's Global Data Center (GDC)
0 stars 2 forks source link

Abstract tableinput.R to accept any pass-thru gtxpipe options #6

Open andrew-slater opened 8 years ago

andrew-slater commented 8 years ago

Currently tableinput.R looks for specific keys in config.txt to process and pass through to the gtxpipe call. This makes sense for most of the configuration currently supported (e.g. reading the setup from the tables) but for key-value options that are simply passed through to gtxpipe as-is, it would be best to abstract so any new* option can simply be added to the template config.txt with an appropriate describing comment without need to modify tableinput.R.

*new could be an option newly supported in the gtx package or an option that is already supported by the gtx package but not described in the documentation and templates here.

The first such new option that should be supported is gtxpipe.packages where tableinput.R should set like

options(gtxpipe.packages = c(“ordinal”,"rfit","glm2"))

and the relevant section of OPTIONAL section of config.txt might look like

##Additional R packages needed to support functions used in model statements
##Like the ordinal package needed for ordinal analyses using the [insert function here] function
##Note, these are assumed to be already installed in the running environment so the pipeline can just load
gtxpipe.packages=c(“ordinal","rfit","glm2")

It may make sense to continue to handle some pass-thru key-value options specially in tableinput.R. Specifically, those we are considering required like project, user, and email even though the gtx package does not require these be specified. It is likely desirable for tableinput.R to die with error before calling gtxpipe if these options are missing.