Skip to content

Commit

Permalink
Update sv format (#496)
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasyu888 authored Dec 20, 2022
1 parent 0de905b commit fc284fc
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
14 changes: 11 additions & 3 deletions genie_registry/structural_variant.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,15 @@ def _validate(self, sv_df):
"column(s): {}.\n".format(", ".join(non_ints))
)

region_allow_vals = ["5_PRIME_UTR", "3_PRIME_UTR", "PROMOTER", "EXON", "INTRON"]
region_allow_vals = [
"5_prime_UTR",
"3_prime_UTR",
"Promoter",
"Exon",
"Intron",
"5'UTR",
"3'UTR",
]
warn, error = process_functions.check_col_and_values(
sv_df,
"SITE1_REGION",
Expand Down Expand Up @@ -196,13 +204,13 @@ def _validate(self, sv_df):
total_error.write(error)

warn, error = process_functions.check_col_and_values(
sv_df, "DNA_SUPPORT", ["yes", "no"], "Structural Variant", required=False
sv_df, "DNA_SUPPORT", ["Yes", "No"], "Structural Variant", required=False
)
# total_warning.write(warn)
total_error.write(error)

warn, error = process_functions.check_col_and_values(
sv_df, "RNA_SUPPORT", ["yes", "no"], "Structural Variant", required=False
sv_df, "RNA_SUPPORT", ["Yes", "No"], "Structural Variant", required=False
)
# total_warning.write(warn)
total_error.write(error)
Expand Down
4 changes: 2 additions & 2 deletions tests/test_sv.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ def test_validation_no_errors(self):
"NCBI_BUILD": ["GRCh38", "GRCh37"],
"BREAKPOINT_TYPE": ["PRECISE", "IMPRECISE"],
"CONNECTION_TYPE": ["3to5", "5to5"],
"DNA_SUPPORT": ["yes", "no"],
"RNA_Support": ["yes", "no"],
"DNA_SUPPORT": ["Yes", "No"],
"RNA_Support": ["Yes", "No"],
}
)
error, warning = self.sv_cls._validate(sv_df)
Expand Down

0 comments on commit fc284fc

Please sign in to comment.