Skip to content

Commit

Permalink
Change error of start position > end position to a warning (#538)
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasyu888 authored Oct 11, 2023
1 parent c2ba7db commit e2764b2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions genie/validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -383,11 +383,11 @@ def check_variant_start_and_end_positions(
warnings = ""

if any(input_df[start_pos_col] > input_df[end_pos_col]):
errors = (
warnings = (
f"{filename}: Your variants file has record(s) that have an end position "
"value less than the start position value. Please update your file to be consistent. "
"When we annotate using the genome-nexus-annotation-pipeline, the records with this "
"position discrepancy will show a blank reference and variant allele.\n"
"position discrepancy will be re-annotated with different end position values.\n"
)
return errors, warnings

Expand Down
8 changes: 4 additions & 4 deletions tests/test_validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -701,25 +701,25 @@ def test_that_check_values_between_two_df_returns_expected(
pd.DataFrame(
{"start_pos": [1, 2], "end_pos": [0, 4], "some_col": ["a", "b"]}
),
"",
(
"test_file: Your variants file has record(s) that have an end position "
"value less than the start position value. Please update your file to be consistent. "
"When we annotate using the genome-nexus-annotation-pipeline, the records with this "
"position discrepancy will show a blank reference and variant allele.\n"
"position discrepancy will be re-annotated with different end position values.\n"
),
"",
),
(
pd.DataFrame(
{"start_pos": [1, 2], "end_pos": [0, 1], "some_col": ["a", "b"]}
),
"",
(
"test_file: Your variants file has record(s) that have an end position "
"value less than the start position value. Please update your file to be consistent. "
"When we annotate using the genome-nexus-annotation-pipeline, the records with this "
"position discrepancy will show a blank reference and variant allele.\n"
"position discrepancy will be re-annotated with different end position values.\n"
),
"",
),
(
pd.DataFrame(
Expand Down

0 comments on commit e2764b2

Please sign in to comment.