Skip to content

Commit

Permalink
[FEATURE] Added CMake support.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jochen Singer committed May 9, 2018
1 parent 7c2c7c1 commit 6f8427f
Show file tree
Hide file tree
Showing 2 changed files with 77 additions and 0 deletions.
65 changes: 65 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# This file is based on the CMakeLists.txt from the examples of dlib

cmake_minimum_required(VERSION 3.0.0)

project(SCIPhI)

set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)

# ----------------------------------------------------------------------------
# Dependencies
# ----------------------------------------------------------------------------

# Search for boost
find_package(Boost 1.47 COMPONENTS program_options graph filesystem iostreams unit_test_framework REQUIRED)

# Search for zlib as a dependency for SeqAn.
find_package (ZLIB)

# Load the SeqAn module and fail if not found.
find_package (SeqAn REQUIRED)

# Tell cmake we will need dlib. This command will pull in dlib and compile it
# into your project. Note that you don't need to compile or install dlib. All
# cmake needs is the dlib source code folder and it will take care of everything.
add_subdirectory(${DLIB_INCLUDEDIR} dlib_build)

# ----------------------------------------------------------------------------
# Build Setup
# ----------------------------------------------------------------------------

# Add include directories.
include_directories (${SEQAN_INCLUDE_DIRS} ${Boost_INCLUDE_DIR} ${CMAKE_CURRENT_SOURCE_DIR})
message(${CMAKE_CURRENT_SOURCE_DIR})

# Add link directories
link_directories(${Boost_LIBRARY_DIRS})

# Add definitions set by find_package (SeqAn).
add_definitions (${SEQAN_DEFINITIONS})

# Add CXX flags found by find_package (SeqAn).
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${SEQAN_CXX_FLAGS}")

# Add executable and link against SeqAn dependencies.
add_executable(sciphi src/findBestTrees.cpp)
target_link_libraries (sciphi dlib::dlib ${Boost_LIBRARIES})

add_executable(convertTree2Map src/convertTreeIntoClusterMap.cpp)
target_link_libraries (convertTree2Map dlib::dlib ${SEQAN_LIBRARIES} ${Boost_LIBRARIES})

add_executable(createSingleCellTree src/createSingleCellSeqTree.cpp)
target_link_libraries (createSingleCellTree dlib::dlib ${SEQAN_LIBRARIES} ${Boost_LIBRARIES})

add_executable(sciphi_test test/sciphi_test.cpp)
target_link_libraries (sciphi_test dlib::dlib ${SEQAN_LIBRARIES} ${Boost_LIBRARIES})
# To compile this program all you need to do is ask cmake. You would type
# these commands from within the directory containing this CMakeLists.txt
# file:
# mkdir build
# cd build
# cmake ..
# cmake --build . --config Release
#
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,18 @@ In order to install SCIPhI issue the following commands in the github directory:

`make`

An alternative is to use CMake (tested with version 3.11.1). Simply issue the commands:

`mkdir build`

`cd build`

`cmake ..`

`cmake --build . --config Release`

Afterwards you will find SCIPhI in the build directory.

## Run SCIPhI

SCIPhI expects the sequencing information to be passed in form of the well known mpileup format (http://www.htslib.org/doc/samtools.html). In order to generate such a file you need to align your fastq files to a reference and post process the result (e.g., following the instuctions here: https://software.broadinstitute.org/gatk/best-practices/workflow?id=11165).
Expand Down

0 comments on commit 6f8427f

Please sign in to comment.