pywombat 1.0.1__tar.gz → 1.0.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pywombat
3
- Version: 1.0.1
3
+ Version: 1.0.2
4
4
  Summary: A CLI tool for processing and filtering bcftools tabulated TSV files with pedigree support
5
5
  Project-URL: Homepage, https://github.com/bourgeron-lab/pywombat
6
6
  Project-URL: Repository, https://github.com/bourgeron-lab/pywombat
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "pywombat"
3
- version = "1.0.1"
3
+ version = "1.0.2"
4
4
  description = "A CLI tool for processing and filtering bcftools tabulated TSV files with pedigree support"
5
5
  readme = "README.md"
6
6
  authors = [{ name = "Freddy Cliquet", email = "fcliquet@pasteur.fr" }]
@@ -1198,15 +1198,18 @@ def read_pedigree(pedigree_path: Path) -> pl.DataFrame:
1198
1198
  pedigree_df = df.select(select_cols)
1199
1199
 
1200
1200
  # Replace 0 and -9 with null (indicating no parent)
1201
+ # Explicit cast to Utf8 ensures type is preserved even when all values become null
1201
1202
  pedigree_df = pedigree_df.with_columns(
1202
1203
  [
1203
1204
  pl.when(pl.col("father_id").cast(pl.Utf8).is_in(["0", "-9"]))
1204
1205
  .then(None)
1205
1206
  .otherwise(pl.col("father_id"))
1207
+ .cast(pl.Utf8)
1206
1208
  .alias("father_id"),
1207
1209
  pl.when(pl.col("mother_id").cast(pl.Utf8).is_in(["0", "-9"]))
1208
1210
  .then(None)
1209
1211
  .otherwise(pl.col("mother_id"))
1212
+ .cast(pl.Utf8)
1210
1213
  .alias("mother_id"),
1211
1214
  ]
1212
1215
  )
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes