tries to be smart about detecting the interesting subregion to finemap/coloc.
findpeaks(d, maxz = 4, maxr2 = 0.1, do.plot = FALSE)
logical vector of length d$position indicating which snps to keep
a coloc dataset
keep all snps between the leftmost and rightmost snp with |z| > maxz
expand window to keep all snps between snps with r2 > maxr2 with the left/rightmost snps defined by the maxz threshold
if TRUE, plot dataset + boundaries
Chris Wallace
Differs from findends by finding multiple separate regions if there are multiple peaks
findends