I usually work with relationship matrices created in R and other software. I would like to fit models using my own matrices using GCTA. My problem has been that GCTA only accepts binary GRMs. I tried the "OmicKriging" package in R, which has a function to write binary GRM files that should be compatible with GCTA. However, it seems that the conversion doesn't work properly. In particular, GCTA complains that "Error: the size of the [/file/path/CustomMatrix.grm.N.bin] file is incomplete?". This despite the fact that I specified the number of SNP in the R function.
GCTA documentation says that the reml analysis should work even without the "N.bin" file, but it doesn't seem to be true. The analysis does not complete or at least it doesn't produce any output.
Any advice leading to the successful use of custom GRMs in GCTA would be awesome.
Note that write_GRMBin outputs two columns with the same id. This may not correspond to your gcta coding of the data and maybe you need to do some further coding to make sure that the FAM and ID columns correspond to your actual data.
I am also trying to use custom GRMs generated by REAP, given that my samples are from admixed individuals. I think I have formatted correctly the gz file (no headers, four columns [ID, ID2, SNPs, relatedness]. Basically I created a .txt file with my data and then I compressed it using gzip. However, I am getting an error (in the first line) when reading my custom grm.gz matrix:
Error: Error: failed to read [matrix.grm.gz]. The format of the GRM file has been changed?