Package for creating diagrams aiding CSF diagnostics
Project description
| Tests | Coverage |
|---|---|
Reiberdiagram
Python module to create an image file for each measured immunoglobulin.
The Reiberdiagram was invented by Hansotto Reiber to visualize reasons for unusual high concentrations of proteins in the Cerebrospinal fluid (CSF).[^1][^2] This may be due to problems with the blood-brain barrier or antibody synthesis in the CSF. The diagram consist of two main curves enclosing the normal range, some additional curves labelled 20%, 40% etc., an age-dependent vertical separation line (separates the normal are to the left and a barrier dysfunction on the right side of it) and a mark that highlights the position of the current measurement. The x-axis is the albumin quotient (which is used as a reference protein) and the y-axis the immunoglobulin quotient.
The percentage curves make it possible to estimate the intrathecal fraction, which is the percentage of proteins synthesised inside the CSF and not inside the blood. The reference range between the two bold curves is where 99% of patients are located. A measurement mark on the left side of the reference range indicates no problem, while on the right side it hints a barrier dysfunction. Values above the reference range indicate a synthesis of immunoglobulines inside the central nervous system. Values below the reference range indicate a measurement error.
Images can be created for IgA, IgG and IgM
Usage:
You can either evaluate a csv file (see example in test folder) or a single patient. Example:
test_csv_file:
id;dob;alb_serum;alb_csf;iga_serum;iga_csf;igg_serum;igg_csf;igm_serum;igm_csf
001;2002-09-18;49.2;1.3;;;1090.1;22.3
002;1976-11-19;49.2;1.3;100.2;13.4;;;345.6;33.1
from reiberdiagram import create_images_for_file, ImageType
create_images_for_file(test_csv_file, out_file=test_file_path, image_type=ImageType.PNG)
from reiberschema import create_images, PatientData, ImageType
pat = PatientData(csv_row_id="001", birth_date_iso="2022-09-13", albumin_serum=1000, albumin_csf=10, igg_serum=133.5, igg_csf=1.5)
create_images(data=pat, out_file="test", image_type=ImageType.PNG)
Example image:
[^1]: Reiber H (1994). The hyperbolic function: a mathematical solution of the protein flux/CSF flow model for blood-CSF barrier function J Neurol Sci 126:243-245.
[^2]: Reiber H (1994). Flow rate of cerebrospinal fluid (CSF)- a concept common to normal blood-CSF barrier function and to dysfunction in neurological diseases. J Neurol Sci 122:189-203
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 reiberdiagram-1.0.7.tar.gz.
File metadata
- Download URL: reiberdiagram-1.0.7.tar.gz
- Upload date:
- Size: 57.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.5 CPython/3.12.3 Linux/6.8.0-51-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ac83cab51b5c7b17698b96cbcf12a1df72dd433e4ae4918c8c956aa513946684
|
|
| MD5 |
e9e9fa3a89cf795ed751e65efe264a7a
|
|
| BLAKE2b-256 |
1322e8489c80b351b2074c9507b970ddbcbc3ba6a380319c67c208fa9366fc53
|
File details
Details for the file reiberdiagram-1.0.7-py3-none-any.whl.
File metadata
- Download URL: reiberdiagram-1.0.7-py3-none-any.whl
- Upload date:
- Size: 56.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.5 CPython/3.12.3 Linux/6.8.0-51-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1c4438a3798723a123ac57bf9c33a9c4bd916f7c7dae79e89518a3f35a2baf11
|
|
| MD5 |
6d4218e105ac8b6329ea0b5335c8cbf0
|
|
| BLAKE2b-256 |
630ce8af1692835b1aa11e736bfeabd2dd2ffbd4e0218a256f56e0a69f7b4b5e
|