Compile LDhat 0.2 on Intel Mac

LDhat is a package for recombination detection. It is written in C and no GUI is available.

The official website provide DOS executables, which I suppose they meant Windows command line executables. But they also provided source package with makefile. But if you make, it will fail. It will tell you it can’t find malloc.h. But after a little bit google, malloc.h turns out to be obsolete. and “including stdlib.h should take care of what malloc.h used to handle”. So you will need to comment out the include line in two files you will see when you make, by using “/*  */”. After that it would compile just fine.

Enjoy life without Windows again.

UPDATE: The LDhat I compiled did not function properly. Even if I have malloc.h linked to /usr/include, convert will quit because of segment fault while reading sequences. This is not because of the sequence file because it quit reading sample data included with the package.

UPDATE2: LDhat compiled for Intel Mac this way seems working, except  it seems sometimes it could not load all the sequence and segment fault. It seems this happens when there are 8 sequence types/sequences. Other than that, it is working for me.

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.