Question: What is a good strategy to find hit regions from a GWAS in R?
gravatar for jamespower
2.5 years ago by
jamespower50 wrote:


I have GWAS results with association of SNPs with a phenotype, and I am trying to find regions of 250kb around a GWAS hit that have at least 3 SNPs passing a certain threshold for p-values. What is the best strategy/package for this? Right now I was thinking of using GenomicRanges:

x = fread(f, header=T)
x = data.frame(x)
sig = x[x$p < 5*10^-8,]
# Create a region of 100kb around these and count the overlaps with itself
wnd = 100000
hits_wnd = GRanges(seqnames=sig$Chr,IRanges(start=sig$bp - wnd,end = sig$bp + wnd))
sig_snps = GRanges(seqnames=sig$Chr,IRanges(start=sig$bp,end = sig$bp + 1))
hits <- findOverlaps(hits_wnd, sig_snps)
gwas genomicranges R • 597 views
ADD COMMENTlink written 2.5 years ago by jamespower50
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1274 users visited in the last hour