Skip to main content

PhenEx is a Python package for analysis-ready datasets from real-world data

Project description

PhenEx: Automatic PHENotype EXtractor

PhenEx Logo

What is PhenEx?

PhenEx -- pronouned "Phoenix" -- is a cutting-edge framework designed to simplify the extraction and analysis of patient cohorts starting from raw real-world medical data as part of observational study execution. Using a meta-language closely aligned to plain English, PhenEx allows you to define and calculate index dates, inclusion and exclusion criteria, baseline characteristics, and outcome event tables based on arbitrarily complex criteria.

Questions you can answer using PhenEx include, but are not limited to:

  • What is the incidence of diabetes among patients aged 50-70?
  • How many patients with a history of stroke have also had a diagnosis of atrial fibrillation and prescribed anticoagulants?
  • What are the common comorbidities observed in patients with hypertension?
  • How do medication adherence rates compare between different patient demographics?
  • What proportion of patients who have been diagnosed with breast cancer receive genetic testing for BRCA1 and BRCA2 mutations?
  • Among patients treated for acute myocardial infarction (AMI), how many have been re-admitted to the hospital within six months for heart-related issues?
  • How many patients with a diagnosis of rheumatoid arthritis have been prescribed at least three different disease-modifying antirheumatic drugs (DMARDs) over their treatment history?

Who is PhenEx for?

PhenEx is for anyone seeking to analyze real-world patient data, such as claims, electronic health records or disease registries.

  • Pharmaceutical and Biotech Companies: Accelerate drug development and market access strategies. PhenEx helps you identify patient populations for clinical trials, analyze real-world treatment patterns, and assess the safety and efficacy of new therapies.
  • Epidemiologists and Public Health Professionals: Conduct comprehensive epidemiological studies and public health surveillance. PhenEx enables you to define and extract complex phenotypes, track health outcomes, and respond to public health challenges effectively.
  • Data Scientists and Analysts: Simplify the process of data extraction and cohort building. PhenEx provides powerful tools to transform raw data into structured, analysis-ready datasets, enabling you to focus on generating actionable insights.

Why should I use PhenEx?

  1. PhenEx is free, open-source and interoperable with a large number of data warehouse backends. Regardless of where you host your data, you can use PhenEx to extract cohorts from it.

  2. PhenEx is data format agnostic. Whether your data is in the OMOP Common Data Model or something else, PhenEx can handle it with only minimal compatibility transformations. The most common data formats are already built-in and understood by PhenEx.

  3. PhenEx supports complex phenotypes. PhenEx covers not only basic use cases but also handles arbitrarily complex phenotypes (e.g. ISTH major bleeding, CHADSVASc). With PhenEx, you can define and extract intricate phenotypes, empowering you to tackle a wide range of research questions.

  4. PhenEx is extensible. If your phenotype is not covered by the existing classes, you can easily create your own implementation using the provided abstract base classes. If you encounter a common pattern that is missing, simply open an issue, and we'll be delighted to consider it for inclusion in the core packages.

  5. PhenEx is scalable. Whether you have a simple feasibility analysis or a full-blown research protocol with 20 inclusion criteria and 100 baseline characteristics, PhenEx can build your cohort.

  6. PhenEx includes a web application for non-Python users. Build and visualize cohorts through an intuitive web interface with AI-powered assistance.

  7. PhenEx offers AI integration to help with cohort building and phenotype definition, making complex studies more accessible.

What is PhenEx not?

  • PhenEx does not currently work with unstructured medical data. We make minimal assumptions on the structure of the data, but do require the data to first be in tabular form.

Getting Started

PhenEx can be used in two ways:

Python Library

Head on over to the Official PhenEx Documentation for comprehensive tutorials and API documentation. If you have any questions, please feel free to reach out to any of the developers and we'll be happy to get you on your way.

Web Application

PhenEx also includes a user-friendly web application for a visual approach to real-world data analysis. The web app provides:

  • Intuitive interface for building cohorts
  • AI-powered assistance for phenotype definition
  • Visualization of cohort results
  • Interactive cohort editing capabilities

To get started with the web app, refer to the deployment instructions in the app/ directory of the ui branch. The web app is currently in alpha. Expect bumps in the road as an early user, but also expect priority support as we are eager to get feedback.

API Stability

Please note that we are adding features at an intense pace. As a result, we cannot always guarantee backwards compatibility when we're making updates. Sometimes new features require new thinking about how things are done.

Therefore, for the 0.* series of releases we do not guarantee API stability. That means upgrading may break your scripts. We use the convention that 0.X.Y -> 0.X.Z is non-breaking. 0.X.Y -> 0.(X+1).0 may be breaking, but we try to keep breakage to a minimum and "worth it".

If your scripts break upon upgrading, please reach out to one of the developers and we will happily help you. Starting with 1.0, we will not break between minor revisions.

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

phenex-0.7.8.tar.gz (199.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

phenex-0.7.8-py3-none-any.whl (238.9 kB view details)

Uploaded Python 3

File details

Details for the file phenex-0.7.8.tar.gz.

File metadata

  • Download URL: phenex-0.7.8.tar.gz
  • Upload date:
  • Size: 199.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for phenex-0.7.8.tar.gz
Algorithm Hash digest
SHA256 9dd8cdede35e17e6d3ea07ce75f79346af98ab972868c89d0a59f8c0492d9f45
MD5 113e1f97a828a16148fc5d3a3c52e13d
BLAKE2b-256 c272561f89fa973ad5a4e1520655825af15318579a703fb728737106eb98b0f5

See more details on using hashes here.

Provenance

The following attestation bundles were made for phenex-0.7.8.tar.gz:

Publisher: pypi.yml on Bayer-Group/PhenEx

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file phenex-0.7.8-py3-none-any.whl.

File metadata

  • Download URL: phenex-0.7.8-py3-none-any.whl
  • Upload date:
  • Size: 238.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for phenex-0.7.8-py3-none-any.whl
Algorithm Hash digest
SHA256 6936a0f43c19c35261309b48d754d34d50e72ea2be2044e3fcbc2c23e5761e19
MD5 a5cfffa4d93b37c4e1b281007f7671a5
BLAKE2b-256 0bd778b68418d93ae077b772fbd2003a4f7e5c07b811d1f699292f8eb07131bf

See more details on using hashes here.

Provenance

The following attestation bundles were made for phenex-0.7.8-py3-none-any.whl:

Publisher: pypi.yml on Bayer-Group/PhenEx

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page