Skip to content

Commit

Permalink
fix: add scQTLs into coloc features (#833)
Browse files Browse the repository at this point in the history
* fix: add scQTLs into coloc features

* fix: include single cell qtls in the list of valid study types

---------
Co-authored-by: Irene López <irene.lopezs@protonmail.com>
  • Loading branch information
addramir authored Oct 22, 2024
1 parent 7b20d55 commit de4627f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
7 changes: 6 additions & 1 deletion src/gentropy/dataset/colocalisation.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,12 @@ def extract_maximum_coloc_probability_per_region_and_gene(

valid_qtls = list(
set(EqtlCatalogueStudyIndex.method_to_study_type_mapping.values())
)
) + [
f"sc{qtl}"
for qtl in set(
EqtlCatalogueStudyIndex.method_to_study_type_mapping.values()
)
]

if filter_by_qtls:
filter_by_qtls = (
Expand Down
16 changes: 8 additions & 8 deletions src/gentropy/dataset/l2g_features/colocalisation.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ def compute(
"""
colocalisation_method = "ECaviar"
colocalisation_metric = "clpp"
qtl_type = "eqtl"
qtl_type = ["eqtl", "sceqtl"]

return cls(
_df=convert_from_wide_to_long(
Expand Down Expand Up @@ -260,7 +260,7 @@ def compute(
"""
colocalisation_method = "ECaviar"
colocalisation_metric = "clpp"
qtl_type = "eqtl"
qtl_type = ["eqtl", "sceqtl"]

return cls(
_df=convert_from_wide_to_long(
Expand Down Expand Up @@ -393,7 +393,7 @@ def compute(
"""
colocalisation_method = "ECaviar"
colocalisation_metric = "clpp"
qtl_types = ["sqtl", "tuqtl"]
qtl_types = ["sqtl", "tuqtl", "scsqtl", "sctuqtl"]
return cls(
_df=convert_from_wide_to_long(
common_colocalisation_feature_logic(
Expand Down Expand Up @@ -441,7 +441,7 @@ def compute(
"""
colocalisation_method = "ECaviar"
colocalisation_metric = "clpp"
qtl_types = ["sqtl", "tuqtl"]
qtl_types = ["sqtl", "tuqtl", "scsqtl", "sctuqtl"]
return cls(
_df=convert_from_wide_to_long(
common_neighbourhood_colocalisation_feature_logic(
Expand Down Expand Up @@ -483,7 +483,7 @@ def compute(
"""
colocalisation_method = "Coloc"
colocalisation_metric = "h4"
qtl_type = "eqtl"
qtl_type = ["eqtl", "sceqtl"]
return cls(
_df=convert_from_wide_to_long(
common_colocalisation_feature_logic(
Expand Down Expand Up @@ -531,7 +531,7 @@ def compute(
"""
colocalisation_method = "Coloc"
colocalisation_metric = "h4"
qtl_type = "eqtl"
qtl_type = ["eqtl", "sceqtl"]
return cls(
_df=convert_from_wide_to_long(
common_neighbourhood_colocalisation_feature_logic(
Expand Down Expand Up @@ -663,7 +663,7 @@ def compute(
"""
colocalisation_method = "Coloc"
colocalisation_metric = "h4"
qtl_types = ["sqtl", "tuqtl"]
qtl_types = ["sqtl", "tuqtl", "scsqtl", "sctuqtl"]
return cls(
_df=convert_from_wide_to_long(
common_colocalisation_feature_logic(
Expand Down Expand Up @@ -711,7 +711,7 @@ def compute(
"""
colocalisation_method = "Coloc"
colocalisation_metric = "h4"
qtl_types = ["sqtl", "tuqtl"]
qtl_types = ["sqtl", "tuqtl", "scsqtl", "sctuqtl"]
return cls(
_df=convert_from_wide_to_long(
common_neighbourhood_colocalisation_feature_logic(
Expand Down

0 comments on commit de4627f

Please sign in to comment.