Skip to content

Commit

Permalink
Merge pull request #244 from monarch-initiative/remove-obsoleted-anal…
Browse files Browse the repository at this point in the history
…ysis-code

Remove obsolete analysis code
  • Loading branch information
ielis authored Sep 4, 2024
2 parents 0c06174 + e9ff7d4 commit 0a4ebc2
Show file tree
Hide file tree
Showing 15 changed files with 8 additions and 1,784 deletions.
43 changes: 4 additions & 39 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,46 +5,11 @@

GPSEA is a Python library for discovery of genotype-phenotype associations.

An example of simple genotype-phenotype association analysis
See the [Tutorial](https://monarch-initiative.github.io/gpsea/stable/tutorial.html)
and a comprehensive [User guide](https://monarch-initiative.github.io/gpsea/stable/user-guide/index.html)
for more information.

```python
# Load HPO
import hpotk

store = hpotk.configure_ontology_store()
hpo = store.load_minimal_hpo()

# Load a cohort of phenopackets
from gpsea.data import get_toy_cohort

cohort = get_toy_cohort()

# Analyze genotype-phenotype associations
from gpsea.analysis import configure_cohort_analysis
from gpsea.analysis.predicate import PatientCategories

from gpsea.model import VariantEffect

cohort_analysis = configure_cohort_analysis(cohort, hpo)
frameshift = cohort_analysis.compare_by_variant_effect(VariantEffect.FRAMESHIFT_VARIANT, tx_id='NM_1234.5')

frameshift.summarize(hpo, category=PatientCategories.YES)
```

provides a pandas data frame with genotype-phenotype correlations:

```text
FRAMESHIFT_VARIANT on NM_1234.5 No Yes
Count Percent Count Percent p value Corrected p value
Arachnodactyly [HP:0001166] 1/10 10% 13/16 81% 0.000781 0.020299
Abnormality of the musculature [HP:0003011] 6/6 100% 11/11 100% 1.000000 1.000000
Abnormal nervous system physiology [HP:0012638] 9/9 100% 15/15 100% 1.000000 1.000000
... ... ... ... ... ... ...
```

## Documentation

Check out the User guide and the API reference for more info:
The documentation comes in two flavors:

- [Stable documentation](https://monarch-initiative.github.io/gpsea/stable/) (last release on `main` branch)
- [Latest documentation](https://monarch-initiative.github.io/gpsea/latest) (bleeding edge, latest commit on `develop` branch)
15 changes: 0 additions & 15 deletions src/gpsea/analysis/__init__.py
Original file line number Diff line number Diff line change
@@ -1,15 +0,0 @@
from ._api import CohortAnalysis, GenotypePhenotypeAnalysisResult, HpoMtcReport
# TODO This should go away
from ._config import CohortAnalysisConfiguration, configure_cohort_analysis, configure_default_protein_metadata_service, MtcStrategy
from ._gp_analysis import apply_predicates_on_patients
from ._util import prepare_hpo_terms_of_interest

__all__ = [
'configure_cohort_analysis',
'CohortAnalysis', 'GenotypePhenotypeAnalysisResult',
'CohortAnalysisConfiguration', 'MtcStrategy',
'HpoMtcReport',
'apply_predicates_on_patients',
'configure_default_protein_metadata_service',
'prepare_hpo_terms_of_interest',
]
Loading

0 comments on commit 0a4ebc2

Please sign in to comment.