Skip to content

Commit e21e19c

Browse files
committed
docs
1 parent 6150698 commit e21e19c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+4029
-1
lines changed

.github/workflows/mkdocs.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Deploy Documentation
2+
3+
permissions:
4+
contents: read
5+
pages: write
6+
id-token: write
7+
8+
on:
9+
push:
10+
branches:
11+
- main
12+
13+
jobs:
14+
build:
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- uses: actions/checkout@v3
19+
- uses: actions/setup-python@v4
20+
with:
21+
python-version: "3.12" # install the python version needed
22+
- name: install deps
23+
run: |
24+
apt-get update && apt-get install -y wget gcc
25+
pip install -r requirements.txt
26+
- name: build docs
27+
run: |
28+
PYTHONPATH=. mkdocs build
29+
- uses: actions/upload-artifact@v4
30+
with:
31+
name: page
32+
path: site
33+
if-no-files-found: error
34+
35+
deploy:
36+
runs-on: ubuntu-latest
37+
needs: build
38+
environment:
39+
name: github-pages
40+
url: ${{steps.deployment.outputs.page_url}}
41+
42+
steps:
43+
- uses: actions/download-artifact@v4
44+
with:
45+
name: page
46+
path: .
47+
- uses: actions/configure-pages@v1
48+
- uses: actions/upload-pages-artifact@v2
49+
with:
50+
path: .
51+
- id: deployment
52+
uses: actions/deploy-pages@v3

