example_gt <- load_example_gt("gen_tbl")
# Select loci by chromosome
example_gt_subset <- example_gt %>%
select_loci_if(loci_chromosomes(genotypes) == "chr2")
show_loci(example_gt_subset)
# Select loci by a summary statistic
example_gt_subset <- example_gt %>%
select_loci_if(loci_maf(genotypes) > 0.2)
show_loci(example_gt_subset)
Run the code above in your browser using DataLab