Ecogenomics / BamM

Metagenomics-focused BAM file manipulation
http://ecogenomics.github.io/BamM/
GNU Lesser General Public License v3.0
16 stars 7 forks source link

BamM installation #17

Closed tvishniv closed 9 years ago

tvishniv commented 9 years ago

I have installed dependences needed for BamM installation, however when I run " cd BamM $ python setup.py install" I am getting message:

checking for libhts headers in /usr/local/include... not found configure: error: Cannot find lights

and then

error: can't copy 'c/libBamM.a': doesn't exist or not a regular file

I would appreciate your help

hunter-cameron commented 9 years ago

I also have tried to install and received the can't copy 'c/libBamM.a' error.

tvishniv commented 9 years ago

libhts has been found after I installed gcc-4.9 as described here http://hpc.sourceforge.net

All my efforts to find 'c/libBamM.a' were unsuccessful. Any suggestions / solutions?

minillinim commented 9 years ago

Hey,

I've been away over the christmas break. I start back at work tomorrow. I will look into your issue then

Sorry for the delay.

minillinim commented 9 years ago

Ok. It is saying it can't find libhts headers in /usr/local/include One of the files it needs is "sam.h" which should be in a folder called "htslib" Try: $ cd /usr/local/include $ ls htslib

You should see a bunch of files including sam.h

If you don't then this means either:

A) htslib is not installed B) htslib is installed elsewhere.

Let's assume it's B. Try:

$ cd / $ find -name sam.h

On my computer I get: ... ./usr/local/include/htslib/sam.h ...

Where is yours? If nothing is found then it's probably case A -> libhts is not installed Otherwise you'll need to point BamM to the place where it is.

On another computer of mine I have installed libcfu and htslib in ~/local/opt

The folder structure looks like this: ├ opt ├── ... ├── htslib │   ├── bgzf.c │   ├── bgzf.pico │   ├── ... │   ├── cram │   │   ├── cram_codecs.c │   │   ├── cram_codecs.h │   │   ├── ... │   ├── htslib │   │   ├── bgzf.h │   │   ├── ... │   ├── test │   │   ├── aux#aux.sam │   │   ├── aux.fa │   │   ├── ... ├── libcfu-0.03 │   ├── acinclude.m4 │   ├── aclocal.m4 │   ├── ... │   ├── bin │   ├── build

I install BamM using this command:

sudo python setup.py install --with-libcfu-lib ~/local/opt/libcfu-0.03/lib/ --with-libcfu-inc ~/local/opt/libcfu-0.03/include/ --with-libhts-lib ~/local/opt/htslib/ --with-libhts-inc ~/local/opt/htslib/

I hope this helps

minillinim commented 9 years ago

Ok. I just realised that you've now located libhts. Hopefully the above comment will help someone else.

Please reinstall BamM and send me what's printed to the screen.

hunter-cameron commented 9 years ago

Hi, as I posted above, I think I'm having the same issue @tvishni is having now (I can't find the c/libBamM.a file).

Here are the results I get when I run the setup.py script from a local install of anaconda (python 2.7.7):

[hjcamero@kure-login1 BamM]$ python setup.py install --with-libhts-lib ../htslib/ --with-libhts-inc ../htslib/ --with-libcfu-inc ../libcfu-0.03/build/include/ --with-libcfu-lib ../libcfu-0.03/build/lib/
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for lgamma,log,exp in -lm... yes
checking for libcfu headers in /proj/dangl_lab/apps/libcfu-0.03/build/include... found
checking for libcfu libraries in /proj/dangl_lab/apps/libcfu-0.03/build/lib... found
checking for libhts headers in /proj/dangl_lab/apps/htslib... found
checking for libhts libraries in /proj/dangl_lab/apps/htslib... found
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h
config.status: config.h is unchanged
rm -f bamParser
rm -f bamExtractor
rm -f *.o
rm -f libBamM.a
gcc -g -fPIC -pthread -O2 -Wall -I/proj/dangl_lab/apps/htslib -I/proj/dangl_lab/apps/libcfu-0.03/build/include  -c -o bamExtractor.o bamExtractor.c
gcc -g -fPIC -pthread -O2 -Wall -I/proj/dangl_lab/apps/htslib -I/proj/dangl_lab/apps/libcfu-0.03/build/include  -c -o bamParser.o bamParser.c
gcc -g -fPIC -pthread -O2 -Wall -I/proj/dangl_lab/apps/htslib -I/proj/dangl_lab/apps/libcfu-0.03/build/include  -c -o pairedLink.o pairedLink.c
gcc -g -fPIC -pthread -O2 -Wall -I/proj/dangl_lab/apps/htslib -I/proj/dangl_lab/apps/libcfu-0.03/build/include  -c -o bamRead.o bamRead.c
gcc -g -fPIC -pthread -O2 -Wall -I/proj/dangl_lab/apps/htslib -I/proj/dangl_lab/apps/libcfu-0.03/build/include  -c -o coverageEstimators.o coverageEstimators.c
coverageEstimators.c: In function ‘estimate_P_MEAN_TRIMMED_Coverage’:
coverageEstimators.c:142:16: error: ‘NAN’ undeclared (first use in this function)
         return NAN;
                ^
