example_gt <- load_example_gt("gen_tbl")
# Compute the GRM from the allele sharing matrix
example_gt %>% pairwise_grm()
# To calculate using a precomputed allele sharing matrix, use:
allele_sharing <- example_gt %>% pairwise_allele_sharing(as_matrix = TRUE)
example_gt %>% pairwise_grm(allele_sharing_mat = allele_sharing)
Run the code above in your browser using DataLab