Skip to content

Commit

Permalink
rename
Browse files Browse the repository at this point in the history
  • Loading branch information
sprivite committed Nov 12, 2024
1 parent 6e743bf commit 54ab6fb
Show file tree
Hide file tree
Showing 62 changed files with 152 additions and 152 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ description of the proposed change, including the use case for the change.

## Contributing to the codebase

To contribute to the codebase, open a pull request on the [Pull Requests](https://github.com/Bayer-Group/phenx/pulls).
To contribute to the codebase, open a pull request on the [Pull Requests](https://github.com/Bayer-Group/PhenEx/pulls).

All pull requests must be approved by at least one reviewer. If there is a
dispute regarding a pull request, a second reviewer will be asked to review the
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# PhenEx: Automatic PHENotype EXtractor

<a href="https://github.com/Bayer-Group/phenx">
<a href="https://github.com/Bayer-Group/PhenEx">
<div style="text-align: center;">
<img src="phenx.png" alt="PhenEx Logo" width="500" />
<img src="phenex.png" alt="PhenEx Logo" width="500" />
</div>
</a>

Expand Down
2 changes: 1 addition & 1 deletion docs/api/phenotypes/codelist_phenotype.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# CodelistPhenotype

::: phenx.phenotypes.codelist_phenotype.CodelistPhenotype
::: phenex.phenotypes.codelist_phenotype.CodelistPhenotype
2 changes: 1 addition & 1 deletion docs/api/phenotypes/cohort.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Cohort

::: phenx.phenotypes.cohort.Cohort
::: phenex.phenotypes.cohort.Cohort
2 changes: 1 addition & 1 deletion docs/api/phenotypes/measurement_phenotype.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# MeaurementPhenotype

::: phenx.phenotypes.measurement_phenotype.MeasurementPhenotype
::: phenex.phenotypes.measurement_phenotype.MeasurementPhenotype
30 changes: 15 additions & 15 deletions docs/tutorials/phenotypes/CodelistPhenotype_Tutorial.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"metadata": {},
"outputs": [],
"source": [
"from phenx.core.tables import Codelist\n",
"from phenex.core.tables import Codelist\n",
"\n",
"# Create a codelist for Atrial Fibrillation\n",
"af_codelist = Codelist(\n",
Expand Down Expand Up @@ -114,7 +114,7 @@
"metadata": {},
"outputs": [],
"source": [
"from phenx.phenotypes import CodelistPhenotype\n",
"from phenex.phenotypes import CodelistPhenotype\n",
"# Ex.1 \n",
"# which patients had an atrial fibrillation diagnosis at **any time** in the data source?\n",
"af_phenotype = CodelistPhenotype(\n",
Expand Down Expand Up @@ -196,8 +196,8 @@
"metadata": {},
"outputs": [],
"source": [
"from phenx.phenotypes import CodelistPhenotype\n",
"from phenx.operations.filters import (\n",
"from phenex.phenotypes import CodelistPhenotype\n",
"from phenex.operations.filters import (\n",
" GreaterThanOrEqualTo,\n",
" LessThan,\n",
" RelativeTimeRangeFilter, \n",
Expand Down Expand Up @@ -270,8 +270,8 @@
"metadata": {},
"outputs": [],
"source": [
"from phenx.phenotypes import CodelistPhenotype\n",
"from phenx.operations.filters import (\n",
"from phenex.phenotypes import CodelistPhenotype\n",
"from phenex.operations.filters import (\n",
" LessThanOrEqualTo,\n",
" RelativeTimeRangeFilter\n",
")\n",
Expand Down Expand Up @@ -336,8 +336,8 @@
"metadata": {},
"outputs": [],
"source": [
"from phenx.phenotypes import CodelistPhenotype\n",
"from phenx.operations.filters import (\n",
"from phenex.phenotypes import CodelistPhenotype\n",
"from phenex.operations.filters import (\n",
" CategoricalFilter\n",
")\n",
"\n",
Expand Down Expand Up @@ -378,8 +378,8 @@
"metadata": {},
"outputs": [],
"source": [
"from phenx.phenotypes import CodelistPhenotype\n",
"from phenx.operations.filters import (\n",
"from phenex.phenotypes import CodelistPhenotype\n",
"from phenex.operations.filters import (\n",
" CategoricalFilter\n",
")\n",
"\n",
Expand Down Expand Up @@ -428,8 +428,8 @@
"metadata": {},
"outputs": [],
"source": [
"from phenx.phenotypes import CodelistPhenotype\n",
"from phenx.operations.filters import (\n",
"from phenex.phenotypes import CodelistPhenotype\n",
"from phenex.operations.filters import (\n",
" LessThanOrEqualTo,\n",
" RelativeTimeRangeFilter, \n",
" CategoricalFilter\n",
Expand Down Expand Up @@ -498,9 +498,9 @@
"metadata": {},
"outputs": [],
"source": [
"from phenx.phenotypes import CodelistPhenotype\n",
"from phenx.phenotypes import CodelistPhenotype\n",
"from phenx.operations.filters import (\n",
"from phenex.phenotypes import CodelistPhenotype\n",
"from phenex.phenotypes import CodelistPhenotype\n",
"from phenex.operations.filters import (\n",
" LessThanOrEqualTo,\n",
" RelativeTimeRangeFilter, \n",
")\n",
Expand Down
4 changes: 2 additions & 2 deletions docs/tutorials/phenotypes/MeasurementPhenotype_Tutorial.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@
"metadata": {},
"outputs": [],
"source": [
"from phenx.phenotypes import MeasurementPhenotype\n",
"from phenx.core.constants import ONEYEAR_PREINDEX\n",
"from phenex.phenotypes import MeasurementPhenotype\n",
"from phenex.core.constants import ONEYEAR_PREINDEX\n",
"# Ex.1 \n",
"# which patients had a measurement for systolic blood pressure recorded any time in the data source\n",
"sbp1 = MeasurementPhenotype(\n",
Expand Down
2 changes: 1 addition & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ plugins:
- mkdocstrings:
handlers:
python:
paths: [../phenx] # search packages in the src folder
paths: [../phenex] # search packages in the src folder
options:
docstring_style: "google" # or "numpy", "restructuredtext", etc.
- mkdocs-jupyter
Expand Down
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import ibis

from phenx.codelists import Codelist
from phenx.tables import CodeTable, is_phenx_code_table
from phenx.filters.filter import Filter
from phenex.codelists import Codelist
from phenex.tables import CodeTable, is_phenex_code_table
from phenex.filters.filter import Filter
from typing import List, Tuple
import pandas as pd

Expand Down Expand Up @@ -33,7 +33,7 @@ def _convert_codelist_to_tuples(self) -> List[Tuple[str, str]]:

def _filter(self, code_table: CodeTable) -> CodeTable:

assert is_phenx_code_table(code_table)
assert is_phenex_code_table(code_table)
input_columns = code_table.columns

# Generate the codelist table as an Ibis literal set
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from typing import Optional
from datetime import date

from phenx.tables import EventTable, is_phenx_event_table
from phenex.tables import EventTable, is_phenex_event_table


class DateRangeFilter:
Expand All @@ -25,7 +25,7 @@ def __init__(

def filter(self, table: EventTable):

assert is_phenx_event_table(table)
assert is_phenex_event_table(table)

conditions = []
if self.min_date is not None:
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from typing import Optional

# from phenx.phenotypes.phenotype import Phenotype
from phenx.filters.filter import Filter
from phenx.tables import EventTable, is_phenx_phenotype_table
from phenx.filters.value import *
# from phenex.phenotypes.phenotype import Phenotype
from phenex.filters.filter import Filter
from phenex.tables import EventTable, is_phenex_phenotype_table
from phenex.filters.value import *


class RelativeTimeRangeFilter(Filter):
Expand Down
2 changes: 1 addition & 1 deletion phenx/filters/value.py → phenex/filters/value.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from phenx.filters.filter import Filter
from phenex.filters.filter import Filter


class Value(Filter):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from typing import Optional
from phenx.filters.filter import Filter
from phenx.tables import MeasurementTable, is_phenx_phenotype_table
from phenx.filters.value import *
from phenex.filters.filter import Filter
from phenex.tables import MeasurementTable, is_phenex_phenotype_table
from phenex.filters.value import *


class ValueFilter(Filter):
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
import ibis
from ibis.expr.types.relations import Table

from phenx.phenotypes.phenotype import Phenotype
from phenx.filters.value import Value
from phenx.tables import PhenotypeTable, is_phenx_person_table
from phenx.filters.relative_time_range_filter import RelativeTimeRangeFilter
from phenex.phenotypes.phenotype import Phenotype
from phenex.filters.value import Value
from phenex.tables import PhenotypeTable, is_phenex_person_table
from phenex.filters.relative_time_range_filter import RelativeTimeRangeFilter


class AgePhenotype(Phenotype):
Expand Down Expand Up @@ -77,7 +77,7 @@ def __init__(
def _execute(self, tables: Dict[str, Table]) -> PhenotypeTable:

person_table = tables[self.domain]
assert is_phenx_person_table(person_table)
assert is_phenex_person_table(person_table)

if "YEAR_OF_BIRTH" in person_table.columns:
date_of_birth = ibis.coalesce(
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
from typing import Union, List
from phenx.phenotypes.phenotype import Phenotype
from phenx.filters.codelist_filter import CodelistFilter
from phenx.filters.relative_time_range_filter import RelativeTimeRangeFilter
from phenx.filters.date_range_filter import DateRangeFilter
from phenx.filters.aggregator import First, Last
from phenx.codelists import Codelist
from phenx.tables import is_phenx_code_table, PHENOTYPE_TABLE_COLUMNS, PhenotypeTable
from phenx.phenotypes.functions import select_phenotype_columns
from phenex.phenotypes.phenotype import Phenotype
from phenex.filters.codelist_filter import CodelistFilter
from phenex.filters.relative_time_range_filter import RelativeTimeRangeFilter
from phenex.filters.date_range_filter import DateRangeFilter
from phenex.filters.aggregator import First, Last
from phenex.codelists import Codelist
from phenex.tables import is_phenex_code_table, PHENOTYPE_TABLE_COLUMNS, PhenotypeTable
from phenex.phenotypes.functions import select_phenotype_columns
from ibis import _


Expand Down Expand Up @@ -99,7 +99,7 @@ def _execute(self, tables) -> PhenotypeTable:
return select_phenotype_columns(code_table)

def _perform_codelist_filtering(self, code_table):
assert is_phenx_code_table(code_table)
assert is_phenex_code_table(code_table)
code_table = self.codelist_filter.filter(code_table)
return code_table

Expand Down
6 changes: 3 additions & 3 deletions phenx/phenotypes/cohort.py → phenex/phenotypes/cohort.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from typing import List, Dict, Optional
from phenx.phenotypes.phenotype import Phenotype
from phenex.phenotypes.phenotype import Phenotype
import ibis
from ibis.expr.types.relations import Table
from phenx.tables import PhenotypeTable
from phenx.phenotypes.functions import hstack
from phenex.tables import PhenotypeTable
from phenex.phenotypes.functions import hstack


def subset_and_add_index_date(tables: Dict[str, Table], index_table: PhenotypeTable):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from datetime import date
import ibis
from ibis.expr.types.relations import Table
from phenx.tables import PhenotypeTable, PHENOTYPE_TABLE_COLUMNS
from phenex.tables import PhenotypeTable, PHENOTYPE_TABLE_COLUMNS


class ComputationGraph:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from typing import Dict, Union
from ibis.expr.types.relations import Table
import ibis
from phenx.tables import PhenotypeTable, PHENOTYPE_TABLE_COLUMNS
from phenx.phenotypes.phenotype import Phenotype, ComputationGraph
from phenx.phenotypes.functions import hstack
from phenex.tables import PhenotypeTable, PHENOTYPE_TABLE_COLUMNS
from phenex.phenotypes.phenotype import Phenotype, ComputationGraph
from phenex.phenotypes.functions import hstack
from datetime import date


Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from typing import Dict, Union
from ibis.expr.types.relations import Table
from phenx.tables import PhenotypeTable, PHENOTYPE_TABLE_COLUMNS
from phenx.phenotypes.phenotype import Phenotype
from phenex.tables import PhenotypeTable, PHENOTYPE_TABLE_COLUMNS
from phenex.phenotypes.phenotype import Phenotype


class LogicPhenotype(Phenotype):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from typing import Union, List, Optional
from phenx.phenotypes import CodelistPhenotype
from phenx.tables import is_phenx_code_table, PHENOTYPE_TABLE_COLUMNS, PhenotypeTable
from phenx.phenotypes.functions import select_phenotype_columns
from phenex.phenotypes import CodelistPhenotype
from phenex.tables import is_phenex_code_table, PHENOTYPE_TABLE_COLUMNS, PhenotypeTable
from phenex.phenotypes.functions import select_phenotype_columns

from ibis import _

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from phenx.phenotypes.phenotype import Phenotype
from phenx.filters.codelist_filter import CodelistFilter
from phenx.filters.relative_time_range_filter import RelativeTimeRangeFilter
from phenx.filters.date_range_filter import DateRangeFilter
from phenx.codelists import Codelist
from phenx.tables import is_phenx_code_table, PHENOTYPE_TABLE_COLUMNS, PhenotypeTable
from phenex.phenotypes.phenotype import Phenotype
from phenex.filters.codelist_filter import CodelistFilter
from phenex.filters.relative_time_range_filter import RelativeTimeRangeFilter
from phenex.filters.date_range_filter import DateRangeFilter
from phenex.codelists import Codelist
from phenex.tables import is_phenex_code_table, PHENOTYPE_TABLE_COLUMNS, PhenotypeTable

from ibis import _

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from typing import Dict, Union
from ibis.expr.types.relations import Table
from phenx.tables import (
from phenex.tables import (
PhenotypeTable,
PHENOTYPE_TABLE_COLUMNS,
is_phenx_phenotype_table,
is_phenex_phenotype_table,
)


Expand Down Expand Up @@ -54,7 +54,7 @@ def execute(self, tables: Dict[str, Table]) -> PhenotypeTable:
)

self.table = table.select(PHENOTYPE_TABLE_COLUMNS)
assert is_phenx_phenotype_table(self.table)
assert is_phenex_phenotype_table(self.table)

return self.table

Expand Down Expand Up @@ -152,7 +152,7 @@ def get_codelists(self, to_pandas=False):
from datetime import date
import ibis
from ibis.expr.types.relations import Table
from phenx.tables import PhenotypeTable, PHENOTYPE_TABLE_COLUMNS
from phenex.tables import PhenotypeTable, PHENOTYPE_TABLE_COLUMNS


class ComputationGraph:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import ast
from typing import Dict, Union
from ibis.expr.types.relations import Table
from phenx.tables import PhenotypeTable, PHENOTYPE_TABLE_COLUMNS
from phenx.phenotypes.phenotype import Phenotype
from phenex.tables import PhenotypeTable, PHENOTYPE_TABLE_COLUMNS
from phenex.phenotypes.phenotype import Phenotype


class ScorePhenotype(Phenotype):
Expand Down
Loading

0 comments on commit 54ab6fb

Please sign in to comment.