Skip to content

Commit 6d62c8a

Browse files
committed
Use new merge_datasets function
1 parent 21ed568 commit 6d62c8a

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

sgkit/stats/aggregation.py

+6-3
Original file line numberDiff line numberDiff line change
@@ -228,8 +228,11 @@ def variant_stats(ds: Dataset, merge: bool = True) -> Dataset:
228228
Genotype call dataset such as from
229229
`sgkit.create_genotype_call_dataset`.
230230
merge : bool, optional
231-
If True (the default), merge the input dataset and the computed variables into
232-
a single dataset, otherwise return only the computed variables.
231+
If True (the default), merge the input dataset and the computed
232+
output variables into a single dataset. Output variables will
233+
overwrite any input variables with the same name, and a warning
234+
will be issued in this case.
235+
If False, return only the computed output variables.
233236
234237
Returns
235238
-------
@@ -252,4 +255,4 @@ def variant_stats(ds: Dataset, merge: bool = True) -> Dataset:
252255
allele_frequency(ds),
253256
]
254257
)
255-
return ds.merge(new_ds) if merge else new_ds
258+
return merge_datasets(ds, new_ds) if merge else new_ds

0 commit comments

Comments
 (0)