.github/workflows/pypi.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Release
2+
3+
permissions:
4+
contents: write
5+
pages: write
6+
id-token: write
7+
8+
on:
9+
release:
10+
tags:
11+
- "v[0-9]+.[0-9]+.[0-9]+"
12+
13+
jobs:
14+
pypi-publish:
15+
runs-on: ubuntu-latest
16+
environment:
17+
name: pypi
18+
url: https://pypi.org/p/phenex
19+
permissions:
20+
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
21+
steps:
22+
- name: Checkout Repository 🛎️
23+
uses: actions/checkout@v3
24+
- name: Install Python 3.9 🐍
25+
uses: actions/setup-python@v4
26+
with:
27+
python-version: "3.9"
28+
- name: Clean old build artifacts
29+
run: rm -rf dist/*
30+
- name: Build deps
31+
run: python3 -m pip install -r requirements.txt && pip install wheel
32+
- name: Build artifacts
33+
run: python setup.py sdist bdist_wheel
34+
- name: Publish package distributions to PyPI
35+
uses: pypa/gh-action-pypi-publish@release/v1

.github/workflows/pytest.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Run unit tests
2+
3+
on: push
4+
5+
jobs:
6+
run_test_pipeline:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Checkout Repository
10+
uses: actions/checkout@v3
11+
- name: install python 3.12
12+
uses: actions/setup-python@v3
13+
with:
14+
python-version: "3.12"
15+
cache: "pip"
16+
- name: install requirements
17+
run: pip install -r requirements.txt
18+
- name: run tests
19+
run: PYTHONPATH=. pytest

.gitignore

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
__pycache__/
2+
*pyc
3+
*ipynb
4+
site/
5+
build/
6+
dist/
7+
*.egg-info
8+
*.bbl
9+
*.aux
10+
*.log
11+
*.blg
12+
.DS_Store
13+
notebooks/*
14+
mlruns/*
15+
site/*
16+
.devcontainer/*
17+
.idea
18+
.idea/*
19+
venv/*
20+
kubernetes
21+
kubernetes/*
22+
kubernetes/deployment.yml

.nojekyll

Whitespace-only changes.

CODEOWNERS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
* @sprivite
2+
* @a-hartens

CONTRIBUTING.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# How to contribute
2+
3+
You can contribute to this project in two ways:
4+
5+
1. **Reporting bugs** and **suggesting enhancements** by opening an issue.
6+
2. **Contributing to the codebase** by opening a pull request.
7+
8+
## Reporting bugs and suggesting enhancements
9+
10+
To report a bug or suggest an enhancement, open an issue on the [Issues]. If
11+
reporting a bug, please provide a detailed description of the problem, including
12+
the steps to reproduce it. If suggesting an enhancement, please provide a clear
13+
description of the proposed change, including the use case for the change.
14+
15+
## Contributing to the codebase
16+
17+
To contribute to the codebase, open a pull request on the [Pull Requests](https://github.com/Bayer-Group/phenx/pulls).
18+
19+
All pull requests must be approved by at least one reviewer. If there is a
20+
dispute regarding a pull request, a second reviewer will be asked to review the
21+
pull request and make the final decision.
22+
23+
A pull request can and should be rejected if any of the following apply:
24+
25+
- Existing tests have not been run and passed
26+
- The code does not follow the project's coding conventions
27+
- New functionality has not been documented
28+
- Tests for new functionality have not been written
29+
- The pull request is too large
30+
- The pull request addresses more than one issue
31+
- The pull request breaks code that was previously working
32+
33+
It is the responsibility of the contributor to ensure that the pull request meets
34+
all these conditions. If the pull request is rejected, the contributor should
35+
address the issues raised and open a new pull request.
36+
37+
## Coding conventions
38+
39+
Unless specified otherwise here, the codebase follows the [PEP 8](https://peps.python.org/pep-0008/)
40+
style guide for Python code.
41+
42+
We use snake_case for variable, function and method names, and CamelCase for
43+
class names. Method names should be descriptive and generally start with a verb.
44+
Methods should be private unless there is good reason for them to be public. A
45+
higher standard is expected for documentation of public methods, since these
46+
directly face the user, and changes to public methods require higher level of
47+
scrutiny. But this does not mean that private methods should be undocumented if
48+
they provide crucial functionality.

LICENSE

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
BSD 3-Clause License
2+
3+
Copyright (c) 2024, Bayer AG.
4+
5+
Redistribution and use in source and binary forms, with or without modification,
6+
are permitted provided that the following conditions are met:
7+
8+
- Redistributions of source code must retain the above copyright notice, this
9+
list of conditions and the following disclaimer.
10+
11+
- Redistributions in binary form must reproduce the above copyright notice, this
12+
list of conditions and the following disclaimer in the documentation and/or
13+
other materials provided with the distribution.
14+
15+
- Neither the name of the copyright holder nor the names of its contributors may
16+
be used to endorse or promote products derived from this software without
17+
specific prior written permission.
18+
19+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
20+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
21+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
23+
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
24+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
25+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
26+
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
28+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

README.md

Lines changed: 52 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,52 @@
1-
# PhenEx
1+
# PhenEx: Automatic PHENotype EXtractor
2+
3+
<a href="https://github.com/Bayer-Group/phenx">
4+
<div style="text-align: center;">
5+
<img src="phenx.png" alt="PhenEx Logo" width="500" />
6+
</div>
7+
</a>
8+
9+
## What is PhenEx?
10+
11+
PhenEx -- pronouned "Phoenix" -- is a cutting-edge cohort builder designed to simplify the extraction of analysis-ready datasets from raw real-world 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.
12+
13+
Questions you can answer using PhenEx include, but are not limited to:
14+
15+
- What is the incidence of diabetes among patients aged 50-70?
16+
- How many patients with a history of stroke have also had a diagnosis of atrial fibrillation and prescribed anticoagulants?
17+
- What are the common comorbidities observed in patients with hypertension?
18+
- How do medication adherence rates compare between different patient demographics?
19+
0 What proportion of patients who have been diagnosed with breast cancer receive genetic testing for BRCA1 and BRCA2 mutations?
20+
- Among patients treated for acute myocardial infarction (AMI), how many have been re-admitted to the hospital within six months for heart-related issues?
21+
What is the incidence of diabetes among patients aged 50-70?
22+
- 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?
23+
24+
## Who is PhenEx for?
25+
26+
PhenEx is for anyone seeking to analyze real-world patient data, such as claims, electronic health records or disease registries.
27+
28+
- **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.
29+
- **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.
30+
- **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.
31+
32+
## Why should I use PhenEx?
33+
34+
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.
35+
36+
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.
37+
38+
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.
39+
40+
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.
41+
42+
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.
43+
44+
## What is PhenEx _not_?
45+
46+
- PhenEx does not clean your data. Garbage-in-garbage-out, so please invest time in cleaning your data before attempting to perform observational research using it.
47+
48+
- PhenEx does not perform outcome analysis, e.g., Kaplan-Meier estimation or Cox regressions. PhenEx only prepares the analysis dataset for downstream analysis. For outcome analysis in Python, the [lifelines](https://lifelines.readthedocs.io/en/latest/) package is a good place to start; in R, the [surv](https://cran.r-project.org/web/packages/survival/index.html) package is fairly popular.
49+
50+
## I'm convinced! How can I get started?
51+
52+
Head on over to the [Official PhenEx Documentation](https://bayer-group.github.io/PhenEx). 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.

0 commit comments

Comments
 (0)