diff --git a/genie_registry/maf.py b/genie_registry/maf.py index f54b1353..03d5eb63 100644 --- a/genie_registry/maf.py +++ b/genie_registry/maf.py @@ -36,7 +36,7 @@ def _check_tsa1_tsa2(df): ): error = ( "maf: Contains instances where values in REFERENCE_ALLELE match values in TUMOR_SEQ_ALLELE2. " - "This is invalid. Please correct." + "This is invalid. Please correct.\n" ) row_index = df.query("REFERENCE_ALLELE == TUMOR_SEQ_ALLELE2").index.values return error diff --git a/tests/test_maf.py b/tests/test_maf.py index 6cdd0f8a..5900e63c 100644 --- a/tests/test_maf.py +++ b/tests/test_maf.py @@ -258,6 +258,7 @@ def test_invalid__check_tsa1_tsa2(): "REFERENCE_ALLELE or all values in TUMOR_SEQ_ALLELE2.\n" ) + def test_invalid__check_ref_tsa2(): """Test the scenario in which maf file has identical REF and tsa2 and fails""" df = pd.DataFrame( @@ -269,10 +270,11 @@ def test_invalid__check_ref_tsa2(): ) error = genie_registry.maf._check_tsa1_tsa2(df) assert error == ( - "REFERENCE_ALLELE should not equal to TUMOR_SEQ_ALLELE2. " - "Please check row: 1.\n" + "maf: Contains instances where values in REFERENCE_ALLELE match values in TUMOR_SEQ_ALLELE2. " + "This is invalid. Please correct.\n" ) + def test_invalid__check_ref_tsa1_tsa2(): """Test the scenario in which maf file has TSA1 and TSA2 and fails""" df = pd.DataFrame( @@ -292,6 +294,7 @@ def test_invalid__check_ref_tsa1_tsa2(): "Please check row: 1.\n" ) + @pytest.mark.parametrize( "df", [