A package for evaluating values for terms in a controlled vocabulary.
Project description
Controlled Vocabulary Utils
A package for evaluating values for terms in a controlled vocabulary.
Usage
Contents of the controlled vocabulary configuration file:
---
format_version: 0.1.0
name: Controlled Vocabulary for Bioinformatics
description: TBD
terms:
- name: variant_effect_on_function
def: The effect that the variant has on the function of the gene.
datatype: string
accepted_values:
"loss": The variant has caused a loss of function.
"gain": The variant has caused a gain of function.
- name: region_of_transcript_affected
def: The region of the transcript that the variant affects.
datatype: string
accepted_values:
"start": The variant affects the start of the transcript.
"end": The variant affects the end of the transcript.
"whole transcript": The variant affects the whole transcript.
"overlapping end": The variant overlaps one end of the ends of the transcript.
- name: variant_status
def: TBD
alt_names:
- variant_qc_status
datatype: string
accepted_values:
- name: score
def: TBD
datatype: integer
accepted_values:
"10": "very low score"
"20": "low score"
"40": "mid-level score"
- name: zygosity
def: TBD
alt_names:
- zyg
datatype: string
accepted_values:
"heterozygous": "heterozygous"
"homozygous": "homozygous"
"mosaic": "mosaic"
from controlled_vocabulary_utils import CVValidationManager
config_file = "conf/controlled_vocabulary.yaml"
vm = ValidationManager(
config_file=config_file,
verbose=verbose,
)
term = "zygosity"
val = "mosaic"
if vm.is_valid(term, val):
print(f"'{val}' is a valid value for term '{term}'")
else:
print(f"'{val}' is NOT a valid value for term '{term}'")
History
0.1.0 (2025-02-22)
First release on PyPI.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file controlled_vocabulary_utils-0.3.0.tar.gz.
File metadata
- Download URL: controlled_vocabulary_utils-0.3.0.tar.gz
- Upload date:
- Size: 14.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e64375262637652b93c8b2209f63ad419682277d28a4a56c9aee1e68638314ff
|
|
| MD5 |
5e7c7935da9314835d861c14febeed05
|
|
| BLAKE2b-256 |
0df9fe71c2f2808b7506e2bf1f550ee3f504ec0485fbd2ab3a84fa9464830a76
|
File details
Details for the file controlled_vocabulary_utils-0.3.0-py2.py3-none-any.whl.
File metadata
- Download URL: controlled_vocabulary_utils-0.3.0-py2.py3-none-any.whl
- Upload date:
- Size: 9.1 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f9e715597eef84656a12b157004a9cd684de2b4870f79694d874d9c1bff100cd
|
|
| MD5 |
877076b2a78c5810c55346a0b7ba6b7b
|
|
| BLAKE2b-256 |
d46811065c5bf2b38e911d5afd62523ad15dcd8d82f9fbef9215705d1a8c36c5
|