Skip to content

Commit

Permalink
Bump version to v0.3.1 for release
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanwilliammd committed Apr 6, 2024
1 parent 9593bd5 commit 1df1b3a
Show file tree
Hide file tree
Showing 13 changed files with 101 additions and 22,804 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## Unreleased

## [v0.3.1](https://github.com/ivanwilliammd/iderare-pheno/releases/tag/v0.3.1) - 2024-04-07
- Fixing of utils list2tsv function
- Fix relative path of the data folder

## [v0.3.0](https://github.com/ivanwilliammd/iderare-pheno/releases/tag/v0.3.0) - 2024-04-07
- Join the similarity and recommendation class to share the same Ontology data from [hpo3 library](https://github.com/anergictcell/hpo3)
- Refactor the utils.py to be more readable and maintainable
Expand Down
96 changes: 76 additions & 20 deletions Playbook.ipynb

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,9 @@ pip install -e .
## Usage

```python
from iderare_pheno import iderare_pheno
from iderare_pheno.converter import term2omim, term2orpha, term2hpo, batchconvert
from iderare_pheno.simrec import hpo2omim_similarity, omim_recommendation, hpo2name
from iderare_pheno.utils import linkage_dendrogram, list2tsv
```

## Team
Expand Down
27 changes: 14 additions & 13 deletions iderare_pheno/converter.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
import os
import pandas as pd

# Declare the folder path for phenotype data source
phenotype_folder = "phenotype/subset"
phenotype_folder = os.path.dirname(__file__)

# Declare database useds for mapping
icd10omim = "icd102omim_subset.tsv"
loinc2hpo = "loinc2hpo_standardized.tsv"
orpha2omim = "orpha2omim_subset.tsv"
omim2hpo = "omim2hpo_subset.tsv"
snomed2hpo = "snomed2hpo_subset.tsv"
snomed2orpha = "snomed2orpha_subset.tsv"
icd10omim = os.path.join(phenotype_folder, "phenotype", "subset", "icd102omim_subset.tsv")
loinc2hpo = os.path.join(phenotype_folder, "phenotype", "subset", "loinc2hpo_standardized.tsv")
orpha2omim = os.path.join(phenotype_folder, "phenotype", "subset", "orpha2omim_subset.tsv")
omim2hpo = os.path.join(phenotype_folder, "phenotype", "subset", "omim2hpo_subset.tsv")
snomed2hpo = os.path.join(phenotype_folder, "phenotype", "subset", "snomed2hpo_subset.tsv")
snomed2orpha = os.path.join(phenotype_folder, "phenotype", "subset", "snomed2orpha_subset.tsv")

# iderare yaml configuration file
yaml_file = "iderare.yaml"
Expand All @@ -18,12 +19,12 @@
clinical_data = "clinical_data.txt"

# Read the clinical data and parse the data
icd10omim_df = pd.read_csv(phenotype_folder + "/" + icd10omim, sep="\t")
loinc2hpo_df = pd.read_csv(phenotype_folder + "/" + loinc2hpo, sep="\t")
orpha2omim_df = pd.read_csv(phenotype_folder + "/" + orpha2omim, sep="\t")
omim2hpo_df = pd.read_csv(phenotype_folder + "/" + omim2hpo, sep="\t")
snomed2hpo_df = pd.read_csv(phenotype_folder + "/" + snomed2hpo, sep="\t")
snomed2orpha_df = pd.read_csv(phenotype_folder + "/" + snomed2orpha, sep="\t")
icd10omim_df = pd.read_csv(icd10omim, sep="\t")
loinc2hpo_df = pd.read_csv(loinc2hpo, sep="\t")
orpha2omim_df = pd.read_csv(orpha2omim, sep="\t")
omim2hpo_df = pd.read_csv(omim2hpo, sep="\t")
snomed2hpo_df = pd.read_csv(snomed2hpo, sep="\t")
snomed2orpha_df = pd.read_csv(snomed2orpha, sep="\t")


# Convert SNOMED to ORPHA First
Expand Down
File renamed without changes.
File renamed without changes.
15,350 changes: 0 additions & 15,350 deletions iderare_pheno/phenotype/rawdl_20240310/ORDO.csv

This file was deleted.

7,416 changes: 0 additions & 7,416 deletions iderare_pheno/phenotype/rawdl_20240310/loinc2hpo-annotations.tsv

This file was deleted.

3 changes: 2 additions & 1 deletion iderare_pheno/simrec.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import os
from pyhpo import HPOSet, Omim, Ontology, stats

Ontology("phenotype/rawdl_20240310")
Ontology(os.path.join(os.path.dirname(__file__), "phenotype", "data"))


# Convert OMIM code to OMIM Class Object
Expand Down
2 changes: 1 addition & 1 deletion iderare_pheno/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def list2tsv(
rank = [i + 1 for i in range(len(name))]
data = {"rank": rank, "id": term_id, "name": name, "score": sim_score}
df = pd.DataFrame(data)
df.to_csv("output/{}.tsv".format(filename), index=False, sep="\t")
df.to_csv("{}.tsv".format(filename), index=False, sep="\t")
return df


Expand Down
2 changes: 1 addition & 1 deletion iderare_pheno/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
_MINOR = "3"
# On main and in a nightly release the patch should be one ahead of the last
# released build.
_PATCH = "0"
_PATCH = "1"
# This is mainly for nightly builds which have the suffix ".dev$DATE". See
# https://semver.org/#is-v123-a-semantic-version for the semantics.
_SUFFIX = ""
Expand Down
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ exclude = [
"docs*",
"scripts*"
]
include = ["iderare_pheno", "phenotype", "phenotype.*"]

[tool.setuptools]
include-package-data = true
Expand Down

0 comments on commit 1df1b3a

Please sign in to comment.