chr1swallace/coloc

runsusie: taking too much iterations to reach convegence

Closed this issue · 9 comments

Hi,
I am running runsusie for multiple loci: baso_susie=lapply(1:length(baso7), function(i) runsusie(baso7[[i]])) # Here baso7 is a list of lists and each list contains all the required variables for runsusie . It works fine in most cases but for some loci it is taking forever to reach convergence.

Is there any way that I could delete those loci from my datasets?

I do not know the differences between loci. Only thing I am sure that the locus which is taking too much time, has slightly higher number of SNPs. That particular locus has 2236 SNPs, but the same locus with 1947 SNPs in another trait reached convergence after few hundreds iterations.

I am lost and can not think what I need to do.

The objective of my analysis is to use runsusie for a list of loci in some trait then use coloc.susie for the same loci in pair of traits as described in here: https://chr1swallace.github.io/coloc/articles/a06_SuSiE.html

Now, if locus X reached convergence for trait1 but did not for trait2, what should I do?
runsusie_taking_too_much_time

Attached is a screenshot of susie running.

@chr1swallace Thanks a lot.

Is there any way to skip a runsusie after a certain number of iteration and then start the next run?

For example, I have 100 loci, I want to run them in loop. If the 5th locus does not reach convergence in 10000 iterations, it would through a message and start 6th locus.

Thank you. I have tried these options maxit=10000, repeat_until_convergence=F . With these options, if a locus fails to reach convergence, runsusie does not start the next locus, it throw an error and exit. Below is the error log.

How could I use runsusie for multiple loci in a way that if convergence fails in one locus it gives the message and starts to run the next locus?

scz_baso_susie=lapply(1:length(scz_baso7), function(i) runsusie(scz_baso7[[i]],check_prior=F,maxit = 10000,repeat_until_convergence = F))
running max iterations: 10000
	converged: TRUE
running max iterations: 10000
	converged: TRUE
running max iterations: 10000
	converged: FALSE
Error in runsusie(scz_baso7[[i]], check_prior = F, maxit = 10000, repeat_until_convergence = F) : 
  susie_rss() did not converge in 10000 iterations. Try running with run_until_convergence=TRUE
In addition: Warning messages:
1: In check_dataset(d, suffix, req = c("beta", "varbeta", "LD", "snp")) :
  minimum p value is: 0.00019787
If this is what you expected, this is not a problem.
If this is not as small as you expected, please check the 02_data vignette.
2: In check_dataset(d, suffix, req = c("beta", "varbeta", "LD", "snp")) :
  minimum p value is: 7.6246e-05
If this is what you expected, this is not a problem.
If this is not as small as you expected, please check the 02_data vignette.
3: In susie_suff_stat(XtX = R, Xty = z, n = 2, yty = 1, scaled_prior_variance = prior_variance,  :
 
 Error in runsusie(scz_baso7[[i]], check_prior = F, maxit = 10000, repeat_until_convergence = F) : 
susie_rss() did not converge in 10000 iterations. Try running with run_until_convergence=TRUE

Another idea: you could try to use the diagnostic functions provided by susieR

For example, you could assess the mismatch between your summary statistics and LD matrix using estimate_s_rss. If you run it on loci you know converge and those you know don't converge, you could determine an empirical value of lambda to filter loci that are too mismatched prior to fine-mapping

Another idea: you could try to use the diagnostic functions provided by susieR

For example, you could assess the mismatch between your summary statistics and LD matrix using estimate_s_rss. If you run it on loci you know converge and those you know don't converge, you could determine an empirical value of lambda to filter loci that are too mismatched prior to fine-mapping

Would it be okay if I determine the empirical value of lambda to be 0.05?

Would it be okay if I determine the empirical value of lambda to be 0.05?

@cwnag-c I think the susieR authors would be best able to answer that question: https://github.com/stephenslab/susieR/issues

OK!Thank you!