Assign lead SNP by creating a new boolean column "leadSNP" indicating whether a SNP has the smallest p-value ("P). If multiple rows have the same p-value, the one with the largest effective size ("Effect") is used as the lead SNP.
assign_lead_snp(dat, grouping_vars = "Locus", verbose = TRUE)
Fine-mapping data.table.
Column names to group by.
Print messages.
Modified data.table.
dat <- echodata::assign_lead_snp(dat = echodata::BST1)