DiltheyLab / HLA-LA

Fast HLA type inference from whole-genome data
GNU General Public License v3.0
124 stars 42 forks source link

update makefile for current bamtools, boost #10

Closed andrewrech closed 7 years ago

andrewrech commented 7 years ago

Hello,

Thank you for providing this excellent software. Would you consider updating your makefile to work with the current bamtools repo and boost libraries in $HOME, to ease installation for new users?

See bamtools.

BOOST_INCLUDE = {$HOME}/boost/boost_1_64_0/install/include
BOOST_LIB = {$HOME}/boost/boost_1_64_0/install/lib
BAMTOOLS_INCLUDE = {$HOME}/bamtools/include/api

BAMTOOLS_SRC = {$HOME}/bamtools/src
BAMTOOLS_LIB = {$HOME}/bamtools/lib

INCS = -I$(BOOST_INCLUDE) -I$(BAMTOOLS_INCLUDE) -I$(BAMTOOLS_SRC)
LIBS = -L$(BOOST_LIB) -L$(BAMTOOLS_LIB) -lboost_random -lboost_filesystem -lboost_system  -lbamtools -lbamtools-utils -lz -lboost_serialization

and

export LD_LIBRARY_PATH="{$HOME}/bamtools/lib:$LD_LIBRARY_PATH"

Let me know if you would like a PR to update the makefile and README. Thanks!

Andrew

serge2016 commented 7 years ago

@andrewrech did you successfully launch the software? Here is a nice Dockerfile. What's wrong with it? https://github.com/AlexanderDilthey/HLA-PRG-LA/issues/5#issuecomment-311928060

andrewrech commented 7 years ago

@serge2016 Thank you. Yes, I am able to compile the software. I would like the makefile to be standardized so this is easier for users who choose not to use docker.

serge2016 commented 7 years ago

@andrewrech I can compile it too, but I can't process the test. It fails as described in #5

andrewrech commented 7 years ago

@serge2016 I don't understand why #5 is related to the issue I have opened here?

serge2016 commented 7 years ago

@andrewrech you are a real user) I can't start this program so I wanted to find out if you can. A point to the Dockerfile to check the difference.

AlexanderDilthey commented 7 years ago

Hi @andrewrech

Good idea, thank you for the suggestion! I'll implement it!

AlexanderDilthey commented 7 years ago

@andrewrech Would you mind sending a PR?

andrewrech commented 7 years ago

I can't get your software to build due to the hardlinked dependencies, sorry.

https://github.com/AlexanderDilthey/MHC-PRG/issues/28

AlexanderDilthey commented 7 years ago

@andrewrech I had missed MHC-PRG#28 - the issue you describe there is for HLAPRG:LA, and not for HLAPRG/MHC-PRG, right?

In any case, you're getting the error because you're trying to call the binary directly, and not via the Perl script that's used for inference. As soon as you use the Perl script (with a properly configured paths.ini, as described here on GitHub), these errors will disappear.

andrewrech commented 7 years ago

@AlexanderDilthey Yes, I'm sorry, just realized incorrect repo.

I will try this.

andrewrech commented 7 years ago

@AlexanderDilthey Thanks, I was able to get this working! In retrospect, I'm not sure how to structure the Makefile, it is perhaps best to explicitly tell the user to edit it, as you have done.

0xaf1f commented 7 years ago

If you use ?= to do the assignment, users will be able to override the value on the command line.

Like

BOOST_INCLUDE ?= /hardcoded/path/to/boost/boost_1_64_0/install/include
BOOST_LIB ?= /hardcoded/path/to/boost/boost_1_64_0/install/lib

will allow for overriding those values when calling make by doing this:

make BOOST_INCLUDE=/my/boost/include BOOST_LIB=/my/boost/lib
AlexanderDilthey commented 7 years ago

@0xaf1f Great idea, I've changed the makefile accordingly.