A/T/N staging for Alzheimer's Disease based on CSF biomarkers
Project description
atn
Based on the A/T/N/ classification scheme for Alzheimer's disease biomarkers Jack et al., 2016, what this Python module does is basically applying predefined thresholds to a given DataFrame (containing biomarker data such as cerebrospinal fluid (CSF) levels of ABeta42, ptau, ttau) and building multiple lists of subjects with distinct profiles according to their CSF biomarkers.
Example (with random data):
import random
n = 10
abeta42 = [random.randrange(600e3, 1800e3)/1e3 for e in range(0, n)]
ptau = [random.randrange(4e3, 80e3)/1e3 for e in range(0, n)]
ttau = [random.randrange(97e3, 500e3)/1e3 for e in range(0, n)]
data = pd.DataFrame(data=[abeta42, ptau, ttau], index=['abeta42', 'ptau', 'ttau']).transpose()
data
abeta42 ptau ttau 0 1142.327 76.636 375.448 1 833.484 77.321 181.75 2 951.601 6.981 309.215 3 1623.797 65.063 232.303 4 920.706 62.899 310.1 5 704.215 58.526 160.826 6 1687.357 53.335 422.249 7 1701.997 68.676 173.33 8 1774.046 37.214 255.638 9 939.946 21.128 164.803
import atn
staging = atn.stage(data, thresholds = {'abeta42':1100, 'ptau':19.2, 'ttau':242})
staging
A T N ID 0 FALSE TRUE TRUE 1 TRUE TRUE FALSE 2 TRUE FALSE TRUE 3 FALSE TRUE FALSE 4 TRUE TRUE TRUE 5 TRUE TRUE FALSE 6 FALSE TRUE TRUE 7 FALSE TRUE FALSE 8 FALSE TRUE TRUE 9 TRUE TRUE FALSE
print(atn.staging_summary(staging))
CSF amyloid (A) positive/negative: 5/5 CSF ptau (T) positive/negative: 9/1 CSF ttau (N) positive/negative: 5/5
A+T+: 4 A+T-: 1 A-T-: 0 A-T+ (SNAPs): 5
A+T+N+: 1 A+T+N-: 3 A-T+N+: 3 A-T+N-: 2 A-T-N-: 0 A-T-N+: 0 Total subjects: 10
So yes, it is simple, stupid. But this allows one to quickly select groups of subjects as follows:
groups = atn.groups(staging)
data.loc[groups['A+'].index]
abeta42 ptau ttau ID 1 833.484 77.321 181.75 2 951.601 6.981 309.215 4 920.706 62.899 310.1 5 704.215 58.526 160.826 9 939.946 21.128 164.803
Dependencies
- Python >= 3.5
- Pandas >= 0.24.1
Install
First make sure you have installed all the dependencies listed above. Then you can install atn by running the following command in a command prompt:
pip install atn
Project details
Release history Release notifications | RSS feed
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
File details
Details for the file atn-0.0.2.tar.gz
.
File metadata
- Download URL: atn-0.0.2.tar.gz
- Upload date:
- Size: 2.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.7.3 requests-toolbelt/0.9.1 tqdm/4.30.0 CPython/3.6.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4e6aa848bc899a4585defe5e16e809759cd6d28734da99e83881efe8ba0d1247 |
|
MD5 | 1c1ddaa9e9c4c08fbad9c7199f392fdd |
|
BLAKE2b-256 | 55d273da5d9b517b85e73ff5422fd3daa81acc06be9af9ac08b2e551dcf11960 |
File details
Details for the file atn-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: atn-0.0.2-py3-none-any.whl
- Upload date:
- Size: 15.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.7.3 requests-toolbelt/0.9.1 tqdm/4.30.0 CPython/3.6.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4fdc22b266436af5b0990fce402d47863ab72f39958d0982aeface7677c3c1fc |
|
MD5 | f74154784bb45247d24d80dc3c8d0e50 |
|
BLAKE2b-256 | fd3944ffd40287f1e4dae15f934a94b77c84e99832ac830659c937f633fb6b77 |