|
| 1 | +from domino import Domino |
| 2 | +from os import environ |
| 3 | +from os.path import splitext |
| 4 | + |
| 5 | +domino = Domino( |
| 6 | + f"{environ['DOMINO_PROJECT_OWNER']}/{environ['DOMINO_PROJECT_NAME']}" |
| 7 | +) |
| 8 | + |
| 9 | +def blocking_job(path): |
| 10 | + environments = { |
| 11 | + '.sas': "645163bc122db878f0012705" |
| 12 | + } |
| 13 | + file_name, file_ext = splitext(path) |
| 14 | + domino.job_start_blocking( |
| 15 | + command=path, |
| 16 | + environment_id=environments[file_ext] |
| 17 | + ) |
| 18 | + |
| 19 | +report: "/mnt/data/CDISC01_RE_INTERIM/snakemake.rst" |
| 20 | + |
| 21 | +envvars: |
| 22 | + "DOMINO_USER_API_KEY", |
| 23 | + "DOMINO_API_HOST" |
| 24 | + |
| 25 | +rule all: |
| 26 | + input: |
| 27 | + "/mnt/data/ADAM/adae.sas7bdat", |
| 28 | + "/mnt/data/ADAM/adcm.sas7bdat", |
| 29 | + "/mnt/data/ADAM/adlb.sas7bdat", |
| 30 | + "/mnt/data/ADAM/admh.sas7bdat", |
| 31 | + "/mnt/data/ADAM/adsl.sas7bdat", |
| 32 | + "/mnt/data/ADAM/advs.sas7bdat", |
| 33 | + "/mnt/data/TFL/t_ae_rel.sas7bdat", |
| 34 | + "/mnt/data/TFL/t_pop.sas7bdat", |
| 35 | + "/mnt/data/TFL/t_vscat.sas7bdat", |
| 36 | + "/mnt/data/METADATA/t_ae_rel.sas7bdat", |
| 37 | + "/mnt/data/METADATA/t_pop.sas7bdat", |
| 38 | + "/mnt/data/METADATA/t_vscat.sas7bdat" |
| 39 | + |
| 40 | +rule metadata: |
| 41 | + input: |
| 42 | + "/mnt/code/import_metadata.sas", |
| 43 | + "/mnt/pvc-rev4-nfs/TFL_Metadata.xlsx" |
| 44 | + output: |
| 45 | + "/mnt/data/METADATA/t_ae_rel.sas7bdat", |
| 46 | + "/mnt/data/METADATA/t_pop.sas7bdat", |
| 47 | + "/mnt/data/METADATA/t_vscat.sas7bdat" |
| 48 | + log: |
| 49 | + "/mnt/artifacts/metadata.log" |
| 50 | + run: |
| 51 | + run = blocking_job(input[0]) |
| 52 | + print(run) |
| 53 | + |
| 54 | +rule ADAE: |
| 55 | + input: |
| 56 | + "/mnt/code/prod/adam/ADAE.sas", |
| 57 | + "/mnt/imported/data/snapshots/SDTMBLIND/MAY162023/ae.sas7bdat", |
| 58 | + "/mnt/imported/data/snapshots/SDTMBLIND/MAY162023/ex.sas7bdat", |
| 59 | + "/mnt/data/ADAM/adsl.sas7bdat" |
| 60 | + output: |
| 61 | + "/mnt/data/ADAM/adae.sas7bdat" |
| 62 | + log: |
| 63 | + "/mnt/artifacts/ADAE.log" |
| 64 | + run: |
| 65 | + run = blocking_job(input[0]) |
| 66 | + print(run) |
| 67 | + |
| 68 | +rule ADCM: |
| 69 | + input: |
| 70 | + "/mnt/code/prod/adam/ADCM.sas", |
| 71 | + "/mnt/imported/data/snapshots/SDTMBLIND/MAY162023/cm.sas7bdat", |
| 72 | + "/mnt/data/ADAM/adsl.sas7bdat" |
| 73 | + output: |
| 74 | + "/mnt/data/ADAM/adcm.sas7bdat" |
| 75 | + log: |
| 76 | + "/mnt/artifacts/ADCM.log" |
| 77 | + run: |
| 78 | + run = blocking_job(input[0]) |
| 79 | + print(run) |
| 80 | + |
| 81 | +rule ADLB: |
| 82 | + input: |
| 83 | + "/mnt/code/prod/adam/ADLB.sas", |
| 84 | + "/mnt/imported/data/snapshots/SDTMBLIND/MAY162023/lb.sas7bdat", |
| 85 | + "/mnt/data/ADAM/adsl.sas7bdat" |
| 86 | + output: |
| 87 | + "/mnt/data/ADAM/adlb.sas7bdat" |
| 88 | + log: |
| 89 | + "/mnt/artifacts/ADLB.log" |
| 90 | + run: |
| 91 | + run = blocking_job(input[0]) |
| 92 | + print(run) |
| 93 | + |
| 94 | +rule ADMH: |
| 95 | + input: |
| 96 | + "/mnt/code/prod/adam/ADMH.sas", |
| 97 | + "/mnt/imported/data/snapshots/SDTMBLIND/MAY162023/mh.sas7bdat", |
| 98 | + "/mnt/data/ADAM/adsl.sas7bdat" |
| 99 | + output: |
| 100 | + "/mnt/data/ADAM/admh.sas7bdat" |
| 101 | + log: |
| 102 | + "/mnt/artifacts/ADMH.log" |
| 103 | + run: |
| 104 | + run = blocking_job(input[0]) |
| 105 | + print(run) |
| 106 | + |
| 107 | +rule ADSL: |
| 108 | + input: |
| 109 | + "/mnt/code/prod/adam/ADSL.sas", |
| 110 | + "/mnt/imported/data/snapshots/SDTMBLIND/MAY162023/dm.sas7bdat" |
| 111 | + output: |
| 112 | + "/mnt/data/ADAM/adsl.sas7bdat" |
| 113 | + log: |
| 114 | + "/mnt/artifacts/ADSL.log" |
| 115 | + run: |
| 116 | + run = blocking_job(input[0]) |
| 117 | + print(run) |
| 118 | + |
| 119 | +rule ADVS: |
| 120 | + input: |
| 121 | + "/mnt/code/prod/adam/ADVS.sas", |
| 122 | + "/mnt/imported/data/snapshots/SDTMBLIND/MAY162023/vs.sas7bdat", |
| 123 | + "/mnt/data/ADAM/adsl.sas7bdat" |
| 124 | + output: |
| 125 | + "/mnt/data/ADAM/advs.sas7bdat" |
| 126 | + log: |
| 127 | + "/mnt/artifacts/ADVS.log" |
| 128 | + run: |
| 129 | + run = blocking_job(input[0]) |
| 130 | + print(run) |
| 131 | + |
| 132 | +rule t_ae_rel: |
| 133 | + input: |
| 134 | + "/mnt/code/prod/tfl/t_ae_rel.sas", |
| 135 | + "/mnt/data/METADATA/t_ae_rel.sas7bdat", |
| 136 | + "/mnt/data/ADAM/adsl.sas7bdat", |
| 137 | + "/mnt/data/ADAM/adae.sas7bdat" |
| 138 | + output: |
| 139 | + "/mnt/data/TFL/t_ae_rel.sas7bdat" |
| 140 | + log: |
| 141 | + "/mnt/artifacts/t_ae_rel.log" |
| 142 | + run: |
| 143 | + run = blocking_job(input[0]) |
| 144 | + print(run) |
| 145 | + |
| 146 | +rule t_pop: |
| 147 | + input: |
| 148 | + "/mnt/code/prod/tfl/t_pop.sas", |
| 149 | + "/mnt/data/METADATA/t_pop.sas7bdat", |
| 150 | + "/mnt/data/ADAM/adsl.sas7bdat" |
| 151 | + output: |
| 152 | + "/mnt/data/TFL/t_pop.sas7bdat" |
| 153 | + log: |
| 154 | + "/mnt/artifacts/t_pop.log" |
| 155 | + run: |
| 156 | + run = blocking_job(input[0]) |
| 157 | + print(run) |
| 158 | + |
| 159 | +rule t_vscat: |
| 160 | + input: |
| 161 | + "/mnt/code/prod/tfl/t_vscat.sas", |
| 162 | + "/mnt/data/METADATA/t_vscat.sas7bdat", |
| 163 | + "/mnt/data/ADAM/advs.sas7bdat" |
| 164 | + output: |
| 165 | + "/mnt/data/TFL/t_vscat.sas7bdat" |
| 166 | + log: |
| 167 | + "/mnt/artifacts/t_vscat.log" |
| 168 | + run: |
| 169 | + run = blocking_job(input[0]) |
| 170 | + print(run) |
| 171 | + |
| 172 | +rule qc_ADAE: |
| 173 | + input: |
| 174 | + "/mnt/code/qc/adam/qc_ADAE.sas", |
| 175 | + "/mnt/imported/data/snapshots/SDTMBLIND/MAY162023/ae.sas7bdat", |
| 176 | + "/mnt/imported/data/snapshots/SDTMBLIND/MAY162023/ex.sas7bdat", |
| 177 | + "/mnt/data/ADAM/adae.sas7bdat", |
| 178 | + "/mnt/data/ADAMQC/adsl.sas7bdat" |
| 179 | + log: |
| 180 | + "/mnt/artifacts/qc_ADAE.log" |
| 181 | + run: |
| 182 | + run = blocking_job(input[0]) |
| 183 | + print(run) |
| 184 | + |
| 185 | +rule qc_ADCM: |
| 186 | + input: |
| 187 | + "/mnt/code/qc/adam/qc_ADCM.sas", |
| 188 | + "/mnt/imported/data/snapshots/SDTMBLIND/MAY162023/cm.sas7bdat", |
| 189 | + "/mnt/data/ADAM/adcm.sas7bdat", |
| 190 | + "/mnt/data/ADAMQC/adsl.sas7bdat" |
| 191 | + log: |
| 192 | + "/mnt/artifacts/qc_ADCM.log" |
| 193 | + run: |
| 194 | + run = blocking_job(input[0]) |
| 195 | + print(run) |
| 196 | + |
| 197 | +rule qc_ADLB: |
| 198 | + input: |
| 199 | + "/mnt/code/qc/adam/qc_ADLB.sas", |
| 200 | + "/mnt/imported/data/snapshots/SDTMBLIND/MAY162023/lb.sas7bdat", |
| 201 | + "/mnt/data/ADAM/adlb.sas7bdat", |
| 202 | + "/mnt/data/ADAMQC/adsl.sas7bdat" |
| 203 | + log: |
| 204 | + "/mnt/artifacts/qc_ADLB.log" |
| 205 | + run: |
| 206 | + run = blocking_job(input[0]) |
| 207 | + print(run) |
| 208 | + |
| 209 | +rule qc_ADMH: |
| 210 | + input: |
| 211 | + "/mnt/code/qc/adam/qc_ADMH.sas", |
| 212 | + "/mnt/imported/data/snapshots/SDTMBLIND/MAY162023/mh.sas7bdat", |
| 213 | + "/mnt/data/ADAM/admh.sas7bdat", |
| 214 | + "/mnt/data/ADAMQC/adsl.sas7bdat" |
| 215 | + log: |
| 216 | + "/mnt/artifacts/qc_ADMH.log" |
| 217 | + run: |
| 218 | + run = blocking_job(input[0]) |
| 219 | + print(run) |
| 220 | + |
| 221 | +rule qc_ADSL: |
| 222 | + input: |
| 223 | + "/mnt/code/qc/adam/qc_ADSL.sas", |
| 224 | + "/mnt/imported/data/snapshots/SDTMBLIND/MAY162023/dm.sas7bdat", |
| 225 | + "/mnt/data/ADAM/adsl.sas7bdat" |
| 226 | + log: |
| 227 | + "/mnt/artifacts/qc_ADSL.log" |
| 228 | + run: |
| 229 | + run = blocking_job(input[0]) |
| 230 | + print(run) |
| 231 | + |
| 232 | +rule qc_ADVS: |
| 233 | + input: |
| 234 | + "/mnt/code/qc/adam/qc_ADVS.sas", |
| 235 | + "/mnt/imported/data/snapshots/SDTMBLIND/MAY162023/vs.sas7bdat", |
| 236 | + "/mnt/data/ADAM/advs.sas7bdat", |
| 237 | + "/mnt/data/ADAMQC/adsl.sas7bdat" |
| 238 | + log: |
| 239 | + "/mnt/artifacts/qc_ADVS.log" |
| 240 | + run: |
| 241 | + run = blocking_job(input[0]) |
| 242 | + print(run) |
| 243 | + |
| 244 | +rule qc_t_ae_rel: |
| 245 | + input: |
| 246 | + "/mnt/code/qc/tfl/qc_t_ae_rel.sas", |
| 247 | + "/mnt/data/ADAM/adsl.sas7bdat", |
| 248 | + "/mnt/data/ADAM/adae.sas7bdat" |
| 249 | + log: |
| 250 | + "/mnt/artifacts/qc_t_ae_rel.log" |
| 251 | + run: |
| 252 | + run = blocking_job(input[0]) |
| 253 | + print(run) |
| 254 | + |
| 255 | +rule qc_t_pop: |
| 256 | + input: |
| 257 | + "/mnt/code/qc/tfl/qc_t_pop.sas", |
| 258 | + "/mnt/data/ADAM/adsl.sas7bdat" |
| 259 | + log: |
| 260 | + "/mnt/artifacts/qc_t_pop.log" |
| 261 | + run: |
| 262 | + run = blocking_job(input[0]) |
| 263 | + print(run) |
| 264 | + |
| 265 | +rule qc_t_vscat: |
| 266 | + input: |
| 267 | + "/mnt/code/qc/tfl/qc_t_vscat.sas", |
| 268 | + "/mnt/data/ADAM/advs.sas7bdat" |
| 269 | + log: |
| 270 | + "/mnt/artifacts/qc_t_vscat.log" |
| 271 | + run: |
| 272 | + run = blocking_job(input[0]) |
| 273 | + print(run) |
0 commit comments