Cross-tabulate SNP overlap (after applying filter) between each pair of studies.

plot_dataset_overlap(
  merged_DT,
  snp_filter = "!is.na(SNP)",
  filename = NA,
  formula_str = "~ SNP + Dataset",
  triangle = FALSE
)

Arguments

merged_DT

Merged fine-mapping results data from finemap_loci.

snp_filter

Filter to use apply to SNPs before plotting.

filename

Path to save file to as PNG.

formula_str

Formula passed to xtabs.

triangle

Plot correlation matrix as a square or a triangle.

See also

Examples

if (FALSE) {
    merged_DT <- echodata::get_Nalls2019_merged()
    merged_DT$Dataset <- rep(c("Dataset1","Dataset2"),nrow(merged_DT)/2)
    snp_xprod <- plot_dataset_overlap(merged_DT = merged_DT)
    
}