File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -203,7 +203,7 @@ shows how it can be used in the context of doing something simple like counting
203
203
204
204
# Now the result is correct -- only the third sample is heterozygous so the count should be 1.
205
205
# This how many sgkit functions handle missing data internally:
206
- sg.variant_stats(ds).variant_n_het.item(0 )
206
+ sg.variant_stats(ds).variant_n_het.values. item(0 )
207
207
208
208
Windowing
209
209
---------
@@ -320,8 +320,8 @@ Xarray and Pandas operations in a single pipeline:
320
320
# for windows of size 20 variants
321
321
(
322
322
ds
323
- # Add call rate and other statistics
324
- .pipe(sg.variant_stats)
323
+ # Add and compute call rate and other statistics
324
+ .pipe(sg.variant_stats).compute()
325
325
# Apply filter to include variants present across > 80% of samples
326
326
.pipe(lambda ds : ds.sel(variants = ds.variant_call_rate > .8 ))
327
327
# Create windows of size 20 variants
You can’t perform that action at this time.
0 commit comments