lichen2018 / LEMON

It is a software to reconstruct the HGT inserted local strain.
2 stars 0 forks source link

Installation error #3

Open giacomoorsini opened 3 months ago

giacomoorsini commented 3 months ago

Hi, I'm trying to use your tool LEMON to establish a pipeline for HGT detection as it looks very promising. Unfortunately I'm not able to complete the installation as I encounter an error in the "make" step of the LEMON installation. The error is the same of the two other issues and I'm 100% that it is not an htslib problem, as the 1.9 version is installed. In particular:

g++ -g -Wall -c BamReader.cpp -std=c++11 -o BamReader.o
In file included from BamReader.cpp:1:
BamReader.h:12:10: fatal error: cram/cram.h: No such file or directory
   12 | #include "cram/cram.h"
      |          ^~~~~~~~~~~~~
compilation terminated.
make: *** [makefile:15: BamReader.o] Error 1

Considering that it might be a problem of the conda version of htslib, i downloaded htslib from git, but I encounter other errors in the compiling of the file:

g++ -g -Wall -c BamReader.cpp -std=c++11 -o BamReader.o
In file included from /users/genomics/gorsini/.conda/envs/lemon/include/htslib_cloned/cram/cram.h:48,
                 from BamReader.h:12,
                 from BamReader.cpp:1:
/users/genomics/gorsini/.conda/envs/lemon/include/htslib_cloned/cram/cram_io.h: In function ‘int block_resize_exact(cram_block*, size_t)’:
/users/genomics/gorsini/.conda/envs/lemon/include/htslib_cloned/cram/cram_io.h:217:33: error: invalid conversion from ‘void*’ to ‘unsigned char*’ [-fpermissive]
  217 |     unsigned char *tmp = realloc(b->data, len);
      |                          ~~~~~~~^~~~~~~~~~~~~~
      |                                 |
      |                                 void*
In file included from /users/genomics/gorsini/.conda/envs/lemon/include/htslib_cloned/cram/cram.h:52,
                 from BamReader.h:12,
                 from BamReader.cpp:1:
/users/genomics/gorsini/.conda/envs/lemon/include/htslib_cloned/cram/cram_codecs.h: In function ‘int cram_not_enough_bits(cram_block*, int)’:
/users/genomics/gorsini/.conda/envs/lemon/include/htslib_cloned/cram/cram_codecs.h:232:20: warning: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘long unsigned int’} and ‘int32_t’ {aka ‘int’} [-Wsign-compare]
  232 |         (blk->byte >= blk->uncomp_size && nbits > 0) ||
      |          ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
/users/genomics/gorsini/.conda/envs/lemon/include/htslib_cloned/cram/cram_codecs.h:234:60: warning: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘long unsigned int’} and ‘int’ [-Wsign-compare]
  234 |          (blk->uncomp_size - blk->byte) * 8 + blk->bit - 7 < nbits)) {
      |          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
make: *** [makefile:15: BamReader.o] Error 1
(lemon) gorsini@node04:~/tools/HGT/lemon/hgt-detection/getAccBkp$ make
g++ -g -Wall -c BamReader.cpp -std=c++11 -o BamReader.o
In file included from /users/genomics/gorsini/.conda/envs/lemon/include/htslib_cloned/cram/cram.h:48,
                 from BamReader.h:12,
                 from BamReader.cpp:1:
/users/genomics/gorsini/.conda/envs/lemon/include/htslib_cloned/cram/cram_io.h: In function ‘int block_resize_exact(cram_block*, size_t)’:
/users/genomics/gorsini/.conda/envs/lemon/include/htslib_cloned/cram/cram_io.h:217:33: error: invalid conversion from ‘void*’ to ‘unsigned char*’ [-fpermissive]
  217 |     unsigned char *tmp = realloc(b->data, len);
      |                          ~~~~~~~^~~~~~~~~~~~~~
      |                                 |
      |                                 void*
In file included from /users/genomics/gorsini/.conda/envs/lemon/include/htslib_cloned/cram/cram.h:52,
                 from BamReader.h:12,
                 from BamReader.cpp:1:
/users/genomics/gorsini/.conda/envs/lemon/include/htslib_cloned/cram/cram_codecs.h: In function ‘int cram_not_enough_bits(cram_block*, int)’:
/users/genomics/gorsini/.conda/envs/lemon/include/htslib_cloned/cram/cram_codecs.h:232:20: warning: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘long unsigned int’} and ‘int32_t’ {aka ‘int’} [-Wsign-compare]
  232 |         (blk->byte >= blk->uncomp_size && nbits > 0) ||
      |          ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
/users/genomics/gorsini/.conda/envs/lemon/include/htslib_cloned/cram/cram_codecs.h:234:60: warning: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘long unsigned int’} and ‘int’ [-Wsign-compare]
  234 |          (blk->uncomp_size - blk->byte) * 8 + blk->bit - 7 < nbits)) {
      |          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
make: *** [makefile:15: BamReader.o] Error 1

Could you please give me clearer instructions for the installation or, as it is more probable that your tool is actually impossible to install in another machine, a docker file?

Thanks

lichen2018 commented 3 months ago

Dear giacomoorsini, As reported in the error message: BamReader.h:12:10: fatal error: cram/cram.h: No such file or directory, the C/C++ compiler is unable to locate the cram/cram.h header file. So you should set export C_INCLUDE_PATH=/home/giacomoorsini/lib/htslib-1.9 in ~ /. Bashrc file. Here /home/giacomoorsini/lib/htslib-1.9 is the path to your installed package. Thanks

giacomoorsini commented 3 months ago

Dear Li Chen, Thank you for the quick reply. I tried to follow your instructions thoroughly, although the problem persist. I've seen that there exist a newer version of LEMON called localHGT, I'm currently trying to work with it. I will let you know if I manage to solve the LEMON problem in the meanwhile. Thanks for your availability, best regards