|
Post by wolfemd on Mar 18, 2015 14:48:56 GMT
Greetings,
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.
Thanks,
Marnin
|
|
|
Post by Zhihong Zhu on Mar 20, 2015 2:59:55 GMT
|
|
|
Post by yorgos on Oct 27, 2017 10:14:46 GMT
Hi Marnin,
I got the same error today after using OmicKriging. This is because OmicKriging is writing the *id file without removing the column and row names and the quotation marks.
To resolve this, I changed the relevant code line in the write_GRMBin function as follows:
write.table(cbind(id, id), file = IDFileName, quote=F, row.names=F, col.names=F)
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 hope this helps.
Cheers, Yorgos
|
|
frida
New Member
Posts: 1
|
Post by frida on Jan 24, 2018 14:29:30 GMT
Hi,
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?
Error occurs in line:
1 2 232768 2.965885
An error occurs, please check the options or data
The grm that I am working with looks like this:
1 2 232768 2.965885
1 3 223794 2.75398
1 4 224687 2.642859
1 5 238576 4.143739
1 6 238778 4.354323
1 7 224645 2.648591
1 8 238768 4.778588
1 9 238755 3.909338
1 10 234299 3.187479
1 11 235490 3.810213
Do you have a clue what could be happening here?
Thanks!
|
|
|
Post by ldbipg on Feb 20, 2020 21:46:53 GMT
Hi, I am getting the following error when trying the write_GRMBin function in "OmicKriging": Error in file(BinFileName, "wb") : invalid 'description' argument Did you not come across this? How exactly did your input matrix look like? Cheers 
|
|
|
Post by anoobvinu on Sept 20, 2023 23:35:39 GMT
Hi frida,
You need to provide the lower part of the grm, so your data should look like this for the analysis to work properly
1 1 232768 2.965885 2 1 223794 2.75398 3 1 224687 2.642859 4 1 238576 4.143739 5 1 238778 4.354323 6 1 224645 2.648591 7 1 238768 4.778588
Hope this helps someone.
Best, Anoob
|
|