coverageEstimators.c:142:16: note: each undeclared identifier is reported only once for each function it appears in
coverageEstimators.c: In function ‘estimate_P_MEAN_OUTLIER_Coverage’:
coverageEstimators.c:169:16: error: ‘NAN’ undeclared (first use in this function)
         return NAN;
                ^
coverageEstimators.c: In function ‘BM_median’:
coverageEstimators.c:219:16: error: ‘NAN’ undeclared (first use in this function)
         return NAN;
                ^
coverageEstimators.c: In function ‘estimate_P_MEAN_TRIMMED_Coverage’:
coverageEstimators.c:160:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
make: *** [coverageEstimators.o] Error 1
/nas02/home/h/j/hjcamero/anaconda/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'install_requires'
  warnings.warn(msg)
running install
running build
running build_py
running build_scripts
running install_lib
running install_scripts
changing mode of /nas02/home/h/j/hjcamero/anaconda/bin/bamm to 755
changing mode of /nas02/home/h/j/hjcamero/anaconda/bin/bamFlags to 755
running install_data
error: can't copy 'c/libBamM.a': doesn't exist or not a regular file
minillinim commented 9 years ago

It's interesting.

Could you try the solution suggested here

http://lightningismyname.blogspot.com.au/2010/10/fixing-errors-with-nan-c-const-and-gcc.html

hunter-cameron commented 9 years ago

I tried both the: export CFLAGS="-DNAN=\"(0.0/0.0)\"" command offered by the blog and the solution from the comments: export CFLAGS='-std=gnu99' and I still got the NAN errors and the final can't copy c/libBamM.a error.

hunter-cameron commented 9 years ago

I added the line: #define NAN (0.0/0.0) to coverageEstimators.c and I think it has successfully installed now.

However, running nosetests results in the following tests failing:

======================================================================
FAIL: test_bamParser.TestBamParser.test_B_parse
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/nas02/home/h/j/hjcamero/anaconda/lib/python2.7/site-packages/nose-1.3.0-py2.7.egg/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/proj/dangl_lab/apps/BamM/bamm/tests/test_bamParser.py", line 184, in test_B_parse
    assert_equals(po[i], res[i])
AssertionError: 0.0212 != 0.0

======================================================================
FAIL: test_bamParser.TestBamParser.test_C_extract
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/nas02/home/h/j/hjcamero/anaconda/lib/python2.7/site-packages/nose-1.3.0-py2.7.egg/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/proj/dangl_lab/apps/BamM/bamm/tests/test_bamParser.py", line 228, in test_C_extract
    assert_true(os.path.exists(full_path))
AssertionError: False is not true

----------------------------------------------------------------------
Ran 45 tests in 4.767s

FAILED (failures=2)
tvishniv commented 9 years ago

I tried all suggested commands:

export CFLAGS="-DNAN=\"(0.0/0.0)\"" export CFLAGS='-std=gnu99'

define NAN (0.0/0.0)

and I still got the can't copy c/libBamM.a error:

