Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
Rob Patro committed Jul 27, 2018
2 parents 0d063ef + c6e6ddf commit 42e79a6
Show file tree
Hide file tree
Showing 36 changed files with 3,890 additions and 7,545 deletions.
22 changes: 18 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,11 @@ matrix:
compiler : gcc-7
addons:
apt:
sources: ['ubuntu-toolchain-r-test']
packages: ['g++-7', 'gcc-7', 'cmake', 'cmake-data', 'zlib1g-dev', 'libbz2-dev']
update: true
sources:
- sourceline: 'ppa:mhier/libboost-latest'
- ubuntu-toolchain-r-test
packages: ['g++-7', 'gcc-7', 'zlib1g-dev', 'libbz2-dev']

install:
- export CXX="g++-7"
Expand All @@ -19,21 +22,32 @@ install:
- export PATH=$PWD/latest-gcc-symlinks:$PATH
- export AR=gcc-ar-7
- export RANLIB=gcc-ranlib-7

- DEPS_DIR="${TRAVIS_BUILD_DIR}/deps"
- mkdir ${DEPS_DIR} && cd ${DEPS_DIR}
- travis_retry wget --no-check-certificate https://cmake.org/files/v3.12/cmake-3.12.0-Linux-x86_64.tar.gz
- tar -xzvf cmake-3.12.0-Linux-x86_64.tar.gz > /dev/null
- mv cmake-3.12.0-Linux-x86_64 cmake-install
- PATH=${DEPS_DIR}/cmake-install:${DEPS_DIR}/cmake-install/bin:$PATH
- cd ${TRAVIS_BUILD_DIR}

script:
- mkdir build
- cd build
- cmake -DFETCH_BOOST=TRUE -DNO_RTM=TRUE ..
- travis_wait 45 make
- travis_wait make install
- LD_LIBRARY_PATH=${TRAVIS_BUILD_DIR}/lib:$LD_LIBRARY_PATH
- ./src/salmon -h
- travis_wait make test VERBOSE=1

after_success:
- cd $TRAVIS_BUILD_DIR
- ./scripts/push-binary.sh

