Skip to content

Commit

Permalink
Merge pull request #831 from COMBINE-lab/develop
Browse files Browse the repository at this point in the history
Merge develop -> master
  • Loading branch information
rob-p authored Feb 24, 2023
2 parents afb6c47 + 332e51f commit 35558d5
Show file tree
Hide file tree
Showing 17 changed files with 1,028 additions and 666 deletions.
27 changes: 18 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.12)
cmake_minimum_required(VERSION 3.15)

if(DEFINED ENV{CC})
set(CC $ENV{CC})
Expand Down Expand Up @@ -662,7 +662,7 @@ tar -xzvf v2021.5.tar.gz
SOURCE_DIR ${TBB_SOURCE_DIR}
INSTALL_DIR ${TBB_INSTALL_DIR}
PATCH_COMMAND "${TBB_PATCH_STEP}"
CMAKE_ARGS -DCMAKE_CXX_FLAGS=${TBB_CXXFLAGS} -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR> -DTBB_TEST=OFF -DTBB_EXAMPLES=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_STANDARD=${CMAKE_CXX_STANDARD}
CMAKE_ARGS -DCMAKE_CXX_FLAGS=${TBB_CXXFLAGS} -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR> -DTBB_TEST=OFF -DTBB_EXAMPLES=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_STANDARD=${CMAKE_CXX_STANDARD} -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
BUILD_IN_SOURCE TRUE
)

Expand Down Expand Up @@ -786,20 +786,20 @@ find_package(CURL)
if (FETCH_STADEN)
set(LIBSTADEN_FOUND FALSE)
else ()
find_package(libstadenio)
find_package(libstadenio 1.14.15)
endif()

if (NOT LIBSTADENIO_FOUND)
message("Build system will compile Staden IOLib")
message("==================================================================")
externalproject_add(libstadenio
DOWNLOAD_DIR ${CMAKE_CURRENT_SOURCE_DIR}/external
DOWNLOAD_COMMAND curl -k -L https://github.com/COMBINE-lab/staden-io_lib/archive/v1.14.8.1.tar.gz -o staden-io_lib-v1.14.8.tar.gz &&
${SHASUM} f6f30eefa478cfb708f3109a35fb6ffa0e24951d9d971985df2cef5919dd0bc3 staden-io_lib-v1.14.8.tar.gz &&
mkdir -p staden-io_lib-1.14.8 &&
tar -xzf staden-io_lib-v1.14.8.tar.gz --strip-components=1 -C staden-io_lib-1.14.8 &&
DOWNLOAD_COMMAND curl -k -L https://github.com/jkbonfield/io_lib/releases/download/io_lib-1-14-15/io_lib-1.14.15.tar.gz -o staden-io_lib-v1.14.15.tar.gz &&
${SHASUM} 20814c4365e1e2fe6630fb11d0df370dec4c5688af3871de7f1cb0129671401e staden-io_lib-v1.14.15.tar.gz &&
mkdir -p staden-io_lib-1.14.15 &&
tar -xzf staden-io_lib-v1.14.15.tar.gz --strip-components=1 -C staden-io_lib-1.14.15 &&
rm -fr staden-io_lib &&
mv -f staden-io_lib-1.14.8 staden-io_lib
mv -f staden-io_lib-1.14.15 staden-io_lib
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/external/staden-io_lib
INSTALL_DIR ${CMAKE_CURRENT_SOURCE_DIR}/external/install
CONFIGURE_COMMAND ./configure --enable-shared=no --without-libcurl --prefix=<INSTALL_DIR> LDFLAGS=${LIBSTADEN_LDFLAGS} CFLAGS=${LIBSTADEN_CFLAGS} CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER}
Expand All @@ -814,7 +814,7 @@ if (NOT LIBSTADENIO_FOUND)
endif()

set(FETCHED_STADEN TRUE)
set(STADEN_LIBRARIES "${GAT_SOURCE_DIR}/external/install/lib/libstaden-read.a")
set(STADEN_LIBRARIES "${GAT_SOURCE_DIR}/external/install/lib/libstaden-read.a;${GAT_SOURCE_DIR}/external/install/lib/libhtscodecs.a")
endif()

if (ASAN_BUILD)
Expand Down Expand Up @@ -906,11 +906,20 @@ set(CPACK_SOURCE_IGNORE_FILES

message("CPACK_SOURCE_IGNORE_FILES = ${CPACK_SOURCE_IGNORE_FILES}")

# we will use this property later
define_property(TARGET PROPERTY COMPACT_VECTOR_DIR INHERITED
BRIEF_DOCS "the path to the directory containing the compact_vector include tree"
FULL_DOCS "the path to the directory containing the compact_vector include tree")

# Recurse into pufferfish source directory
# and build the library
set(BUILD_PUFF_FOR_SALMON TRUE)
add_subdirectory(external/pufferfish)

# make sure we know the path to compact_vector
get_property(COMPACT_VECTOR_INCLUDE_PATH TARGET graphdump PROPERTY COMPACT_VECTOR_DIR)
message("fetched path for compact_vector as [${COMPACT_VECTOR_INCLUDE_PATH}]")

# and then the main salmon source directory
add_subdirectory(src)

Expand Down
7 changes: 5 additions & 2 deletions cmake/Modules/Findlibstadenio.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ find_path(STADEN_INCLUDE_DIR io_lib
HINTS ${STADEN_ROOT} ENV STADEN_ROOT
PATH_SUFFIXES include)

find_library(STADEN_LIBRARY NAMES staden-read libstaden-read
find_library(STADEN_LIBRARY NAMES staden-read libstaden-read
HINTS ${STADEN_ROOT} ENV STADEN_ROOT PATH_SUFFIXES lib lib64)

find_library(HTSCODEC_LIBRARY NAMES htscodecs libhtscodecs
HINTS ${STADEN_ROOT} ENV STADEN_ROOT PATH_SUFFIXES lib lib64)

if(STADEN_INCLUDE_DIR)
Expand All @@ -30,7 +33,7 @@ find_package_handle_standard_args(libstadenio DEFAULT_MSG

if (LIBSTADENIO_FOUND)
message(STATUS "Staden IOLib found (include: ${STADEN_INCLUDE_DIR})")
set(STADEN_LIBRARIES ${STADEN_LIBRARY})
set(STADEN_LIBRARIES "${STADEN_LIBRARY};${HTSCODEC_LIBRARY}")
endif()

mark_as_advanced(STADEN_INCLUDE_DIR STADEN_LIBRARY)
10 changes: 8 additions & 2 deletions cmake/TestSalmonQuasi.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ execute_process(COMMAND ${SALMON_QUASI_INDEX_CMD}
)

if (SALMON_QUASI_INDEX_RESULT)
message(FATAL_ERROR "Error running ${SALMON_QUASI_INDEX_COMMAND}")
message(FATAL_ERROR
"While running: ${SALMON_QUASI_INDEX_CMD}\n"
"error: ${SALMON_QUASI_INDEX_RESULT}"
)
endif()

set(SALMON_QUANT_COMMAND ${CMAKE_BINARY_DIR}/salmon quant -i sample_salmon_quasi_index -l IU -1 reads_1.fastq -2 reads_2.fastq -o sample_salmon_quasi_quant)
Expand All @@ -23,7 +26,10 @@ execute_process(COMMAND ${SALMON_QUANT_COMMAND}
RESULT_VARIABLE SALMON_QUASI_QUANT_RESULT
)
if (SALMON_QUASI_QUANT_RESULT)
message(FATAL_ERROR "Error running ${SALMON_QUASI_QUANT_RESULT}")
message(FATAL_ERROR
"While running: ${SALMON_QUANT_COMMAND}\n"
"error: ${SALMON_QUASI_QUANT_RESULT}"
)
endif()

if (EXISTS ${TOPLEVEL_DIR}/sample_data/sample_salmon_quasi_quant/quant.sf)
Expand Down
2 changes: 1 addition & 1 deletion current_version.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
VERSION_MAJOR 1
VERSION_MINOR 9
VERSION_MINOR 10
VERSION_PATCH 0
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 = '1.9'
version = '1.10'
# The full version, including alpha/beta/rc tags.
release = '1.9.0'
release = '1.10.0'

# 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++ libboost-all-dev liblzma-dev libbz2-dev \
ca-certificates zlib1g-dev libcurl4-openssl-dev curl unzip autoconf apt-transport-https ca-certificates gnupg software-properties-common wget
ENV SALMON_VERSION 1.9.0
ENV SALMON_VERSION 1.10.0

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

Expand Down
2 changes: 1 addition & 1 deletion docker/build_test.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#! /bin/bash
SALMON_VERSION=1.9.0
SALMON_VERSION=1.10.0
docker build --no-cache -t combinelab/salmon:${SALMON_VERSION} -t combinelab/salmon:latest .
38 changes: 21 additions & 17 deletions include/AlevinOpts.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@

enum class BarcodeEnd { FIVE = 5, THREE = 3 };
enum class Sequence { BARCODE, UMI };
// refers to which reads to use for mapping; use both for 5' libraries
enum class ReadsToMap { USE_BOTH, USE_FIRST, USE_SECOND };
// refers to which reads map to transcripts and to which transcripts they map to
enum class PairingStatus { UNPAIRED_LEFT, UNPAIRED_RIGHT, PAIRED_FR, PAIRED_RF };

template <class protocolT>
struct AlevinOpts {
Expand Down Expand Up @@ -82,11 +86,11 @@ struct AlevinOpts {
// initialize EM with uniform prior
bool initUniform;
//number of cells
uint32_t numCells;
uint64_t numCells;
// minimum number of CB to use for low confidence region
uint32_t lowRegionMinNumBarcodes;
uint64_t lowRegionMinNumBarcodes;
// maximum number of barcodes to use
uint32_t maxNumBarcodes;
uint64_t maxNumBarcodes;
// number of bootstraps to perform
uint32_t numBootstraps;
// number of gibbs samples to perform
Expand Down Expand Up @@ -115,27 +119,27 @@ struct AlevinOpts {
boost::filesystem::path bfhFile;

//meta-info related tags
uint32_t totalReads;
uint32_t totalUsedReads;
uint32_t readsThrown;
uint64_t totalReads;
uint64_t totalUsedReads;
uint64_t readsThrown;

uint32_t totalCBs;
uint32_t totalUsedCBs;
uint64_t totalCBs;
uint64_t totalUsedCBs;

uint32_t kneeCutoff;
uint32_t intelligentCutoff;
uint32_t totalLowConfidenceCBs;
uint32_t numFeatures;
uint32_t numNoMapCB;
uint64_t kneeCutoff;
uint64_t intelligentCutoff;
uint64_t totalLowConfidenceCBs;
uint64_t numFeatures;
uint64_t numNoMapCB;

uint32_t eqReads;
uint32_t noisyUmis;
uint64_t eqReads;
uint64_t noisyUmis;
double mappingRate;
double keepCBFraction;
double vbemNorm;

uint32_t totalDedupUMIs;
uint32_t totalExpGenes;
uint64_t totalDedupUMIs;
uint64_t totalExpGenes;
};

#endif // ALEVIN_OPTS_HPP
4 changes: 2 additions & 2 deletions include/SalmonConfig.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@

namespace salmon {
constexpr char majorVersion[] = "1";
constexpr char minorVersion[] = "9";
constexpr char minorVersion[] = "10";
constexpr char patchVersion[] = "0";
constexpr char version[] = "1.9.0";
constexpr char version[] = "1.10.0";
constexpr uint32_t indexVersion = 5;
constexpr char requiredQuasiIndexVersion[] = "p7";
} // namespace salmon
Expand Down
Loading

0 comments on commit 35558d5

Please sign in to comment.