t8vimac:BamM t8v$ python setup.py install checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking for lgamma,log,exp in -lm... yes checking for libcfu headers in /usr/local/include... found checking for libcfu libraries in /usr/local/lib... found not found checking for libhts headers in /usr/local/include... found checking for libhts libraries in ... found configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged rm -f bamParser rm -f bamExtractor rm -f .o rm -f libBamM.a gcc -g -fPIC -pthread -O2 -Wall -I/usr/local/include -I/usr/local/include -c -o bamExtractor.o bamExtractor.c gcc -g -fPIC -pthread -O2 -Wall -I/usr/local/include -I/usr/local/include -c -o bamParser.o bamParser.c gcc -g -fPIC -pthread -O2 -Wall -I/usr/local/include -I/usr/local/include -c -o pairedLink.o pairedLink.c gcc -g -fPIC -pthread -O2 -Wall -I/usr/local/include -I/usr/local/include -c -o bamRead.o bamRead.c gcc -g -fPIC -pthread -O2 -Wall -I/usr/local/include -I/usr/local/include -c -o coverageEstimators.o coverageEstimators.c gcc -g -fPIC -pthread -O2 -Wall -I/usr/local/include -I/usr/local/include -static-libgcc -shared -Wl,-rpath,,-soname,libBamM.so.0 -o libBamM.a bamExtractor.c bamParser.c pairedLink.c bamRead.c coverageEstimators.c -lm -L/usr/local/lib -lcfu -lhts ld: unknown option: -soname collect2: error: ld returned 1 exit status make: ** [libBamM.a] Error 1 /usr/local/Cellar/python/2.7.8_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'install_requires' warnings.warn(msg) running install running build running build_py running build_scripts running install_lib copying build/lib/bamm/init.py -> /usr/local/lib/python2.7/site-packages/bamm copying build/lib/bamm/bamExtractor.py -> /usr/local/lib/python2.7/site-packages/bamm copying build/lib/bamm/bamFile.py -> /usr/local/lib/python2.7/site-packages/bamm copying build/lib/bamm/bamLink.py -> /usr/local/lib/python2.7/site-packages/bamm copying build/lib/bamm/bamMaker.py -> /usr/local/lib/python2.7/site-packages/bamm copying build/lib/bamm/bammExceptions.py -> /usr/local/lib/python2.7/site-packages/bamm copying build/lib/bamm/bamParser.py -> /usr/local/lib/python2.7/site-packages/bamm copying build/lib/bamm/bamRead.py -> /usr/local/lib/python2.7/site-packages/bamm copying build/lib/bamm/cWrapper.py -> /usr/local/lib/python2.7/site-packages/bamm byte-compiling /usr/local/lib/python2.7/site-packages/bamm/init.py to init.pyc byte-compiling /usr/local/lib/python2.7/site-packages/bamm/bamExtractor.py to bamExtractor.pyc byte-compiling /usr/local/lib/python2.7/site-packages/bamm/bamFile.py to bamFile.pyc byte-compiling /usr/local/lib/python2.7/site-packages/bamm/bamLink.py to bamLink.pyc byte-compiling /usr/local/lib/python2.7/site-packages/bamm/bamMaker.py to bamMaker.pyc byte-compiling /usr/local/lib/python2.7/site-packages/bamm/bammExceptions.py to bammExceptions.pyc byte-compiling /usr/local/lib/python2.7/site-packages/bamm/bamParser.py to bamParser.pyc byte-compiling /usr/local/lib/python2.7/site-packages/bamm/bamRead.py to bamRead.pyc byte-compiling /usr/local/lib/python2.7/site-packages/bamm/cWrapper.py to cWrapper.pyc running install_scripts copying build/scripts-2.7/bamFlags -> /usr/local/bin copying build/scripts-2.7/bamm -> /usr/local/bin changing mode of /usr/local/bin/bamFlags to 755 changing mode of /usr/local/bin/bamm to 755 running install_data error: can't copy 'c/libBamM.a': doesn't exist or not a regular file t8vimac:BamM t8v$

minillinim commented 9 years ago

Hi, What is the exact command you run to get this output?

I think there may be a typo in the command. Compare output from my machine:

checking for libcfu headers in /home/uqmimelf/local/opt/libcfu-0.03/include... found checking for libcfu libraries in /home/uqmimelf/local/opt/libcfu-0.03/lib... found checking for libhts headers in /home/uqmimelf/local/opt/htslib... found checking for libhts libraries in /home/uqmimelf/local/opt/htslib... found

With the output above

checking for libcfu headers in /usr/local/include... found checking for libcfu libraries in /usr/local/lib... found not found checking for libhts headers in /usr/local/include... found checking for libhts libraries in ... found

This makes the error below, there should be text between these two commas:

gcc -g -fPIC -pthread -O2 -Wall -I/usr/local/include -I/usr/local/include -static-libgcc -shared -Wl,-rpath,,-soname,libBamM.so.0 -o libBamM.a bamExtractor.c bamParser.c pairedLink.c bamRead.c coverageEstimators.c -lm -L/usr/local/lib -lcfu -lhts ld: unknown option: -soname collect2: error: ld returned 1 exit status

