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

ProteinPredicates #306

Open pnrobinson opened 1 week ago

pnrobinson commented 1 week ago

The following API could be simplified

from gpsea.analysis.predicate.genotype import ProteinPredicates
ppredicates = ProteinPredicates(protein_metadata_service=pms)
abc_type1 = ppredicates.protein_feature(feature_id="ABC transmembrane type-1", tx_id=mane_tx_id)

from gpsea.analysis.predicate.genotype import monoallelic_predicate

gt_predicate = monoallelic_predicate(
    a_predicate=abc_type1,
    b_predicate=~abc_type1,
    names=("ABC transmembrane type-1","Other region") )

For instance, it might be better to protein the protein metadata instead of the protein metadata service.

A probable BUG is that the counts returned are always 100%.

See the corresponding cells in this notebook:

https://github.com/monarch-initiative/gpsea-cs/blob/develop/notebooks/ABCB7/ABCB7_gpsea.ipynb

ielis commented 1 week ago

Yeah, this needs to be reworked.

pnrobinson commented 2 days ago

Let's be sure to use the ProteinMetadata instead of the ProteinMetadataService in the constructor, because when UniProt does not work, the PMS cannot be constructed.