Skip to content

Commit

Permalink
fix(generate): ped parser accept None value as null
Browse files Browse the repository at this point in the history
  • Loading branch information
natir committed May 9, 2023
1 parent a7c45fc commit c8c9c99
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
1 change: 1 addition & 0 deletions src/variantplaner/io/ped.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ def into_lazyframe(input_path: pathlib.Path) -> polars.LazyFrame:
input_path,
separator="\t",
has_header=False,
null_values="None",
new_columns=["family_id", "personal_id", "father_id", "mother_id", "sex", "affected"],
dtypes={
"family_id": polars.Utf8,
Expand Down
4 changes: 0 additions & 4 deletions tests/test_generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ def test_transmission(tmp_path: pathlib.Path) -> None:

def test_transmission_missing_mother(tmp_path: pathlib.Path) -> None:
"""Check add_origin of genotype."""
out_path = tmp_path / "transmission.parquet"

genotypes_lf = polars.scan_parquet(DATA_DIR / "no_info.genotypes.parquet")
genotypes_lf = genotypes_lf.filter(polars.col("sample") != "sample_3")

Expand All @@ -52,8 +50,6 @@ def test_transmission_missing_mother(tmp_path: pathlib.Path) -> None:

def test_transmission_missing_father(tmp_path: pathlib.Path) -> None:
"""Check add_origin of genotype."""
out_path = tmp_path / "transmission.parquet"

genotypes_lf = polars.scan_parquet(DATA_DIR / "no_info.genotypes.parquet")
genotypes_lf = genotypes_lf.filter(polars.col("sample") != "sample_2")

Expand Down

0 comments on commit c8c9c99

Please sign in to comment.