Hi! Thanks for this great paper. I have a couple of other traits that were not included in the paper that I want to check for evolutionary signatures.
I ran into an issue trying to get the tSDS scores with your code. Specifically, this part of the code seems to assume that there are sds columns in the gwas right? Did you merge that somewhere outside of this script?
sds=fread("/lustre/home/acct-bmelgn/bmelgn-3/ldsc/SDS.txt",data.table=F)
sds_rho=c()
setwd("/lustre/home/acct-bmelgn/bmelgn-3/ldsc/all_gwas/")
write.csv(c("name","rho_true","p"),"sds_rho.csv")
tmp=list.files(pattern="*.gz")
for (name in tmp){
gwas=fread(name,data.table=FALSE)
gwas=gwas[which(gwas$sds!=0),]
x=match(gwas$SNP,sds$ID)
gwas$freq=sds[x,"DAF"]
Hi! Thanks for this great paper. I have a couple of other traits that were not included in the paper that I want to check for evolutionary signatures.
I ran into an issue trying to get the tSDS scores with your code. Specifically, this part of the code seems to assume that there are sds columns in the gwas right? Did you merge that somewhere outside of this script?
sds=fread("/lustre/home/acct-bmelgn/bmelgn-3/ldsc/SDS.txt",data.table=F)
sds_rho=c()
setwd("/lustre/home/acct-bmelgn/bmelgn-3/ldsc/all_gwas/")
write.csv(c("name","rho_true","p"),"sds_rho.csv")
tmp=list.files(pattern="*.gz")
for (name in tmp){
gwas=fread(name,data.table=FALSE)
gwas=gwas[which(gwas$sds!=0),]
x=match(gwas$SNP,sds$ID)
gwas$freq=sds[x,"DAF"]