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

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)
gwas genomicranges R • 514 views
ADD COMMENTlink written 2.0 years ago by jamespower40
Please log in to add an answer.

Help
Access

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