zhengxwen / SNPRelate

R package: parallel computing toolset for relatedness and principal component analysis of SNP data (Development version only)
http://www.bioconductor.org/packages/SNPRelate
101 stars 25 forks source link

killed 9 genomat <- snpgdsGetGeno(genofile, sample.id=NULL,snp.id=NULL) Genotype matrix: 10536236 SNPs X 2504 samples Killed: 9 #61

Closed xinghuq closed 5 years ago

xinghuq commented 5 years ago

When I was trying to get genotype matrix using snpgdsGetGeno function,I got the below error. genomat <- snpgdsGetGeno(genofile, sample.id=NULL,snp.id=NULL) Genotype matrix: 10536236 SNPs X 2504 samples Killed: 9

Mac OS Sierra 2X 3.06GHz 6 -core-Intel Xeon Memory 64GB 1333MHz DDr3 HD 2T

This is probably due to large matrix exceeding the memory swap. But when I stop all other processed and only calculate this matrix, it also reports this problem. However, the total size of this matrix may be not larger than 64G. I have found the problem here http://r.789695.n4.nabble.com/R-process-killed-when-allocating-too-large-matrix-Mac-OS-X-td4720400.html However, there is still no solution to this. Do you have any solution to this?

Best!

Xinghu

zhengxwen commented 5 years ago

10536236 2504 4 / (1024 1024 1024) = 98.3 GB It runs out of memory!