Tutorial 1 Basic local phenotype¶
This examples sets up a phenotype workspace environment, installs dependencies, configures necessary files, and validates and maps phenotypes to read2.
-
Clone the Git Repository:
sh git clone <repository_url>This copies the remote repository to your local machine. -
Navigate to the Project Directory:
sh cd concepts-processingMoves into the cloned repository's directory. -
Create a Virtual Environment:
sh py -m venv venvThis sets up an Virtual Python environment namedvenv. -
Upgrade
pip:
sh python -m pip install --upgrade pipEnsures you have the latest version ofpip, which helps manage dependencies. -
Install the Required Package (
acmc):
sh pip install acmcInstallsacmc, which is likely a package required for processing concepts. -
Initialize a Phenotype Project:
sh acmc phen initSets up the workspace file strucutre for working with phenotype concepts. An example phenotype project is created within thephensub-folder. -
Download TRUD Data:
Downloads necessary TRUD (Terminology Reference Data) files, for concept verification and translation.-
Register at TRUD
Registry your account with TRUD at NHS TRUD.
-
Subscribe and Accept Licenses: Subscribe to the following data files:
After subscribing, you'll receive an API key once your request is approved (usually within a few hours).
-
Get TRUD API KEY
Copy your API key from NHS TRUD Account Management and store it securely.
-
Add TRUD API KEY to as an environment variable
To set the environment variable temporarily (for the current session), run:
On macOS/Linux:
bash export ACMC_TRUD_API_KEY="your_api_key_here"On Windows (Command Prompt or PowerShell):
bash setx ACMC_TRUD_API_KEY "your_api_key_here" -
Install TRUD within ACMC
sh acmc trud install
-
-
Create Phenotype Configuration:
Modify theconfig.ymlfile as needed for your project settings. For more information on see the configuration file documentation. -
Validate the Phenotype Configuration:
Use the followijngacmccommand to validate the phenotype configuration to ensure it's correct:sh acmc phen validate -d workspace\phenChecks that the phenotype definitions are correctly structured and valid.Expected Output:
bash [INFO] - Validating phenotype: <path>/concepts-processing/workspace/phen [INFO] - Phenotype validated successfully -
Map Phenotype Data:
Maps the phenotype data using theread2vocabulary.sh acmc phen map -d workspace\phen -t read2 -
Publish phenotype at an initial version
Use the following
acmccommand to publish the phenotype at an initial version:bash acmc phen publish -
Compare the previous version
0.0.1with the latest versionUse the following
acmccommand to compare the previous version0.0.1with the latest version in the workspace phen directory:bash acmc phen diff -ov 0.0.1 -
Publish the phenotype at a major version
Use the following
acmccommand to publish the phenotype at a major version:bash acmc phen publish -i major
Support¶
If you need help please open an issue in the repository