Compiling Somatic Sniper From Source Code
1
0
Entering edit mode
11.8 years ago
fo3c ▴ 450

I am trying to compile somatic sniper from source but run into compilation errors.

I cloned the git repository yesterday

$ git clone --recursive git://github.com/genome/somatic-sniper.git

ran cmake

$ cmake ../somatic-sniper/
-- The C compiler identification is GNU 4.2.1
-- The CXX compiler identification is GNU 4.2.1
-- Checking whether C compiler has -isysroot
-- Checking whether C compiler has -isysroot - yes
-- Checking whether C compiler supports OSX deployment target flag
-- Checking whether C compiler supports OSX deployment target flag - yes
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Checking whether CXX compiler has -isysroot
-- Checking whether CXX compiler has -isysroot - yes
-- Checking whether CXX compiler supports OSX deployment target flag
-- Checking whether CXX compiler supports OSX deployment target flag - yes
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
No CMAKE_BUILD_TYPE specified, defaulting to release
SAMTOOLS_ROOT is set to: /Users/xxx/samtools-0.1.16
-- Found ZLIB: /usr/lib/libz.dylib (found version "1.2.3") 
-- Found Samtools 
 - Samtools include dirs: /Users/xxx/samtools-0.1.16;/usr/include
 - Samtools libraries: /Users/xxx/samtools-0.1.16/libbam.a;/usr/lib/libz.dylib
-- Looking for include file pthread.h
-- Looking for include file pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - found
-- Found Threads: TRUE  
-- Could NOT find GTest (missing:  GTEST_LIBRARY GTEST_INCLUDE_DIR GTEST_MAIN_LIBRARY) 
Google Test framework not found, no tests will be built
GTest is available at http://code.google.com/p/googletest/
Ubuntu users can likely sudo apt-get install gtest
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/xxx/SomaticSniper

and finally make

$ make
Scanning dependencies of target sniper
[ 10%] Building C object build/src/lib/sniper/CMakeFiles/sniper.dir/allele_util.c.o
[ 20%] Building C object build/src/lib/sniper/CMakeFiles/sniper.dir/dqstats.c.o
[ 30%] Building C object build/src/lib/sniper/CMakeFiles/sniper.dir/output_bed.c.o
[ 40%] Building C object build/src/lib/sniper/CMakeFiles/sniper.dir/output_classic.c.o
[ 50%] Building C object build/src/lib/sniper/CMakeFiles/sniper.dir/output_format.c.o
[ 60%] Building C object build/src/lib/sniper/CMakeFiles/sniper.dir/output_vcf.c.o
[ 70%] Building C object build/src/lib/sniper/CMakeFiles/sniper.dir/sniper_maqcns.c.o
[ 80%] Building C object build/src/lib/sniper/CMakeFiles/sniper.dir/sniper_pileup.c.o
/Users/xxx/somatic-sniper/src/lib/sniper/sniper_pileup.c: In function ‘bam_plbuf_reset’:
/Users/xxx/somatic-sniper/src/lib/sniper/sniper_pileup.c:124: error: ‘bam_plbuf_t’ has no member named ‘max_tid’
/Users/xxx/somatic-sniper/src/lib/sniper/sniper_pileup.c:124: error: ‘bam_plbuf_t’ has no member named ‘max_pos’
/Users/xxx/somatic-sniper/src/lib/sniper/sniper_pileup.c:125: error: ‘bam_plbuf_t’ has no member named ‘tid’
/Users/xxx/somatic-sniper/src/lib/sniper/sniper_pileup.c:125: error: ‘bam_plbuf_t’ has no member named ‘pos’
/Users/xxx/somatic-sniper/src/lib/sniper/sniper_pileup.c:126: error: ‘bam_plbuf_t’ has no member named ‘is_eof’
/Users/xxx/somatic-sniper/src/lib/sniper/sniper_pileup.c:127: error: ‘bam_plbuf_t’ has no member named ‘head’
/Users/xxx/somatic-sniper/src/lib/sniper/sniper_pileup.c:129: error: ‘bam_plbuf_t’ has no member named ‘mp’
/Users/xxx/somatic-sniper/src/lib/sniper/sniper_pileup.c:132: error: ‘bam_plbuf_t’ has no member named ‘head’
/Users/xxx/somatic-sniper/src/lib/sniper/sniper_pileup.c:132: error: ‘bam_plbuf_t’ has no member named ‘tail’
/Users/xxx/somatic-sniper/src/lib/sniper/sniper_pileup.c: In function ‘bam_plbuf_set_mapq_thresh’:
/Users/xxx/somatic-sniper/src/lib/sniper/sniper_pileup.c:137: error: ‘bam_plbuf_t’ has no member named ‘mapq_thresh’
/Users/xxx/somatic-sniper/src/lib/sniper/sniper_pileup.c:138: error: ‘bam_plbuf_t’ has no member named ‘mapq_thresh’
[... and many similar ones ...]
make[2]: *** [build/src/lib/sniper/CMakeFiles/sniper.dir/sniper_pileup.c.o] Error 1
make[1]: *** [build/src/lib/sniper/CMakeFiles/sniper.dir/all] Error 2
make: *** [all] Error 2