after_failure:
- cat $TRAVIS_BUILD_DIR/build/Testing/Temporary/LastTest.log
- echo "Failure"
- ls -laR $TRAVIS_BUILD_DIR/build/Testing/
- cat $TRAVIS_BUILD_DIR/build/Testing/Temporary/*

#whitelist
#sudo: required
Expand Down
79 changes: 44 additions & 35 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,26 @@ enable_testing()

project (Salmon)

set(CPACK_PACKAGE_VERSION "0.11.0")
set(CPACK_PACKAGE_VERSION_MAJOR "0")
set(CPACK_PACKAGE_VERSION_MINOR "11")
set(CPACK_PACKAGE_VERSION_PATCH "0")
# auto-populate version:
# from https://stackoverflow.com/questions/47066115/cmake-get-version-from-multi-line-text-file
file(READ "current_version.txt" ver)

string(REGEX MATCH "VERSION_MAJOR ([0-9]*)" _ ${ver})
set(ver_major ${CMAKE_MATCH_1})

string(REGEX MATCH "VERSION_MINOR ([0-9]*)" _ ${ver})
set(ver_minor ${CMAKE_MATCH_1})

string(REGEX MATCH "VERSION_PATCH ([0-9]*)" _ ${ver})
set(ver_patch ${CMAKE_MATCH_1})

set(CPACK_PACKAGE_VERSION_MAJOR ${ver_major})
set(CPACK_PACKAGE_VERSION_MINOR ${ver_minor})
set(CPACK_PACKAGE_VERSION_PATCH ${ver_patch})

set(CPACK_PACKAGE_VERSION "${ver_major}.${ver_minor}.${ver_patch}")
message("version: ${CPACK_PACKAGE_VERSION}")

set(PROJECT_VERSION ${CPACK_PACKAGE_VERSION})
set(CPACK_GENERATOR "TGZ")
set(CPACK_SOURCE_GENERATOR "TGZ")
Expand All @@ -20,10 +36,16 @@ set(CPACK_SOURCE_PACKAGE_FILE_NAME

set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")

if( NOT CMAKE_BUILD_TYPE )
set( CMAKE_BUILD_TYPE Release CACHE STRING
"Choose the type of build, options are: Debug Release."
FORCE )
# Set a default build type if none was specified
set(default_build_type "Release")

if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
message(STATUS "Setting build type to '${default_build_type}' as none was specified.")
set(CMAKE_BUILD_TYPE "${default_build_type}" CACHE
STRING "Choose the type of build." FORCE)
# Set the possible values of build type for cmake-gui
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS
"Debug" "Release")
endif()

## Set the standard required compile flags
Expand All @@ -45,7 +67,7 @@ if(CONDA_BUILD)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CXXSTDFLAG "-std=c++11")
set(GCCVERSION "4.8.5")
set(GCCVERSION "4.8.2")
else ()
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
Expand Down Expand Up @@ -339,7 +361,7 @@ if (BOOST_RECONFIGURE)
set(CMAKE_PREFIX_PATH ${CMAKE_CURRENT_SOURCE_DIR}/external/install)
set(Boost_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/external/install/include)
set(Boost_LIBRARY_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/external/install/lib)
find_package(Boost 1.59.0 COMPONENTS iostreams filesystem system timer chrono program_options REQUIRED)
find_package(Boost 1.59.0 COMPONENTS iostreams filesystem system timer chrono program_options locale REQUIRED)
set(FETCH_BOOST FALSE)
endif()

Expand All @@ -360,7 +382,7 @@ elseif(FETCH_BOOST)
## Let the rest of the build process know we're going to be fetching boost
set (BOOST_LIB_SUBSET --with-iostreams --with-atomic --with-chrono --with-container --with-date_time --with-exception
--with-filesystem --with-graph --with-graph_parallel --with-math
--with-program_options --with-system
--with-program_options --with-system --with-locale
--with-timer)
set (BOOST_WILL_RECONFIGURE TRUE)
set (FETCH_BOOST FALSE)
Expand All @@ -380,6 +402,12 @@ elseif(FETCH_BOOST)
INSTALL_COMMAND ""
)

ExternalProject_Add_Step(libboost makedir
COMMAND mkdir -p <SOURCE_DIR>/build
COMMENT "Make build directory"
DEPENDEES download
DEPENDERS configure)

##
# After we've installed boost,
##
Expand All @@ -403,7 +431,7 @@ if (BOOST_WILL_RECONFIGURE)
set(Boost_FOUND TRUE)
endif()


message("BOOST ROOT = ${BOOST_ROOT}")
message("BOOST INCLUDE DIR = ${Boost_INCLUDE_DIR}")
message("BOOST INCLUDE DIRS = ${Boost_INCLUDE_DIRS}")
message("BOOST LIB DIR = ${Boost_LIBRARY_DIRS}")
Expand Down Expand Up @@ -462,28 +490,6 @@ ExternalProject_Add_Step(libcereal makedir
DEPENDEES download
DEPENDERS configure)

message("Build system will fetch and build BWA (for Salmon)")
message("==================================================================")
##
# This mode will likely go away soon, but until then, consider bundling directly with Salmon
##
include(ExternalProject)
ExternalProject_Add(libbwa
DOWNLOAD_DIR ${CMAKE_CURRENT_SOURCE_DIR}/external
#URL https://github.com/COMBINE-lab/bwa/archive/0.7.12.3.tar.gz
#DOWNLOAD_NAME bwa-master.tar.gz
DOWNLOAD_COMMAND curl -k -L https://github.com/COMBINE-lab/bwa/archive/v0.7.12.5.tar.gz -o bwa-master.tar.gz &&
${SHASUM} 1ac5661d9e12e9017a47f0264201a75d9128f28dbd9a26952925f7745ddf6036 bwa-master.tar.gz &&
mkdir -p bwa-master &&
tar -xzvf bwa-master.tar.gz --strip-components=1 -C bwa-master
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/external/bwa-master
INSTALL_DIR ${CMAKE_CURRENT_SOURCE_DIR}/external/install
CONFIGURE_COMMAND ""
BUILD_COMMAND sh -c "make ${QUIET_MAKE} CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER}"
INSTALL_COMMAND sh -c "mkdir -p <INSTALL_DIR>/lib && mkdir -p <INSTALL_DIR>/include/bwa && cp libbwa.a <INSTALL_DIR>/lib && cp *.h <INSTALL_DIR>/include/bwa && cp is.c bwtindex.c bwt_gen.c QSufSort.c ${CMAKE_CURRENT_SOURCE_DIR}/src/"
BUILD_IN_SOURCE TRUE
)

## Try and find TBB first
find_package(TBB 2018.0 COMPONENTS tbb tbbmalloc tbbmalloc_proxy )

Expand Down Expand Up @@ -532,7 +538,7 @@ ExternalProject_Add(libtbb
PATCH_COMMAND "${TBB_PATCH_STEP}"
CONFIGURE_COMMAND ""
BUILD_COMMAND make ${QUIET_MAKE} CXXFLAGS=${TBB_CXXFLAGS} lambdas=1 compiler=${TBB_COMPILER} cfg=release tbb_build_prefix=LIBS
INSTALL_COMMAND sh -c "cp ${TBB_SOURCE_DIR}/build/LIBS_release/*.${SHARED_LIB_EXTENSION}* ${TBB_INSTALL_DIR}/lib && cp -r ${TBB_SOURCE_DIR}/include/* ${TBB_INSTALL_DIR}/include"
INSTALL_COMMAND sh -c "mkdir -p ${TBB_INSTALL_DIR}/include && mkdir -p ${TBB_INSTALL_DIR}/lib && cp ${TBB_SOURCE_DIR}/build/LIBS_release/*.${SHARED_LIB_EXTENSION}* ${TBB_INSTALL_DIR}/lib && cp -r ${TBB_SOURCE_DIR}/include/* ${TBB_INSTALL_DIR}/include"
BUILD_IN_SOURCE 1
)

Expand All @@ -543,6 +549,9 @@ ExternalProject_Add_Step(libtbb reconfigure
)

set (FETCHED_TBB TRUE)
if (${FETCHED_BOOST})
add_dependencies(libtbb libboost)
endif()
endif()

##
Expand Down
9 changes: 9 additions & 0 deletions cmake/TestSalmonQuasi.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
execute_process(COMMAND tar xzvf sample_data.tgz
WORKING_DIRECTORY ${TOPLEVEL_DIR}
RESULT_VARIABLE TAR_RESULT
)

if (TAR_RESULT)
message(FATAL_ERROR "Error untarring sample_data.tgz")
endif()

set(SALMON_QUASI_INDEX_CMD ${CMAKE_BINARY_DIR}/salmon index -t transcripts.fasta -i sample_salmon_quasi_index --type quasi)
execute_process(COMMAND ${SALMON_QUASI_INDEX_CMD}
WORKING_DIRECTORY ${TOPLEVEL_DIR}/sample_data
Expand Down
3 changes: 3 additions & 0 deletions current_version.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
VERSION_MAJOR 0
VERSION_MINOR 11
VERSION_PATCH 1
2 changes: 1 addition & 1 deletion doc/source/alevin.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Alevin
================

Aleivn is a tool --- integrated with the salmon software --- that introduces a family of algorithms for quantification and analysis of 3' tagged-end single-cell sequencing data. Currently alevin supports the following two major droplet based single-cell protocols:
Alevin is a tool --- integrated with the salmon software --- that introduces a family of algorithms for quantification and analysis of 3' tagged-end single-cell sequencing data. Currently alevin supports the following two major droplet based single-cell protocols:

1. Drop-seq
2. 10x-Chromium v1/2
Expand Down
4 changes: 2 additions & 2 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@
# built documents.
#
# The short X.Y version.
version = '0.8.1'
version = '0.11'
# The full version, including alpha/beta/rc tags.
release = '0.8.1'
release = '0.11.1'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ MAINTAINER [email protected]

ENV PACKAGES git gcc make g++ cmake libboost-all-dev liblzma-dev libbz2-dev \
ca-certificates zlib1g-dev curl unzip autoconf
ENV SALMON_VERSION 0.11.0
ENV SALMON_VERSION 0.11.1

# salmon binary will be installed in /home/salmon/bin/salmon

Expand Down
85 changes: 0 additions & 85 deletions include/AlevinKmer.hpp

This file was deleted.

15 changes: 15 additions & 0 deletions include/AlevinTypes.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#ifndef __ALEVIN_TYPES_HPP__
#define __ALEVIN_TYPES_HPP__

#include "rapmap/Kmer.hpp"

namespace alevin {
namespace types {

using AlevinUMIKmer = combinelib::kmers::Kmer<32,2>;

}
}

#endif//__ALEVIN_TYPES_HPP__

1 change: 0 additions & 1 deletion include/Dedup.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
#include "SalmonOpts.hpp"
#include "CollapsedEMOptimizer.hpp"
#include "GZipWriter.hpp"
#include "AlevinKmer.hpp"
#include "RapMapUtils.hpp"
#include "AlevinUtils.hpp"

Expand Down
1 change: 0 additions & 1 deletion include/GZipWriter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#include "SalmonOpts.hpp"
#include "SalmonSpinLock.hpp"
#include "AlevinOpts.hpp"
#include "AlevinKmer.hpp"

class GZipWriter {
public:
Expand Down
6 changes: 0 additions & 6 deletions include/ProgramOptionsGenerator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@
#include <boost/program_options.hpp>
#include "SalmonOpts.hpp"

extern "C" {
#include "bwamem.h"
}

namespace salmon {
namespace po = boost::program_options;
class ProgramOptionsGenerator{
Expand All @@ -18,11 +14,9 @@ class ProgramOptionsGenerator{
po::options_description getBasicOptions(SalmonOpts& sopt);

po::options_description getMappingSpecificOptions(SalmonOpts& sopt);
po::options_description getFMDOptions(mem_opt_t* memOpt, SalmonOpts& sopt);
po::options_description getAlignmentSpecificOptions(SalmonOpts& sopt);
po::options_description getAlevinBasicOptions();
po::options_description getAlevinDevsOptions();

po::options_description getAdvancedOptions(int32_t& numBiasSamples, SalmonOpts& sopt);
po::options_description getHiddenOptions(SalmonOpts& sopt);
po::options_description getTestingOptions(SalmonOpts& sopt);
Expand Down
Loading

0 comments on commit 42e79a6

Please sign in to comment.