Skip to content

Commit

Permalink
cpsr.R: export pcgrr conda env path + quarto evars
Browse files Browse the repository at this point in the history
  • Loading branch information
pdiakumis committed Jun 6, 2024
1 parent f8ec4fa commit b0827b2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pcgr/cpsr.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,13 +310,14 @@ def run_cpsr(conf_options, input_data, output_data):

# export PATH to R conda env Rscript
pcgrr_conda = conf_options['pcgrr_conda']
quarto_env_vars = utils.quarto_evars_path(pcgrr_conda)
pcgr_conda = utils.conda_prefix_basename()
rscript = utils.script_path(pcgrr_conda, 'bin/Rscript')
cpsrr_script = utils.script_path(pcgr_conda, 'bin/cpsr.R')

export_pcgrr = utils.pcgrr_conda_env_export(pcgrr_conda)
## CPSR|writer - generate HTML report
cpsr_report_command = (
f"{rscript} {cpsrr_script} {yaml_fname}")
f"{export_pcgrr} && {rscript} {cpsrr_script} {yaml_fname} {quarto_env_vars}")

if debug:
print(cpsr_report_command)
Expand Down
2 changes: 2 additions & 0 deletions scripts/cpsr.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ suppressWarnings(suppressPackageStartupMessages(library(log4r)))
## YAML file produced by CPSR Python workflow
## - settings and paths to reference data and annotated input sample files
yaml_fname <- as.character(args[1])
quarto_evars_path <- as.character(args[2])
pcgrr::export_quarto_evars(quarto_evars_path)

my_log4r_layout <- function(level, ...) {
paste0(format(Sys.time()), " - cpsr-report-generation - ",
Expand Down

0 comments on commit b0827b2

Please sign in to comment.