Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

proportion of correlated regions #7

Open
humanpaingeneticslab opened this issue Oct 26, 2021 · 0 comments
Open

proportion of correlated regions #7

humanpaingeneticslab opened this issue Oct 26, 2021 · 0 comments

Comments

@humanpaingeneticslab
Copy link

humanpaingeneticslab commented Oct 26, 2021

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant