|
4 | 4 | ### This file is part of the BBS software (Bioconductor Build System). |
5 | 5 | ### |
6 | 6 | ### Author: Hervé Pagès <hpages.on.github@gmail.com> |
7 | | -### Last modification: May 24, 2021 |
| 7 | +### Last modification: Nov 22, 2023 |
8 | 8 | ### |
9 | 9 |
|
10 | 10 | import sys |
|
17 | 17 | import BBSbase |
18 | 18 |
|
19 | 19 | def make_PROPAGATION_STATUS_DB(final_repo): |
20 | | - Rfunction = 'makePropagationStatusDb' |
| 20 | + ## Prepare Rexpr (must be a single string with no spaces). |
| 21 | + Rscript_path = os.path.join(BBSvars.BBS_home, |
| 22 | + 'utils', |
| 23 | + 'makePropagationStatusDb.R') |
| 24 | + Rfun = 'makePropagationStatusDb' |
21 | 25 | OUTGOING_dir = 'OUTGOING' |
22 | 26 | db_filepath = 'PROPAGATION_STATUS_DB.txt' |
23 | | - script_path = os.path.join(BBSvars.BBS_home, |
24 | | - "utils", |
25 | | - "makePropagationStatusDb.R") |
26 | | - Rexpr = "source('%s');%s('%s','%s',db_filepath='%s')" % \ |
27 | | - (script_path, Rfunction, OUTGOING_dir, final_repo, db_filepath) |
| 27 | + Rfuncall = "%s('%s','%s',db_filepath='%s')" % \ |
| 28 | + (Rfun, OUTGOING_dir, final_repo, db_filepath) |
| 29 | + Rexpr = "source('%s');%s" % (Rscript_path, Rfuncall) |
| 30 | + |
| 31 | + ## Turn Rexpr into a system command. |
28 | 32 | cmd = BBSbase.Rexpr2syscmd(Rexpr) |
| 33 | + |
29 | 34 | try: |
30 | 35 | ## Nasty things (that I don't really understand) can happen with |
31 | 36 | ## subprocess.run() if this code is runned by the Task Scheduler |
|
0 commit comments