Skip to content

Commit

Permalink
Use new merge_datasets function
Browse files Browse the repository at this point in the history
  • Loading branch information
tomwhite committed Sep 2, 2020
1 parent 2189e42 commit 5e9abae
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions sgkit/stats/aggregation.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,11 @@ def variant_stats(ds: Dataset, merge: bool = True) -> Dataset:
Genotype call dataset such as from
`sgkit.create_genotype_call_dataset`.
merge : bool, optional
If True (the default), merge the input dataset and the computed variables into
a single dataset, otherwise return only the computed variables.
If True (the default), merge the input dataset and the computed
output variables into a single dataset. Output variables will
overwrite any input variables with the same name, and a warning
will be issued in this case.
If False, return only the computed output variables.
Returns
-------
Expand All @@ -252,4 +255,4 @@ def variant_stats(ds: Dataset, merge: bool = True) -> Dataset:
allele_frequency(ds),
]
)
return ds.merge(new_ds) if merge else new_ds
return merge_datasets(ds, new_ds) if merge else new_ds

0 comments on commit 5e9abae

Please sign in to comment.