Add an else.
This is to make sure that in case the reversing fails, we do not get any output items. Snakemake will inform us of an error in this event.labels
parent
916bb21a53
commit
9478dc94f2
|
@ -15,5 +15,7 @@ else:
|
||||||
df_esm_selected = df_esm_preprocessed[df_esm_preprocessed["questionnaire_id"] == questionnaire_id]
|
df_esm_selected = df_esm_preprocessed[df_esm_preprocessed["questionnaire_id"] == questionnaire_id]
|
||||||
df_esm_clean = clean_up_esm(df_esm_selected)
|
df_esm_clean = clean_up_esm(df_esm_selected)
|
||||||
if questionnaire_name.startswith("JCQ"):
|
if questionnaire_name.startswith("JCQ"):
|
||||||
df_esm_clean = reverse_jcq_demand_control_scoring(df_esm_clean)
|
df_esm_reversed = reverse_jcq_demand_control_scoring(df_esm_clean)
|
||||||
|
df_esm_reversed.to_csv(snakemake.output[0])
|
||||||
|
else:
|
||||||
df_esm_clean.to_csv(snakemake.output[0])
|
df_esm_clean.to_csv(snakemake.output[0])
|
||||||
|
|
Loading…
Reference in New Issue