mskcc / facets

Algorithm to implement Fraction and Copy number Estimate from Tumor/normal Sequencing.
144 stars 67 forks source link

snp-pileup compilation issue #151

Open kibala93 opened 4 years ago

kibala93 commented 4 years ago

When trying to compile snp-pileup using g++ -std=c++11 -I/path/htslib/include snp-pileup.cpp \ -L/path/htslib/lib -lhts -Wl,-rpath=/path/htslib/lib -o snp-pileup I get the following error

In file included from snp-pileup.h:15:0, from snp-pilup.cpp:1: htslib/khash_str2int.h:28:26: fatal error: htslib/khash.h: No such file or directory

But I can see that htslib/khash.h does exist so I'm not sure what the issue is.

Thank you!

riyuebao commented 3 years ago

Hi! I got the same error when using the 1st command below; it worked when using the 2nd command (local install) - by directly including the full path to htslib.

Good luck!

https://github.com/mskcc/facets/tree/master/inst/extcode

This code can be compiled using

 g++ -std=c++11 snp-pileup.cpp -lhts -o snp-pileup

when htslib is available systemwide, or

 g++ -std=c++11 -I/path/htslib/include snp-pileup.cpp \\
 -L/path/htslib/lib -lhts -Wl,-rpath=/path/htslib/lib -o snp-pileup 

when it is installed locally and path is the location where it is available.