I actually don't think sorting is such a great idea anymore. Would it be possible to revert to the previous behavior? If I convert from VCF to plink using the previous behavior and keeping the "--keep-allele-order" flag on, wouldn't that guarantee me that $1 corresponds to the alternate allele and $2 corresponds to the reference allele? I wanted to try this myself by removing this code from plink_data.c:
if (strcmp(bufptr4, bufptr5) <= 0) {
memcpy(insert_buf[2], bufptr4, uii);
insert_buf_len[2] = uii;
memcpy(insert_buf[3], bufptr5, ujj);
insert_buf_len[3] = ujj;
} else {
But I was not able to compile plink myself on my Ubuntu machine. I tried the following:
cd plink-ng/
./plink_first_compile
And I got the following error output:
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../liblapack.so when searching for -llapack
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../liblapack.a when searching for -llapack
/usr/bin/ld: skipping incompatible /usr/lib/liblapack.so when searching for -llapack
/usr/bin/ld: skipping incompatible /usr/lib/liblapack.a when searching for -llapack
/usr/bin/ld: cannot find -llapack
/usr/bin/ld: cannot find -lcblas
/usr/bin/ld: cannot find -latlas
But I don't understand as I have already these libraries installed on my machine.