Open humanpaingeneticslab opened 3 years ago
Hi Everyone,
I was wondering if someone could share some R code that takes for input the results of supergnova and estimates the proportion of correlated regions. Here's what I have so far;
Best to All, Marc.
R --no-save --quiet library( "ashr" )
my <- read.table( "supanova_insomnia.txt", header=TRUE, sep=" ", as.is=TRUE, stringsAsFactors=FALSE, quote="" )
J <- ash( my[,"rho"], sqrt( my[,"var"] ), mixcompdist="halfnormal" ) sum( 1 - J$result$lfdr ) / nrow( my ) # <----- is this correct?
Hi Everyone,
I was wondering if someone could share some R code that takes for input the results of supergnova and estimates the proportion of correlated regions. Here's what I have so far;
Best to All, Marc.
R --no-save --quiet library( "ashr" )
----- load supergnova results
my <- read.table( "supanova_insomnia.txt", header=TRUE, sep=" ", as.is=TRUE, stringsAsFactors=FALSE, quote="" )
----- estimate proportion of correlated regions
J <- ash( my[,"rho"], sqrt( my[,"var"] ), mixcompdist="halfnormal" ) sum( 1 - J$result$lfdr ) / nrow( my ) # <----- is this correct?