From 6c1beb0ba859b5cdf16d2a9b8b09bbb2418f3a6d Mon Sep 17 00:00:00 2001 From: Michael Boniface <m.j.boniface@soton.ac.uk> Date: Fri, 21 Feb 2025 12:14:30 +0000 Subject: [PATCH] updated readme with expected output --- README.md | 11 ++++++++--- acmc/logging_config.py | 7 ++++--- acmc/main.py | 1 - 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 55e9c9f..88c6e64 100644 --- a/README.md +++ b/README.md @@ -154,6 +154,8 @@ acmc phen init 2. **Copy example medical code lists to the phenotype codes directory** From the command prompt, copy medical code lists `/examples/codes`to the phenotype code directory: + - [Download `res176-abdominal-pain.csv`](.//examples/codes/clinical-codes-org/Symptom%20code%20lists/Abdominal%20pain/res176-abdominal-pain.csv) + - Alternatively, place your code lists in `./workspace/phen/codes`. ```bash cp -r ./examples/codes/* ./workspace/phen/codes @@ -162,6 +164,8 @@ cp -r ./examples/codes/* ./workspace/phen/codes 3. **Copy the example phenotype configuration file to the phenotype directory** From the command prompt, copy example phenotype configuration files `/examples/config.json` to the phenotype directory: + - [Download `config.json`](./examples/config.json) + - Alternatively, place your own `config.json` file in `./workspace/phen`. ```bash cp -r ./examples/config.json ./workspace/phen @@ -175,12 +179,13 @@ cp -r ./examples/config.json ./workspace/phen acmc phen validate ``` -5. **Generate phenotype in read2 code format** + **Expected Output:** - Use the followijng `acmc` command to generate the phenotype in `read2` format: + Once the command is executed, you should see output similar to this: ```bash -acmc phen map -t read2 +[INFO] - Validating phenotype: <path>/concepts-processing/workspace/phen +[INFO] - Phenotype validated successfully ``` 6. **Publish phenotype at an initial version** diff --git a/acmc/logging_config.py b/acmc/logging_config.py index 5af1bc6..b9bb42e 100644 --- a/acmc/logging_config.py +++ b/acmc/logging_config.py @@ -31,11 +31,12 @@ def setup_logger(log_level=logging.INFO): stream_handler.setLevel(logging.INFO) # Create a formatter for how the log messages should look - formatter = logging.Formatter('%(asctime)s - - %(levelname)s - %(message)s') # Add the formatter to both handlers - file_handler.setFormatter(formatter) - stream_handler.setFormatter(formatter) + file_formatter = logging.Formatter('%(asctime)s - - %(levelname)s - %(message)s') + file_handler.setFormatter(file_formatter) + stream_formatter = logging.Formatter('[%(levelname)s] - %(message)s') + stream_handler.setFormatter(stream_formatter) # Add the handlers to the logger logger.addHandler(file_handler) diff --git a/acmc/main.py b/acmc/main.py index 72a055f..43fd39d 100644 --- a/acmc/main.py +++ b/acmc/main.py @@ -194,7 +194,6 @@ def main(): lc.set_log_level(logging.DEBUG) # Call the function associated with the command - logger.info("ACMC Tool") args.func(args) if __name__ == "__main__": -- GitLab