# \donttest{
fn <- tempfile(fileext = ".h5")
snps <- matrix(sample(c(0, 1, 2, NA), 200, replace = TRUE,
prob = c(.25, .25, .25, .25)), 20, 10)
X <- hdf5_create_matrix(fn, "geno/raw", data = snps)
# Filter with auto output path (adds "_filtered" suffix)
out <- filter_low_coverage(X, pcent = 0.1)
# Filter with explicit output
out2 <- filter_low_coverage(X, out_group = "geno",
out_dataset = "filtered", overwrite = TRUE)
hdf5_close_all()
unlink(fn)
# }
Run the code above in your browser using DataLab