lassosum icon indicating copy to clipboard operation
lassosum copied to clipboard

lassosum-pipeline: Not converging

Open YutingHan317 opened this issue 2 years ago • 2 comments

Hi,

I ran the lassosum per chromosome using the multi-thread mode (10 threads). The code is as follows. `for (i in 1:22){ message(paste0("Chr ",i," is calculating")) ss<-fread(paste0(ssf.dir,"/severe_clean_chr",i,".txt")) test.file <- paste0(test.dir,"/chr",i,".nodup") ref.file <- paste0(ref.dir,"/chr",i) # Transform the P-values into correlation cor <- p2cor(p = ss$P, n = ss$N, sign = ss$BETA ) if (i==1) {

    out <- lassosum.pipeline(
        cor = cor,
        chr = ss$CHR,
        pos = ss$BP,
        A1 = ss$A1,
        A2 = ss$A2,
        ref.bfile = ref.file,
        test.bfile = test.file,
        LDblocks = LDblocks, 
        cluster=cl)

} else {

    out.temp <- lassosum.pipeline(
        cor = cor,
        chr = ss$CHR,
        pos = ss$BP,
        A1 = ss$A1,
        A2 = ss$A2,
        ref.bfile = ref.file,
        test.bfile = test.file,
        LDblocks = LDblocks, 
        cluster=cl)       
    out<- merge(out,out.temp)

}

} ` For most chromosomes, it worked well. However, for chromosome 3, an error occurred, which is Running lassosum ... s = 0.2 Error in checkForRemoteErrors(val) : one node produced an error: Not converging.....

I would appreciate it if you could provide some help with it.

Best wishes.

Yuting

YutingHan317 avatar Oct 20 '22 13:10 YutingHan317

If it's really because of numerical issues, it's not something I can easily solve. It would be interesting to see if anyone else has come across this before. Otherwise, perhaps some basic statistics might help diagnose? How many SNPs do you have in each chromosome? How many successfully matched with the summary stats? (look at the out$sumstats table.) I would just start with a smaller dataset (by e.g. filtering the SNPs by MAFs and/or sampling the participants if there are very many). See if increasing the size of it leads to this error.

tshmak avatar Oct 21 '22 09:10 tshmak

Thanks for your prompt reply. I think you are right. The SNP panel I used was calculated in a small sample size (around 3000 participants). And to explore SNPs as more as possible, I used a lower threshold of MAF. As you suggested, I gradually increased the threshold of MAF, and it worked. Thanks again.

YutingHan317 avatar Oct 21 '22 13:10 YutingHan317