There seems to be a conflict between struct __bam_plbuf_t in sniper_pileup.c and samtool's bam.h

typedef struct {
        bam_plp_t iter;
        bam_pileup_f func;
        void *data;
    } bam_plbuf_t;

but I don't know how to solve it.

Any suggestions?

• 3.9k views
ADD COMMENT
1
Entering edit mode
11.8 years ago
ernfrid ▴ 400

SomaticSniper requires samtools v0.1.6. It looks like you are trying to link to samtools 0.1.16 and thus you are getting the conflicts.

ADD COMMENT
0
Entering edit mode

This is also addressed in SomaticSniper's README.

ADD REPLY
0
Entering edit mode

When I run "make", I get the following errors:

Scanning dependencies of target sniper [ 10%] Building C object build/src/lib/sniper/CMakeFiles/sniper.dir/alleleutil.c.o [ 20%] Building C object build/src/lib/sniper/CMakeFiles/sniper.dir/dqstats.c.o [ 30%] Building C object build/src/lib/sniper/CMakeFiles/sniper.dir/outputbed.c.o [ 40%] Building C object build/src/lib/sniper/CMakeFiles/sniper.dir/outputclassic.c.o [ 50%] Building C object build/src/lib/sniper/CMakeFiles/sniper.dir/outputformat.c.o [ 60%] Building C object build/src/lib/sniper/CMakeFiles/sniper.dir/outputvcf.c.o [ 70%] Building C object build/src/lib/sniper/CMakeFiles/sniper.dir/snipermaqcns.c.o In file included from /home/Tools/somatic-sniper/src/lib/sniper/snipermaqcns.c:4: /home/Tools/somatic-sniper/src/lib/sniper/snipermaqcns.h:5:17: error: glf.h: No such file or directory In file included from /home/Tools/somatic-sniper/src/lib/sniper/snipermaqcns.c:4: /home/Tools/somatic-sniper/src/lib/sniper/snipermaqcns.h:26: error: expected â=â, â,â, â;â, âasmâ or âattributeâ before ââ token /home/Tools/somatic-sniper/src/lib/sniper/sniper_maqcns.h:27: warning: type defaults to âintâ in declaration of âglf1_tâ /home/Tools/somatic-sniper/src/lib/sniper/sniper_maqcns.h:27: error: expected â;â, â,â or â)â before ââ token /home/Tools/somatic-sniper/src/lib/sniper/snipermaqcns.h:29: warning: type defaults to âintâ in declaration of âglf1tâ /home/Tools/somatic-sniper/src/lib/sniper/snipermaqcns.h:29: error: expected â;â, â,â or â)â before â*â token /home/Tools/somatic-sniper/src/lib/sniper/snipermaqcns.c:127: error: expected â=â, â,â, â;â, âasmâ or âattributeâ before ââ token /home/Tools/somatic-sniper/src/lib/sniper/sniper_maqcns.c:250: warning: type defaults to âintâ in declaration of âglf1_tâ /home/Tools/somatic-sniper/src/lib/sniper/sniper_maqcns.c:250: error: expected â;â, â,â or â)â before ââ token /home/Tools/somatic-sniper/src/lib/sniper/snipermaqcns.c:275: warning: type defaults to âintâ in declaration of âglf1tâ /home/Tools/somatic-sniper/src/lib/sniper/snipermaqcns.c:275: error: expected â;â, â,â or â)â before â*â token make[2]: * [build/src/lib/sniper/CMakeFiles/sniper.dir/snipermaqcns.c.o] Error 1 make[1]: [build/src/lib/sniper/CMakeFiles/sniper.dir/all] Error 2 make: ** [all] Error 2

What does this mean?? Thanks, Rini

ADD REPLY
0
Entering edit mode

You should probably post a new question instead of replying on someone else's. It also looks like the text you pasted contains special characters so is difficult to read. The FAQ has information about how text can be styled.

ADD REPLY

Login before adding your answer.

Traffic: 1670 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6