Skip to content

Commit

Permalink
Merge branch 'dev' into alegbe-biosample_index
Browse files Browse the repository at this point in the history
  • Loading branch information
DSuveges committed Sep 24, 2024
2 parents c9eada2 + 148e26e commit f93b995
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 @@ -32,15 +32,13 @@ class StudyQualityCheck(Enum):
UNKNOWN_STUDY_TYPE (str): Indicating the provided type of study is not supported.
UNKNOWN_BIOSAMPLE (str): Flagging if a biosample identifier is not found in the reference.
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."
UNKNOWN_BIOSAMPLE = "Biosample identifier was not found in the reference."
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
).persist() # we will need this for 2 types of outputs

study_locus_with_qc.valid_rows(
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 @@ -62,8 +62,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 f93b995

Please sign in to comment.