-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: A sample column value of 0|0 is not being parsed correctly
- Loading branch information
Jeremy Myslinski
committed
Jun 25, 2024
1 parent
1d9a36e
commit 7b9dc85
Showing
4 changed files
with
56 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,12 @@ | |
__author__ = "Manuel Holtgrewe <[email protected]>" | ||
|
||
|
||
SMALL_HEADER = """ | ||
##fileformat=VCFv4.3 | ||
#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO\tFORMAT\tNA00001\tNA00002\tNA00003 | ||
""".lstrip() | ||
|
||
|
||
MEDIUM_HEADER = """ | ||
##fileformat=VCFv4.3 | ||
##fileDate=20090805 | ||
|
@@ -178,3 +184,13 @@ def test_missing_pass(recwarn): | |
RESULT = p.parse_next_record() | ||
assert str(RESULT) == EXPECTED | ||
assert list(recwarn) == [] | ||
|
||
|
||
def test_parse_record_with_gt_data(): | ||
LINES = "20\t1\t.\tC\tG\t.\t.\tAA=G\tGT\t0|1\t1/1\t.\n" | ||
p = parser.Parser(io.StringIO(SMALL_HEADER + LINES)) | ||
p.parse_header() | ||
record = p.parse_next_record() | ||
assert record.calls[0].data["GT"] == "0|1" | ||
assert record.calls[1].data["GT"] == "1/1" | ||
assert record.calls[2].data["GT"] is None |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters