Merge branch 'labels' into run_test_participant

labels
junos 2022-03-16 18:30:03 +01:00
commit fec7cc9550
2 changed files with 11 additions and 12 deletions

View File

@ -327,7 +327,7 @@ rule conversation_r_features:
rule preprocess_esm: rule preprocess_esm:
input: "data/raw/{pid}/phone_esm_with_datetime.csv" input: "data/raw/{pid}/phone_esm_with_datetime.csv"
params: params:
questionnaire_names = lambda wildcards: config["PHONE_ESM"]["PROVIDERS"][wildcards.feature]["FEATURES"] questionnaire_name = "{feature}"
output: "data/interim/{pid}/phone_esm_{feature}_clean.csv" output: "data/interim/{pid}/phone_esm_{feature}_clean.csv"
script: script:
"../src/features/phone_esm/straw/preprocess.py" "../src/features/phone_esm/straw/preprocess.py"

View File

@ -1,11 +1,10 @@
from esm_preprocess import * from esm_preprocess import *
questionnaire_names = snakemake.params["questionnaire_names"] questionnaire_name = snakemake.params["questionnaire_name"]
df_esm = pd.read_csv(snakemake.input[0]) df_esm = pd.read_csv(snakemake.input[0])
df_esm_preprocessed = preprocess_esm(df_esm) df_esm_preprocessed = preprocess_esm(df_esm)
for questionnaire_name in questionnaire_names:
try: try:
questionnaire_id = QUESTIONNAIRE_IDS[questionnaire_name] questionnaire_id = QUESTIONNAIRE_IDS[questionnaire_name]
except ValueError: except ValueError: