What is a good strategy to find hit regions from a GWAS in R?
0
0
Entering edit mode
6.1 years ago
jamespower ▴ 100

Hi,

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)
x=x[!is.na(x$p),]
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)
R GenomicRanges GWAS • 1.2k views
ADD COMMENT

Login before adding your answer.

Traffic: 1979 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6