diff --git a/acmc/phen.py b/acmc/phen.py index ad3b9f27b16d1ef51ffc6330bcf9c9a6348a113b..15c2e49bcb7890c5dffed2d655ab31f510937851 100644 --- a/acmc/phen.py +++ b/acmc/phen.py @@ -380,10 +380,10 @@ def preprocess(df, file, target_code_type=None, codes_file=None, translate=True, if target_code_type and not translate: # QA only on target codes - if target_code_type in file[columns]: + if target_code_type in file['columns']: logger.info(f"Processing {target_code_type} Codes...") out = preprocess_code(out=out, - codes=df[file[columns][target_code_type]].dropna(), + codes=df[file['columns'][target_code_type]].dropna(), codes_file=codes_file, checker=parse.code_types[target_code_type], output_col=target_code_type, @@ -534,7 +534,7 @@ def map(phen_dir, target_code_type, translate=True): # test if there's any output from processing if len(out.index) == 0: - raise Exception("The output after map processing has no output, check configuration file {str(config_path.resolve())} is not empty") + raise Exception(f"No output after map processing, check configuration {str(config_path.resolve())}") # Final processing out = out.reset_index(drop=True)