In a post even further above you get the correct output:

checking for libcfu headers in /proj/dangl_lab/apps/libcfu-0.03/build/include... found checking for libcfu libraries in /proj/dangl_lab/apps/libcfu-0.03/build/lib... found checking for libhts headers in /proj/dangl_lab/apps/htslib... found checking for libhts libraries in /proj/dangl_lab/apps/htslib... found

So my guess would be that the fix helps, but that there's a typo in the install command.

tvishniv commented 9 years ago

Hello, I ran: cd BamM/ $ python setup.py install --with-libhts-lib /usr/local/lib --with-libhts-inc /usr/local/include where I indicated path to libhts. Output is below. Anyway I am getting ld: unknown option: -soname Error, and because of this I got make *\ [libBamM.a] Error 1. I would appreciate your help.

checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking for lgamma,log,exp in -lm... yes checking for libcfu headers in /usr/local/include... found checking for libcfu libraries in /usr/local/lib... found checking for libhts headers in /usr/local/include... found checking for libhts libraries in /usr/local/lib... found configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged rm -f bamParser rm -f bamExtractor rm -f .o rm -f libBamM.a gcc -g -fPIC -pthread -O2 -Wall -I/usr/local/include -I/usr/local/include -c -o bamExtractor.o bamExtractor.c gcc -g -fPIC -pthread -O2 -Wall -I/usr/local/include -I/usr/local/include -c -o bamParser.o bamParser.c gcc -g -fPIC -pthread -O2 -Wall -I/usr/local/include -I/usr/local/include -c -o pairedLink.o pairedLink.c gcc -g -fPIC -pthread -O2 -Wall -I/usr/local/include -I/usr/local/include -c -o bamRead.o bamRead.c gcc -g -fPIC -pthread -O2 -Wall -I/usr/local/include -I/usr/local/include -c -o coverageEstimators.o coverageEstimators.c gcc -g -fPIC -pthread -O2 -Wall -I/usr/local/include -I/usr/local/include -static-libgcc -shared -Wl,-rpath,/usr/local/lib,-soname,libBamM.so.0 -o libBamM.a bamExtractor.c bamParser.c pairedLink.c bamRead.c coverageEstimators.c -lm -L/usr/local/lib -lcfu -L/usr/local/lib -lhts ld: unknown option: -soname collect2: error: ld returned 1 exit status make: ** [libBamM.a] Error 1 /usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'install_requires' warnings.warn(msg) running install running build running build_py running build_scripts running install_lib copying build/lib/bamm/init.py -> /usr/local/lib/python2.7/site-packages/bamm copying build/lib/bamm/bamExtractor.py -> /usr/local/lib/python2.7/site-packages/bamm copying build/lib/bamm/bamFile.py -> /usr/local/lib/python2.7/site-packages/bamm copying build/lib/bamm/bamLink.py -> /usr/local/lib/python2.7/site-packages/bamm copying build/lib/bamm/bamMaker.py -> /usr/local/lib/python2.7/site-packages/bamm copying build/lib/bamm/bammExceptions.py -> /usr/local/lib/python2.7/site-packages/bamm copying build/lib/bamm/bamParser.py -> /usr/local/lib/python2.7/site-packages/bamm copying build/lib/bamm/bamRead.py -> /usr/local/lib/python2.7/site-packages/bamm copying build/lib/bamm/cWrapper.py -> /usr/local/lib/python2.7/site-packages/bamm byte-compiling /usr/local/lib/python2.7/site-packages/bamm/init.py to init.pyc byte-compiling /usr/local/lib/python2.7/site-packages/bamm/bamExtractor.py to bamExtractor.pyc byte-compiling /usr/local/lib/python2.7/site-packages/bamm/bamFile.py to bamFile.pyc byte-compiling /usr/local/lib/python2.7/site-packages/bamm/bamLink.py to bamLink.pyc byte-compiling /usr/local/lib/python2.7/site-packages/bamm/bamMaker.py to bamMaker.pyc byte-compiling /usr/local/lib/python2.7/site-packages/bamm/bammExceptions.py to bammExceptions.pyc byte-compiling /usr/local/lib/python2.7/site-packages/bamm/bamParser.py to bamParser.pyc byte-compiling /usr/local/lib/python2.7/site-packages/bamm/bamRead.py to bamRead.pyc byte-compiling /usr/local/lib/python2.7/site-packages/bamm/cWrapper.py to cWrapper.pyc running install_scripts copying build/scripts-2.7/bamFlags -> /usr/local/bin copying build/scripts-2.7/bamm -> /usr/local/bin changing mode of /usr/local/bin/bamFlags to 755 changing mode of /usr/local/bin/bamm to 755 running install_data error: can't copy 'c/libBamM.a': doesn't exist or not a regular file

