Closed lachlansimpson closed 7 years ago
Hi Lachlan,
I'm connecting you with John DiMatteo, the developer of bamliquidator to see if he can assist here.
-Charles
Charles Y. Lin Assistant Professor Department of Molecular and Human Genetics Dan L. Duncan Cancer Center Baylor College of Medicine
On Wed, Oct 11, 2017 at 10:20 PM, Lachlan Musicman <notifications@github.com
wrote:
Installing on CentOS 7.4 in a py2.7 virtenv. I've install samtools 0.1.19
I've added the path the the samtools source because what it needs is sam.h, to CPLUS_INCLUDE_PATH, that got me past the first error. (/source/samtools/ because #include <samtools/sam.h>)
Now I run make and I see the below. There are two issues. Seemingly it can't find bam.h:
/usr/bin/ld: cannot find -lbam
Which is in the samtools dir....so I now add the full path to CPLUS_INCLUDE_PATH export CPLUS_INCLUDE_PATH=/source/samtools:/source/samtools/samtools/
But that doesn't work with the same error. Now I also note that the hdf5 details are explicitly linked. I have no /usr/lib/x86_64 - this being CentOS, I'm not surprised.
But I can't find anything related to hdf5-serial anywhere. There are allusions to it online in tickets (usually when it's missing), but I can't see anything about where or how I might find it.
I have hdf5 and hdf5-devel installed (version 1.8.12) but I see no mention of hdf5 and serial anywhere. Where can I find that to install it?
(c2c4865)[root@head-node bamliquidator_internal]# make g++ -std=c++0x -O3 -g -Wall -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I/usr/include/hdf5/serial -I/usr/local/include -c bamliquidator.m.cpp g++ -std=c++0x -O3 -g -Wall -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I/usr/include/hdf5/serial -I/usr/local/include -pthread -c bamliquidator.cpp bamliquidator.cpp: In function ‘std::vector
liquidate(const samfile_t, const bam_index_t, const string&, unsigned int, unsigned int, char, unsigned int, unsigned int)’: bamliquidator.cpp:202:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int i=0; i<spnum; i++) ^ bamliquidator.cpp:213:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int i=0; i<spnum; i++) ^ bamliquidator.cpp:215:32: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if(item.start > stopArr[i]) continue; ^ bamliquidator.cpp:216:32: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if(item.stop < startArr[i]) break; ^ g++ -O3 -g -Wall -L/usr/lib/x86_64-linux-gnu/hdf5/serial -o bamliquidator bamliquidator.o bamliquidator.m.o -lbam -lz -lpthread /usr/bin/ld: cannot find -lbam collect2: error: ld returned 1 exit status make: *** [bamliquidator] Error 1 — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/BradnerLab/pipeline/issues/59, or mute the thread https://github.com/notifications/unsubscribe-auth/AEXAr3aYDm-moSezi5mzgplCTjyIFYrpks5srYWFgaJpZM4P2aeN .
@datakid I just updated the instructions to include CentOS 7 installation notes:
https://github.com/BradnerLab/pipeline/wiki/bamliquidator#CentOS_7
As detailed at that link, the install is relatively easy if you use the EPEL repository to install hdf5 and samtools.
If you don't want to use the EPEL repository, then you will need to make sure you built the samtools .so files (e.g. make dylib
) and that the libbam.so is available on the link path (e.g. sudo ln -s /source/samtools/samtools/libbam.so.1 /usr/lib64/libbam.so
). Please just use the EPEL repo for hdf5, but if you have a reason not to then I'll document how to build that from source and link properly as well.
Marking issue as closed since I documented and tested on CentOS 7.4. We can re-open if necessary.
@jdimatteo No intention of build hdf5 from source :) but we do build samtools because of reasons (mostly "scientific reproducibility is easier with environment modules").
Thanks!
I'm still unsure about how the make command
g++ -O3 -g -Wall -L/usr/lib/x86_64-linux-gnu/hdf5/serial -o bamliquidator bamliquidator.o bamliquidator.m.o -lbam -lz -lpthread
will find /usr/lib/x86_64-linux-gnu/hdf5/serial given that the path /usr/lib/x86_64 doesn't exist in CentOS 7.4? Is it just looking for...ah, I see. I've install hdf5 on a debian machine and now I see. So that should be turned into a variable, because the files it's after are in /usr/lib64 in CentOS
Also, for CentOS people that come after me, I made these changes to the makefile:
If you follow the instructions at https://github.com/BradnerLab/pipeline/wiki/bamliquidator#CentOS_7 , you don't have to make any changes to the makefile.
@datakid please note that the -L
g++ arguments just add additional paths to be searched for and doesn't exclude the default search paths
Installing on CentOS 7.4 in a py2.7 virtenv. I've install samtools 0.1.19
I've added the path the the samtools source because what it needs is sam.h, to CPLUS_INCLUDE_PATH, that got me past the first error. (/source/samtools/ because #include <samtools/sam.h>)
Now I run make and I see the below. There are two issues. Seemingly it can't find bam.h:
/usr/bin/ld: cannot find -lbam
Which is in the samtools dir....so I now add the full path to CPLUS_INCLUDE_PATH export CPLUS_INCLUDE_PATH=/source/samtools:/source/samtools/samtools/
But that doesn't work with the same error. Now I also note that the hdf5 details are explicitly linked. I have no /usr/lib/x86_64 - this being CentOS, I'm not surprised.
But I can't find anything related to hdf5-serial anywhere. There are allusions to it online in tickets (usually when it's missing), but I can't see anything about where or how I might find it.
I have hdf5 and hdf5-devel installed (version 1.8.12) but I see no mention of hdf5 and serial anywhere. Where can I find that to install it?