Skip to content

Commit

Permalink
Merge branch 'dev' into dc_finemapper_config
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel-Considine committed Apr 24, 2024
2 parents e07b99d + e2f8e87 commit 6c4ff6a
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion config/step/ot_variant_index.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ defaults:
- variant_index

variant_annotation_path: ${datasets.variant_annotation}
credible_set_path: ${datasets.study_locus}
credible_set_path: ${datasets.credible_set}
variant_index_path: ${datasets.variant_index}
8 changes: 4 additions & 4 deletions src/airflow/dags/genetics_etl.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,16 @@
# PICS credible sets from GWAS Catalog curated associations:
"gwas_catalog_curated_credible_set": {
"source_bucket": GWAS_CATALOG_BUCKET_NAME,
"source_object": "credible_set_datasets/gwas_catalog_curated",
"source_object": "credible_set_datasets/gwas_catalog_PICSed_curated_associations",
"destination_bucket": RELEASE_BUCKET_NAME,
"destination_object": f"releases/{RELEASE_VERSION}/credible_set/gwas_catalog_pics_from_curation",
"destination_object": f"releases/{RELEASE_VERSION}/credible_set/gwas_catalog_PICSed_curated_associations",
},
# PICS credible sets from GWAS Catalog summary statistics:
"gwas_catalog_sumstats_credible_set": {
"source_bucket": GWAS_CATALOG_BUCKET_NAME,
"source_object": "credible_set_datasets/gwas_catalog_summary_stats",
"source_object": "credible_set_datasets/gwas_catalog_PICSed_summary_statistics",
"destination_bucket": RELEASE_BUCKET_NAME,
"destination_object": f"releases/{RELEASE_VERSION}/credible_set/gwas_catalog_pics_from_summary_statistics",
"destination_object": f"releases/{RELEASE_VERSION}/credible_set/gwas_catalog_PICSed_summary_statistics",
},
# GWAS Catalog manifest files:
"gwas_catalog_manifests": {
Expand Down
8 changes: 2 additions & 6 deletions src/airflow/dags/gwas_catalog_preprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,8 @@
WINDOW_BASED_CLUMPED = f"gs://{GWAS_CATALOG_BUCKET_NAME}/study_locus_datasets/gwas_catalog_summary_stats_window_clumped"
LD_BASED_CLUMPED = f"gs://{GWAS_CATALOG_BUCKET_NAME}/study_locus_datasets/gwas_catalog_summary_stats_ld_clumped"
# Credible sets:
CURATED_CREDIBLE_SETS = (
f"gs://{GWAS_CATALOG_BUCKET_NAME}/credible_set_datasets/gwas_catalog_curated"
)
SUMMARY_STATISTICS_CREDIBLE_SETS = (
f"gs://{GWAS_CATALOG_BUCKET_NAME}/credible_set_datasets/gwas_catalog_summary_stats"
)
CURATED_CREDIBLE_SETS = f"gs://{GWAS_CATALOG_BUCKET_NAME}/credible_set_datasets/gwas_catalog_PICSed_curated_associations"
SUMMARY_STATISTICS_CREDIBLE_SETS = f"gs://{GWAS_CATALOG_BUCKET_NAME}/credible_set_datasets/gwas_catalog_PICSed_summary_statistics"


def upload_harmonized_study_list(
Expand Down
8 changes: 6 additions & 2 deletions src/gentropy/pics.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from __future__ import annotations

from gentropy.common.session import Session
from gentropy.dataset.study_locus import StudyLocus
from gentropy.dataset.study_locus import CredibleInterval, StudyLocus
from gentropy.method.pics import PICS


Expand All @@ -28,6 +28,10 @@ def __init__(
session, study_locus_ld_annotated_in
)
# PICS
picsed_sl = PICS.finemap(study_locus_ld_annotated).annotate_credible_sets()
picsed_sl = (
PICS.finemap(study_locus_ld_annotated)
.annotate_credible_sets()
.filter_credible_set(credible_interval=CredibleInterval.IS99)
)
# Write
picsed_sl.df.write.mode(session.write_mode).parquet(picsed_study_locus_out)

0 comments on commit 6c4ff6a

Please sign in to comment.