Skip to content

Commit

Permalink
chore: merge dev
Browse files Browse the repository at this point in the history
  • Loading branch information
d0choa committed Sep 24, 2024
2 parents 0a42029 + 148e26e commit 48e9e91
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 8 deletions.
2 changes: 0 additions & 2 deletions src/gentropy/dataset/study_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,12 @@ class StudyQualityCheck(Enum):
UNRESOLVED_DISEASE (str): Disease identifier could not match to referece or retired identifier - labelling failing disease
UNKNOWN_STUDY_TYPE (str): Indicating the provided type of study is not supported.
DUPLICATED_STUDY (str): Flagging if a study identifier is not unique.
NO_GENE_PROVIDED (str): Flagging QTL studies if the measured
"""

UNRESOLVED_TARGET = "Target/gene identifier could not match to reference."
UNRESOLVED_DISEASE = "No valid disease identifier found."
UNKNOWN_STUDY_TYPE = "This type of study is not supported."
DUPLICATED_STUDY = "The identifier of this study is not unique."
NO_GENE_PROVIDED = "QTL study doesn't have gene assigned."


@dataclass
Expand Down
5 changes: 1 addition & 4 deletions src/gentropy/study_locus_validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,11 @@ def __init__(
# Running validation then writing output:
study_locus_with_qc = (
StudyLocus.from_parquet(session, list(study_locus_path))
# Flagging study locus with subsignificant p-values
.validate_lead_pvalue(pvalue_cutoff=gwas_significance)
# Add flag for MHC region
.qc_MHC_region()
.validate_study(study_index) # Flagging studies not in study index
.annotate_study_type(study_index) # Add study type to study locus
.annotate_study_type(study_index) # Add study type to study locus
.qc_redundant_top_hits_from_PICS() # Flagging top hits from studies with PICS summary statistics
.validate_unique_study_locus_id() # Flagging duplicated study locus ids
# Annotates credible intervals and filter to only keep 99% credible sets
.filter_credible_set(credible_interval=CredibleInterval.IS99)
).persist() # we will need this for 2 types of outputs
Expand Down
3 changes: 1 addition & 2 deletions src/gentropy/study_validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,7 @@ def __init__(

# Running validation:
study_index_with_qc = (
study_index.validate_disease(disease_index)
.validate_unique_study_id() # Flagging duplicated study ids
study_index.validate_unique_study_id() # Flagging duplicated study ids
.validate_study_type() # Flagging non-supported study types.
.validate_target(target_index) # Flagging QTL studies with invalid targets
.validate_disease(disease_index) # Flagging invalid EFOs
Expand Down

0 comments on commit 48e9e91

Please sign in to comment.