Hello,
I attempted the following code to convert a matrix of size 945*7M into chgeno format. However, after running for almost 8 days, it encountered an error. Is there any alternative solution?
options(java.parameters = "-Xmx800G")
geno <- genotypes(file = biggeno, format = "biparental")
cat("** Genotypes completed \n")
cat("** Storing genotypes locally \n")
geno$java <- .jserialize(geno$java)
saveRDS(geno, file = "./945sample_withoutLDfiltered_geno.rds")
Error message:
** [ 2024-05-01 12:32:30 ] Genotypes in progress
** Genotypes completed
** Storing genotypes locally
Error in .jcall("RJavaClassLoader", "[B", "toByte", .jcast(o, "java.lang.Object")) :
java.lang.OutOfMemoryError: Required array length 2147483639 + 512 is too large
Calls: .jserialize -> .jcall -> .jcheck
Execution halted