monarch-initiative / gpsea

A Python library for discovery of genotype-phenotype associations
https://monarch-initiative.github.io/gpsea/stable
MIT License
4 stars 1 forks source link

Missing method filtering_predicate()? #282

Open justaddcoffee opened 4 weeks ago

justaddcoffee commented 4 weeks ago

I'm taking gpsea for a spin using the PTPN11 gene cases (branch here

I made this notebook (cribbed from one of @ielis 's )

I'm seeing an error in this cell:

from gpsea.analysis.predicate.genotype import filtering_predicate

cats_of_interest = (cats[1], cats[2])
gt_predicate = filtering_predicate(
    predicate=moi_predicate,
    targets=cats_of_interest,
)
gt_predicate.display_question()

because of a missing method filtering_predicate()

ImportError                               Traceback (most recent call last)
Cell In[10], line 1
----> 1 from gpsea.analysis.predicate.genotype import filtering_predicate
      3 cats_of_interest = (cats[1], cats[2])
      4 gt_predicate = filtering_predicate(
      5     predicate=moi_predicate,
      6     targets=cats_of_interest,
      7 )

ImportError: cannot import name 'filtering_predicate' from 'gpsea.analysis.predicate.genotype' (/Users/jtr4v/PythonProject/gpsea/src/gpsea/analysis/predicate/genotype/__init__.py)

Possibly this method changed names? Looking around in src/gpsea/analysis/predicate/genotype/ I can't seem to find what it might have changed into though

ielis commented 3 weeks ago

Hi @justaddcoffee

... I can't seem to find what it might have changed into though ...

yep, filtering predicate was a dead end, and it was removed without replacement.

As an alternative, use just the gpsea.analysis.predicate.genotype.autosomal_recessive predicate. However, there are some other issues with the predicate, so please stand by until we fix them.

I will comment on this thread when it is fixed. Thanks a lot!

ielis commented 3 weeks ago

Blocked by #284