Real World Evidence utilities and reporting
Project description
Real world evidence of siRNA targets
The current pipeline generates real world genetic evidence documents for an siRNA target using either cross-source summary statistics or biobank-specific participant-level data. The report can be used for the following three broader utilities:
- Discover new target-indication pairs
- Safety evaluation of potential target
- Repurposing opportunity of existing target
Description of the report
The package now supports two report modes:
summarybiobank
Summary report
The summary report includes only cross-biobank and source-level summary evidence:
- Clinical records
- Labs and measurements
- Biomarkers
- Indication-specific reports
It does not include:
- Variant information
- Demographics
- Labs result profile images
- Survey information
- Homozygous loss of function carriers
Biobank report
The biobank report is biobank-specific and currently supports aou.
It includes:
- Variant information and demographics
- Labs and measurement figures
- Survey information
- Homozygous loss of function carriers
Future updates might have the following additional sections:
- OpenTargets
- Knowledge portal networks: https://hugeamp.org/research.html?pageid=kpn_portals
- Genomics England information: https://www.genomicsengland.co.uk/
- Genes and Health information: https://www.genesandhealth.org/
- Generate automated ppt report
- Link AI via api to generate summary of the indication specific section
- Use AI to generate ppt report for efficacy
Variant information and demographics
Variant information
Provides number of pLoF carriers across four variant categories in the All of Us cohort:
- stop gained
- frameshift
- splice acceptor
- splice donor
Demographics
Includes age, sex, ancestry and ethnicity information of pLoF carriers in comparison with non-carriers.
Clinical records
Provides phenomewide association study results of pLoF carriers in All of Us and UK Biobank cohorts. The All of Us association results are generated in-house. The UK Biobank results are collected from GeneBass and the AstraZeneca PheWAS portal.
Labs and measurements
Provides lab and measurement association results for pLoF carriers in All of Us and UK Biobank cohorts in comparison to non-carriers.
Detailed measurement definitions and concept IDs are maintained in docs/labs_and_measurements.md (included in the source distribution).
Survey information
Includes self-reported survey information about general, mental, physical and overall health of pLoF carriers in comparison with non-carriers in the All of Us cohort. This section is used only in biobank mode.
Homozygous loss of function carriers
Provides demographics and survey information of the biallelic lof variant carriers in All of Us.
Biomarkers
Provides association statistics of gene pLoF with biomarker measurements, including plasma protein levels.
Indication specific report
Provides association results for user-specified indications from All of Us and UK Biobank cohorts.
The recommended and current default workflow uses the target-profiler indication mapping database and requires an explicit SQLite database path. Traits are classified into:
- core
- established
- peripheral
- unrelated
The indication tables now include a Predicted association column, and rows are grouped in this order:
- core
- established
- peripheral
- unrelated
Within each group, rows are sorted by p-value.
Traits that do not exactly match the database trait universe are not included in the indication table. They are written to source-specific log files in the report output directory:
aou_unmatched_indication_traits.txtgenebass_unmatched_indication_traits.txtastrazeneca_unmatched_indication_traits.txt
Keyword-based indication matching remains available only as an explicit legacy option and is being phased out.
The indication scope has expanded substantially and is now documented separately in docs/indication_scope.md, including the current database-backed indication count and trait-universe size.
Resources used to generate the report
Controlled Datasets
All of Us
The All of Us cohort currently consists of 420k participants with whole genome sequencing and phenotypic data.
Open Source Databases
Here we describe the open source databases used for gathering evidence about the targets:
GeneBass
GeneBass reports phenomewide associations for LoF carriers among 380k participants from the UK Biobank cohort.
AstraZeneca PheWAS portal
AstraZeneca reports phenomewide associations for LoF carriers among 500k participants from the UK Biobank cohort.
Updates and Installation
Separately in TODO
Internal Use for installation
# upgrade packages for building
python -m pip install -U pip build
pip install twine
# New version packaging and upload
rm -rf dist build *.egg-info src/*.egg-info
# PowerShell:
Remove-Item -Recurse -Force dist, build, *.egg-info, src\*.egg-info
conda activate rwe
python -m build
pip install dist/rwe-0.1.4-py3-none-any.whl
python -c "from rwe.generate_report import generate_rwe_report; import rwe.clients.aou as aou; import rwe.clients.azn as azn; import rwe.clients.genebass as gbs; print('import ok')"
twine upload dist/*
# Before packaging environment test
conda install -c conda-forge python=3.12
pip install -r requirements.txt
playwright install
python -m playwright install-deps
Report configuration
The report generator supports two explicit modes:
summarybiobank
Example:
from rwe.generate_report import generate_rwe_report
generate_rwe_report(
gene="PCSK9",
chrm="1",
mode="summary",
indications="hyperlipidemia",
indication_mapping_mode="database",
indication_db_path=r"C:\Users\dbanerjee\work\target-profiler\data\mappings\database\indication_trait_gpt5.sqlite",
aou_project_dir="s3://your-bucket/summary_statistics/plof/processed",
allofus=True,
genebass=True,
astrazeneca=True,
verbose=True,
)
Set verbose=True to print the indication-slide conclusion to stdout while the full run log is still written to the .log file next to the DOCX output.
Summary mode with a user-defined AoU project directory:
generate_rwe_report(
gene="NPPA",
chrm="1",
mode="summary",
indications="heart_failure",
indication_mapping_mode="database",
indication_db_path=r"C:\Users\dbanerjee\work\target-profiler\data\mappings\database\indication_trait_gpt5.sqlite",
aou_project_dir="s3://your-bucket/summary_statistics/plof/processed",
allofus=True,
genebass=True,
astrazeneca=True,
out_docx_path="data/NPPA/RWE_NPPA_summary_report.docx",
)
Multiple genes and indications in summary mode:
from pathlib import Path
genes = [
{"gene": "MC4R", "chrm": "18", "indications": "obesity"},
{"gene": "PCSK9", "chrm": "1", "indications": "hyperlipidemia"},
]
root = Path("data/batch_summary_runs")
root.mkdir(parents=True, exist_ok=True)
for item in genes:
gene_dir = root / item["gene"]
gene_dir.mkdir(parents=True, exist_ok=True)
generate_rwe_report(
gene=item["gene"],
chrm=item["chrm"],
mode="summary",
indications=item["indications"],
indication_mapping_mode="database",
indication_db_path=r"C:\Users\dbanerjee\work\target-profiler\data\mappings\database\indication_trait_gpt5.sqlite",
aou_project_dir="s3://your-bucket/summary_statistics/plof/processed",
allofus=True,
genebass=True,
astrazeneca=True,
out_docx_path=str(gene_dir / f"RWE_{item['gene']}_summary_report.docx"),
generate_pptx=True,
verbose=True,
)
Legacy keyword mode example:
generate_rwe_report(
gene="PCSK9",
chrm="1",
mode="summary",
indications="obesity",
indication_mapping_mode="keywords",
allofus=True,
genebass=True,
astrazeneca=True,
)
Biobank example:
generate_rwe_report(
gene="PCSK9",
chrm="1",
mode="biobank",
biobank="aou",
generate_pptx=False,
)
Resources
- ICD to Phecode mappings: https://www.vumc.org/wei-lab/sites/default/files/public_files/ICD_to_Phecode_mapping.csv
- gnomAD v4.1 constriant metrics: https://gnomad.broadinstitute.org/data
- phecodeX labels: https://github.com/PheWAS/PhecodeX
- nptv carriers gnomad and genebass: Internal (Shicheng)
- nptv carriers aou: Internal (Deepro)
- Clingen haploinsufficiency curation: https://search.clinicalgenome.org/kb/downloads#section_dosage
- Decipher haploinsufficiency index: https://www.deciphergenomics.org/files/downloads/HI_Predictions_Version3.bed.gz
- Clingen disease summary: https://search.clinicalgenome.org/kb/downloads#section_gene-disease-validity
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rwe-0.1.4.tar.gz.
File metadata
- Download URL: rwe-0.1.4.tar.gz
- Upload date:
- Size: 6.9 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f8391563405607934f6bd4ea0f889ad0df668bed4ea6658f080b88f1f3e239aa
|
|
| MD5 |
ec7f6ca3db6c13b63ba4533314e0b507
|
|
| BLAKE2b-256 |
5a3d62a1faa1b8e8b49659e38dffc1b4ac4bdbe658bd69626c7f74351a38e333
|
File details
Details for the file rwe-0.1.4-py3-none-any.whl.
File metadata
- Download URL: rwe-0.1.4-py3-none-any.whl
- Upload date:
- Size: 6.9 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
483639d65d3de5e8ac95be1d7da648eae0adc1f97fdb9d81ef8096c12ad27244
|
|
| MD5 |
d8a8ecfc9a129192ced0d29589126ccf
|
|
| BLAKE2b-256 |
67637c240d566329d2b577c7a5015cc1b295b0924b18fdfa742d75e4a3dc3e56
|