minillinim commented 9 years ago

OK.

It seems that on MAC -soname is not recognised. (see https://code.google.com/p/lz4/issues/detail?id=115) I wanted to leave the so library there but seeing as it's going to cause issues I just nuked it.

Try now.

tvishniv commented 9 years ago

Hello, I could not figure out what to do exactly to go around -soname option. tv


From: Michael Imelfort [notifications@github.com] Sent: Sunday, January 11, 2015 11:23 PM To: minillinim/BamM Cc: Vishnivetskaya, Tatiana Subject: Re: [BamM] BamM installation (#17)

OK.

It seems that on MAC -soname is not recognised. (see https://code.google.com/p/lz4/issues/detail?id=115) I wanted to leave the so library there but seeing as it's going to cause issues I just nuked it.

Try now.

— Reply to this email directly or view it on GitHubhttps://github.com/minillinim/BamM/issues/17#issuecomment-69528896.

etiology commented 9 years ago

Has anyone figured out the missing libBamM.a issue yet?

minillinim commented 9 years ago

I have removed this option so it should just install. Give it a go.

tvishniv commented 9 years ago

Hello,

It works now, c/libBamM.a is created and copied.

When I run nosetests I got one ERROR (see below). Could you advise what to do to fix this error? Appreciate your help.

$ nosetests .Python(14494,0x7fff7a651300) malloc: * error for object 0x7f9b6b6b3570: pointer being freed was not allocated * set a breakpoint in malloc_error_break to debug Python(14496,0x7fff7a651300) malloc: * error for object 0x7f9b6b424ab0: pointer being freed was not allocated * set a breakpoint in malloc_error_break to debug EWARNING: Could not find contig: [A] in BAM: [/Users/TVishni/BamM/bamm/tests/modelling/contigs.mp.bam]. WARNING: Could not find contig: [B] in BAM: [/Users/TVishni/BamM/bamm/tests/modelling/contigs.mp.bam]. WARNING: Could not find contig: [C] in BAM: [/Users/TVishni/BamM/bamm/tests/modelling/contigs.mp.bam]. WARNING: Could not find contig: [E] in BAM: [/Users/TVishni/BamM/bamm/tests/modelling/contigs.mp.bam].

F..........................................

ERROR: test_bamParser.TestBamParser.test_B_parse

Traceback (most recent call last): File "/usr/local/lib/python2.7/site-packages/nose/case.py", line 197, in runTest self.test(*self.arg) File "/Users/TVishni/BamM/bamm/tests/test_bamParser.py", line 163, in test_B_parse if not mp_col and self.mpBamFile[0] in header[i]: IndexError: list index out of range

FAIL: test_bamParser.TestBamParser.test_C_extract

Traceback (most recent call last): File "/usr/local/lib/python2.7/site-packages/nose/case.py", line 197, in runTest self.test(*self.arg) File "/Users/TVishni/BamM/bamm/tests/test_bamParser.py", line 228, in test_C_extract assert_true(os.path.exists(full_path)) AssertionError: False is not true


Ran 45 tests in 1.680s

FAILED (errors=1, failures=1)


From: Michael Imelfort [notifications@github.com] Sent: Wednesday, January 14, 2015 7:44 PM To: minillinim/BamM Cc: Vishnivetskaya, Tatiana Subject: Re: [BamM] BamM installation (#17)

I have removed this option so it should just install. Give it a go.

— Reply to this email directly or view it on GitHubhttps://github.com/minillinim/BamM/issues/17#issuecomment-70021582.

minillinim commented 9 years ago

Hi,

Glad that part works. The new error is related to a separate issue which I've just fixed in 1.3.4. I'll close this issue now.

minillinim commented 9 years ago

Should be fixed in 1.3.4

minillinim commented 9 years ago

@hunter-cameron

I have found the cause of this. It's due to a change in how BWA parses paired reads in the latest versions: (Ex: 0.7.10-r789).

Basically, it doesn't like the "_1" "_2" suffixes I put on the simulated reads in nosetests. Running nosetests with an earlier version of BWA should get around this. In truth though this doesn't affect how BamM runs.

Can you try running nosetests with an earlier version of BWA on your path?

etiology commented 9 years ago

Thank you for working on this

On Jan 15, 2015, at 10:48 PM, Michael Imelfort notifications@github.com wrote:

@hunter-cameron

I have found the cause of this. It's due to a change in how BWA parses paired reads in the latest versions: (Ex: 0.7.10-r789).

Basically, it doesn't like the "_1" "_2" suffixes I put on the simulated reads in nosetests. Running nosetests with an earlier version of BWA should get around this. In truth though this doesn't affect how BamM runs.

Can you try running nosetests with an earlier version of BWA on your path?

— Reply to this email directly or view it on GitHub.

minillinim commented 9 years ago

nosetests passes for bwa 0.7.12

sstevens2 commented 9 years ago

I'm also having the problem with the error error: can't copy 'c/libBamM.a': doesn't exist or not a regular file when I try to install BamM. Bit confused about how it was fixed above. Trying to install on a unix server. Thanks for any help!

minillinim commented 9 years ago

@sarilou89 Can you please show me what get's printed to the screen when you try to install BamM

sstevens2 commented 9 years ago

It looks like it still isn't finding the htslib. So I included the ls of where I thought it was at the bottom. Not sure what is missing though.

$ sudo python setup.py install --with-libhts-lib /usr/local/lib/python2.7/dist-packages/pysam/include/htslib/htslib --with-libhts-inc /usr/local/lib/python2.7/dist-packages/pysam/include/htslib/htslib --with-libcfu-inc /home/username/program_installers/libcfu-0.03/include/ --with-libcfu-lib /home/username/program_installers/libcfu-0.03/ checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking for lgamma,log,exp in -lm... yes checking for libcfu headers in /home/username/program_installers/libcfu-0.03/include... found checking for libcfu libraries in /home/username/program_installers/libcfu-0.03... found checking for libhts headers in /usr/local/lib/python2.7/dist-packages/pysam/include/htslib/htslib... not found configure: error: Cannot find libhts make: * No rule to make target `clean'. Stop. make: * No targets specified and no makefile found. Stop. /usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'install_requires' warnings.warn(msg) running install running build running build_py running build_scripts running install_lib running install_scripts changing mode of /usr/local/bin/bamFlags to 775 changing mode of /usr/local/bin/bamm to 775 running install_data error: can't copy 'c/libBamM.a': doesn't exist or not a regular file username@server:~/program_installers/BamM$ ls /usr/local/lib/python2.7/dist-packages/pysam/include/htslib/htslib bgzf.h init.py klist.h kstring.h vcf_sweep.h faidx.h init.pyc knetfile.h sam.h vcfutils.h hfile.h kfunc.h kseq.h synced_bcf_reader.h hts_defs.h khash.h ksort.h tbx.h hts.h khash_str2int.h kstdint.h vcf.h

On Wed, Jan 28, 2015 at 7:24 PM, Michael Imelfort notifications@github.com wrote:

@sarilou89 https://github.com/sarilou89 Can you please show me what get's printed to the screen when you try to install BamM

— Reply to this email directly or view it on GitHub https://github.com/minillinim/BamM/issues/17#issuecomment-71952206.

minillinim commented 9 years ago

Your version of htslib is in a non-standard place with a non-standard name. Depending on how it was installed you may have some issues but if you really want to use this version of htslib then try this:

sudo ln -s /usr/local/lib/python2.7/dist-packages/pysam/libchtslib.so /usr/local/lib/python2.7/dist-packages/pysam/libhts.so sudo ln -s /usr/local/lib/python2.7/dist-packages/pysam/libchtslib.so.0 /usr/local/lib/python2.7/dist-packages/pysam/libhts.so.0

Then in the BamM folder:

sudo python setup.py install --with-libcfu-lib /home/username/program_installers/libcfu-0.03/lib/ --with-libcfu-inc /home/username/program_installers/libcfu-0.03/include/ --with-libhts-lib /usr/local/lib/python2.7/dist-packages/pysam --with-libhts-inc /usr/local/lib/python2.7/dist-packages/pysam/include/htslib

If you have weird errors then please reinstall htslib in the standard way

Good luck!