I'm using a C implementation of EMMAX for GWAS and am getting an error that I can't get to the bottom of because I don't know enough about C. I hope there's a C expert who can take a quick look at this and let me know which of my input files has the problem, and what is causing the error.
emmax -v -d 10 -t [tped/tfam file prefix] -p [phenotype file] -k [kinship matrix] -o [output]
Source code: Actual code can be downloaded here (http://csg.sph.umich.edu//kang/emmax/download/index.html) and equivalent code for a slightly different version that can give the same error is on Github (https://github.com/slowkoni/EPI-EMMAX)
There's a problem with the variable nheadercols that leads to the error I will show below.
Top 5 rows, 7 columns of .tfam file (tab-delimited):
1 . 0 67 0 0 C 1 . 0 92 0 0 0 1 . 0 95 0 0 0 1 . 0 102 0 0 0 1 . 0 103 0 0 0
Kinship matrix looks as expected, with 1.00 down diagonal because every genotype has perfect kinship with itself, # rows and columns match the number of genotypes in the phenotype and .tfam files.
I've tried phenotype files with and without an extra column of genotype labels (shown below as first column, with no extra) (everything is tab delimited)... the two genotype IDs in the first two columns are the same for this population.
PhenolabelA1 PhenolabelA2 NA PhenolabelB1 PhenolabelB2 0 PhenolabelC1 PhenolabelC2 1 PhenolabelD1 PhenolabelD2 0 PhenolabelE1 PhenolabelE2 NA
Reading TFAM file [tfam/tped prefix].tfam .... Reading kinship file [prefix].kinf... 882 rows and 882 columns were observed with 0 missing values. Reading the phenotype file [phenotype input].txt... ERROR: Number of header columns are 2, but only 1 columns were observed
Thanks much for helping me decipher this!