xihaoli / STAARpipeline-Tutorial

The tutorial for performing single-/multi-trait association analysis of whole-genome/whole-exome sequencing (WGS/WES) studies using FAVORannotator, STAARpipeline and STAARpipelineSummary
GNU General Public License v3.0
21 stars 17 forks source link

error: run FastSparseGRM #10

Closed DamienTan closed 1 year ago

DamienTan commented 1 year ago

Dear Dr. Li I encountered a problem when I run one of the steps in R package FastSparseGRM to calculate the GRM. There were no output files after running the script runPCA_wrapper.R. And I checked the log file runPCA.Rout, here is the part of the log file:


file.unrels <- opt$file.unrels prefix.in <- opt$prefix.in no_pcs <- opt$no_pcs no_cores <- opt$no_cores num_threads <- opt$num_threads prefix.out <- opt$prefix.out no_iter <- opt$no_iter

library('FastSparseGRM') runPCA(prefix.in,file.unrels,no_pcs,num_threads,prefix.out,no_iter) [1] "PCA started at 2022-12-04 17:53:17" [1] "4 relateds, 768 unrelateds, and 24928532 variants" Reading the file: pruned.bed Reading BED file complete Number of SNPs read: 24928532 Number of samples: 772 Using 40 threads Processing samples complete Allele frequencies calculated [1] "Reading Completed in 16 seconds" [1] "1 iterations completed" [1] "2 iterations completed" [1] "3 iterations completed" [1] "4 iterations completed" [1] "5 iterations completed" [1] "6 iterations completed" [1] "7 iterations completed" [1] "8 iterations completed" [1] "9 iterations completed" [1] "10 iterations completed" [1] "Iterations Completed in 683 seconds" Error in svd(H, nv = 0) : infinite or missing values in 'x' Calls: runPCA -> drpca -> svd Execution halted


Has this happened before? I have no idea to solve this problem, please give me some advice. Hope to your reply :)

xihaoli commented 1 year ago

Hi Damien,

Thanks for reaching out. Regarding your issue on FastSparseGRM, Rounak has provided some comments and suggestions to resolve the problem (here). I will close this thread for clarity.

Best, Xihao

DamienTan commented 1 year ago

Hi Damien,

Thanks for reaching out. Regarding your issue on FastSparseGRM, Rounak has provided some comments and suggestions to resolve the problem (here). I will close this thread for clarity.

Best, Xihao

OK, very grateful. I think I have solved the step runPCA. I removed all the missing genotypes in .bed file by plink and there was no error message.