Skip to content

feat: Add sample nesting option to VariantModel#170

Merged
nvictus merged 1 commit intoabdenlab:mainfrom
nvictus:feat-nested-samples
Mar 16, 2026
Merged

feat: Add sample nesting option to VariantModel#170
nvictus merged 1 commit intoabdenlab:mainfrom
nvictus:feat-nested-samples

Conversation

@nvictus
Copy link
Copy Markdown
Member

@nvictus nvictus commented Mar 15, 2026

Add a flag to control whether sample/genotype columns are top-level (unnested, current default) or wrapped in a single "samples" struct column. re: #167

  • unnest_samples=true (default): N top-level sample/field columns (preserves existing behavior)
  • unnest_samples=false: single "samples" struct column containing all genotype data

Threaded through Model → Scanner → BatchBuilder → PyO3 → Python API and R bindings. When nested, project(["samples"]) treats the column as an atomic unit. Model definition (samples, genotype_defs) still controls the inner structure.

The default is slated to flip to false in a future release, at which point users opt into unnesting explicitly.

Add a flag to control whether genotype columns are top-level (unnested,
current default) or wrapped in a single "samples" struct column.

- `unnest_samples=true` (default): N top-level sample/field columns
  (preserves existing behavior)
- `unnest_samples=false`: single "samples" struct column containing
  all genotype data

Threaded through Model → Scanner → BatchBuilder → PyO3 → Python API
and R bindings. When nested, `project(["samples"])` treats the column
as an atomic unit. Model definition (samples, genotype_defs) still
controls the inner structure.

The default is slated to flip to `false` in a future release, at which point
users opt into unnesting explicitly.
@nvictus nvictus merged commit 4194817 into abdenlab:main Mar 16, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant