2020-03-17 22:26:30 +01:00
|
|
|
rule days_to_analyse:
|
|
|
|
input:
|
2020-04-16 18:38:28 +02:00
|
|
|
participant_info = "data/raw/{pid}/" + config["PARAMS_FOR_ANALYSIS"]["GROUNDTRUTH_TABLE"] + "_raw.csv"
|
2020-03-17 22:26:30 +01:00
|
|
|
params:
|
2020-03-18 02:15:53 +01:00
|
|
|
days_before_surgery = "{days_before_surgery}",
|
|
|
|
days_in_hospital = "{days_in_hospital}",
|
|
|
|
days_after_discharge= "{days_after_discharge}"
|
2020-03-17 22:26:30 +01:00
|
|
|
output:
|
|
|
|
"data/interim/{pid}/days_to_analyse_{days_before_surgery}_{days_in_hospital}_{days_after_discharge}.csv"
|
|
|
|
script:
|
|
|
|
"../src/models/select_days_to_analyse.py"
|
2020-03-26 22:27:23 +01:00
|
|
|
|
2020-04-16 18:38:28 +02:00
|
|
|
rule targets:
|
2020-03-26 22:27:23 +01:00
|
|
|
input:
|
2020-04-16 18:38:28 +02:00
|
|
|
participant_info = "data/raw/{pid}/" + config["PARAMS_FOR_ANALYSIS"]["GROUNDTRUTH_TABLE"] + "_raw.csv"
|
2020-03-26 22:27:23 +01:00
|
|
|
params:
|
2020-04-16 18:38:28 +02:00
|
|
|
pid = "{pid}",
|
|
|
|
summarised = "{summarised}",
|
|
|
|
targets_ratio_threshold = config["PARAMS_FOR_ANALYSIS"]["TARGETS_RATIO_THRESHOLD"],
|
|
|
|
targets_value_threshold = config["PARAMS_FOR_ANALYSIS"]["TARGETS_VALUE_THRESHOLD"]
|
2020-03-26 22:27:23 +01:00
|
|
|
output:
|
|
|
|
"data/processed/{pid}/targets_{summarised}.csv"
|
|
|
|
script:
|
2020-04-16 18:38:28 +02:00
|
|
|
"../src/models/targets.py"
|
|
|
|
|
|
|
|
rule demographic_features:
|
|
|
|
input:
|
|
|
|
participant_info = "data/raw/{pid}/" + config["PARAMS_FOR_ANALYSIS"]["GROUNDTRUTH_TABLE"] + "_raw.csv"
|
|
|
|
params:
|
|
|
|
pid = "{pid}",
|
|
|
|
features = config["PARAMS_FOR_ANALYSIS"]["DEMOGRAPHIC_FEATURES"]
|
|
|
|
output:
|
|
|
|
"data/processed/{pid}/demographic_features.csv"
|
|
|
|
script:
|
|
|
|
"../src/features/demographic_features.py"
|