Apache License 2.0

项目介绍

theislab/ehrapy 是一个托管在 GitHub 上的开源项目,主要使用 Python 编写,采用 Apache License 2.0 许可证,目前获得 371 个 Star、55 次 Fork。

仓库全名
theislab/ehrapy
开源许可证
Apache License 2.0
Star 数
371
Fork 数
55
未关闭 Issue
7

README 摘要

ehrapy: electronic health record (EHR) analysis in Python ehrapy is an open-source Python framework for exploratory and statistical analysis of electronic health records (EHR) and other clinical and epidemiological data. It reads static and longitudinal patient data from OMOP databases, public datasets such as MIMIC and PhysioNet, or your own tables. It is for clinical researchers, epidemiologists and data…

完整内容见 GitHub 原始 README 或本页 。

常见问题

ehrapy 用什么语言开发?

主要使用 Python 编写,采用 Apache License 2.0 许可证,目前有 371 个 Star。

ehrapy 可以免费商用吗?

仓库采用 Apache License 2.0 许可证,可免费使用与修改,商业使用请遵守许可证条款(例如保留版权声明与许可声明)。

如何获取 ehrapy 的源码?

可以直接克隆仓库:git clone https://github.com/theislab/ehrapy.git,默认分支为 main;安装与运行步骤见仓库 README。

ehrapy 最近还在维护吗?

仓库最近一次更新为 1 天前,当前有 7 个未关闭 Issue;Star 数为 371,可作为社区活跃度的参考。

关于

Electronic Health Record Analysis with Python.

描述取自 GitHub 官方 API,中文内容由 GitRead 中文社区 编辑团队整理。

简要分析

热度分
483
价值分
238
活跃状态
活跃

语言占比

Python

Release

README

Build Codecov License PyPI Python Version Read the Docs Test pre-commit

ehrapy logo

ehrapy: electronic health record (EHR) analysis in Python

ehrapy is an open-source Python framework for exploratory and statistical analysis of electronic health records (EHR) and other clinical and epidemiological data. It reads static and longitudinal patient data from OMOP databases, public datasets such as MIMIC and PhysioNet, or your own tables. It is for clinical researchers, epidemiologists and data scientists who want to go from raw patient data to quality-controlled cohorts, patient groups, trajectories, statistical tests, survival curves and treatment effect estimates in one reproducible workflow. With ep.ml, it also trains and evaluates prediction models on the same data, from gradient boosting to recurrent and transformer networks, with patient-level splits, calibration and subgroup metrics.

ehrapy overview: data preparation, data preprocessing and knowledge inference

Installation

You can install ehrapy via pip from PyPI:

$ pip install ehrapy

Optional extras enable dask-backed out-of-core arrays (ehrapy[dask]), Leiden clustering (ehrapy[leiden]), deep learning prediction models (ehrapy[ml]), and GPU acceleration through rapids-singlecell (ehrapy[rapids12] or ehrapy[rapids13]).

Quickstart

Cluster 11,988 intensive care stays from PhysioNet 2012, each with 37 measurements over 48 hours, and test which measurements differ between patients who died and survived, after pip install "ehrapy[leiden]":

import ehrdata as ed
import ehrapy as ep

edata = ed.dt.physionet2012()  # 11,988 ICU stays × 37 measurements × 48 hours
ed.infer_feature_types(edata)
ep.pp.locf_impute(edata)
ep.pp.scale_norm(edata)

summary = ep.pp.summarize_measurements(edata, statistics=["mean", "min", "max"])
summary.obs["outcome"] = summary.obs["In-hospital_death"].map({0: "survived", 1: "died"}).astype("category")
ep.pp.pca(summary)
ep.pp.neighbors(summary)
ep.tl.leiden(summary, resolution=0.3)
ep.tl.umap(summary)
ep.pl.umap(summary, color=["leiden", "outcome"])

ep.tl.rank_features_groups(summary, groupby="outcome", groups=["died"], reference="survived")
ep.get.rank_features_groups_df(summary, group="died")[["names", "scores", "pvals_adj"]].head()

UMAP of PhysioNet 2012 intensive care stays colored by Leiden cluster and in-hospital death

        names     scores      pvals_adj
0    GCS_mean -28.216665  1.869927e-146
1     GCS_max -22.782927  1.980853e-100
2    BUN_mean  18.654604   3.497719e-70
3     BUN_min  18.486603   2.324785e-69
4  Urine_mean -16.941847   1.399260e-59

Documentation

The documentation has the tutorials and the API reference.

Citation

fig2

Read more about ehrapy in the associated publication.

@article{Heumos2024,
  author = {Heumos, Lukas and Ehmele, Philipp and Treis, Tim and Upmeier zu Belzen, Julius and Roellin, Eljas and May, Lilly and Namsaraeva, Altana and Horlava, Nastassya and Shitov, Vladimir A. and Zhang, Xinyue and Zappia, Luke and Knoll, Rainer and Lang, Niklas J. and Hetzel, Leon and Virshup, Isaac and Sikkema, Lisa and Curion, Fabiola and Eils, Roland and Schiller, Herbert B. and Hilgendorff, Anne and Theis, Fabian J.},
  year = {2024},
  month = {11},
  day = {01},
  title = {An open-source framework for end-to-end analysis of electronic health record data},
  journal = {Nature Medicine},
  volume = {30},
  number = {11},
  pages = {3369--3380},
  issn = {1546-170X},
  doi = {10.1038/s41591-024-03214-0},
  url = {https://doi.org/10.1038/s41591-024-03214-0}
}

评论

暂无评论