No project description provided
Project description
pymsprog: reproducible assessment of disability progression in MS
pymsprog
provides tools for exhaustive and reproducible analysis of disability progression
in multiple sclerosis (MS) from longitudinal data.
Its core function, MSprog
, detects and characterises the progression events
of an outcome measure (EDSS, NHPT, T25FW, or SDMT) for one or more subjects,
based on repeated assessments through time and on the dates of acute episodes.
A detailed tutorial in the form of a Jupyter Notebook (pymsprog_tutorial.ipynb
)
is available in the repo.
Installation
You can install the latest release of pymsprog
with:
pip install pymsprog
Alternatively, the development version can be downloaded from GitHub.
Usage
MSprog
detects the events sequentially by scanning the outcome values in chronological order,
and classifies progression events as relapse-associated or relapse-independent based on their
relative timing with respect to the relapses [1, 2, 3].
Several qualitative and quantitative options for event detection are given as arguments that can be set by the user and reported as a complement to the results to ensure reproducibility. These include the baseline scheme (fixed or roving), the events to be detected (first or multiple, progression and/or improvement), the length of the relapse influence window and of the event confirmation period(s) with the relative tolerance.
The example below illustrates the function's usage and outputs:
from pymsprog import MSprog
import pandas as pd
# Load toy data
toydata_visits = pd.read_excel('MSprog_toydata.xlsx', sheet_name='visits')
toydata_relapses = pd.read_excel('MSprog_toydata.xlsx', sheet_name='relapses')
# Compute progression
summary, results = MSprog(toydata_visits, # insert data on visits
subj_col='id', value_col='EDSS', date_col='date', # specify column names
event='multiple', baseline='roving', # modify default options on event detection
relapse=toydata_relapses) # insert data on relapses
---
Outcome: EDSS
Confirmation at: [3]mm (-30dd, +30dd)
Baseline: roving
Relapse influence: 30dd
Events detected: multiple
---
Total subjects: 4
---
Progressed: 3 (PIRA: 3; RAW: 1)
Improved: 1
---
Progression events: 4 (PIRA: 3; RAW: 1)
Improved: 1
The function prints out a concise report of the results, as well as
the specific set of options used to obtain them.
Complete results are stored in two pandas
DataFrame
objects generated by the function call:
- A summary table providing the event count for each subject and event type:
event_sequence improvement progression RAW PIRA undefined_prog
PIRA 0 1 0 1 0
RAW, PIRA 0 2 1 1 0
0 0 0 0 0
impr, PIRA 1 1 0 1 0
where: event_sequence
specifies the order of the events;
the other columns count the events of each type.
- Extended info on each event for all subjects:
id nevent event_type time2event conf3 sust_days sust_last
1 1 PIRA 292 1 125 1
2 1 RAW 198 1 0 0
2 2 PIRA 257 1 90 1
4 1 impr 77 1 0 0
4 2 PIRA 129 1 204 1
where: nevent
is the cumulative event count for each subject; event_type
characterises the event;
time2event
is the number of days from baseline to event; conf3
reports whether the event was
confirmed; sust_days
is the number of days for which the event was sustained after confirmation;
sust_last
reports whether the event was sustained until the last visit.
References
[1] Lublin FD, Reingold SC, Cohen JA, Cutter GR, Sørensen PS, Thompson AJ, et al. Defining the clinical course of multiple sclerosis. Neurology [Internet]. 2014;83:278–86. Available from: https://n.neurology.org/content/83/3/278
[2] Kappos L, Butzkueven H, Wiendl H, Spelman T, Pellegrini F, Chen Y, et al. Greater sensitivity to multiple sclerosis disability worsening and progression events using a roving versus a fixed reference value in a prospective cohort study. Multiple Sclerosis Journal [Internet]. 2018;24:963–73. Available from: https://doi.org/10.1177/1352458517709619
[3] University of California SFM-ET, Cree BAC, Hollenbach JA, Bove R, Kirkish G, Sacco S, et al. Silent progression in disease activity–free relapsing multiple sclerosis. Annals of Neurology [Internet]. 2019;85:653–66. Available from: https://onlinelibrary.wiley.com/doi/abs/10.1002/ana.25463
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 pymsprog-0.1.1.tar.gz
.
File metadata
- Download URL: pymsprog-0.1.1.tar.gz
- Upload date:
- Size: 16.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.0 CPython/3.7.3 Darwin/21.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9dd3f4fc23c8419e9e1064542857f8fdb798772b9133bf3b375c36d178be8cb8 |
|
MD5 | 3a6590a81b240d4c473e11fe5f430320 |
|
BLAKE2b-256 | 18636dd44fbbe1663e9a471d65599f8ec5595a1d337a7ff214ff293b26630d2c |
File details
Details for the file pymsprog-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: pymsprog-0.1.1-py3-none-any.whl
- Upload date:
- Size: 15.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.0 CPython/3.7.3 Darwin/21.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9fe440064ded3520207c31ab1579653a631fea955096fbc33abdf35bf9251b2a |
|
MD5 | cb42ded7ba18457c1d492403325756ae |
|
BLAKE2b-256 | cdf0229cbd7e569a1a3b2c1f894028f0af4ba379811c3368a7ecea36b66083b2 |