diff --git a/recipes/muse/0001-Makefile.patch b/recipes/muse/0001-Makefile.patch new file mode 100644 index 0000000000000..f74a0587e8375 --- /dev/null +++ b/recipes/muse/0001-Makefile.patch @@ -0,0 +1,51 @@ +diff --git a/Makefile b/Makefile +index 5edd6e1..78d946c 100755 +--- a/Makefile ++++ b/Makefile +@@ -1,6 +1,6 @@ +-CPP := g++ +-CC := gcc +-LINK := g++ ++CPP := ${CXX} ++CC := ${CC} ++LINK := ${CXX} + mkfile_dir := $(dir $(abspath $(lastword $(MAKEFILE_LIST)))) + + CSOURCES= $(wildcard src/*.c) +@@ -11,12 +11,12 @@ COMMONOBJS= lib/libhts.a lib/libboost_iostreams.a lib/libtcmalloc_minimal.a + Warnings=-Wreturn-type -Warray-bounds -Wmaybe-uninitialized -Waddress + WarningsAsErrors=$(Warnings) -Werror=return-type -Werror=array-bounds -Werror=address + CFLAGS= $(WarningsAsErrors) -Wno-unused-function +-CPPFLAGS= $(WarningsAsErrors) -Wno-unused-function -std=c++11 ++CPPFLAGS= $(WarningsAsErrors) -Wno-unused-function -std=c++14 + + RELEASE_FLAGS= -O3 -g + + # Includes +-INCLUDES = -Iinc/ ++INCLUDES += -Iinc/ -Iinc/htslib -I$(PREFIX)/include + # + # Common flags + COMMONFLAGS += $(INCLUDES) +@@ -24,7 +24,7 @@ COMMONFLAGS += $(INCLUDES) + CXXFLAGS += $(COMMONFLAGS) + CFLAGS += $(COMMONFLAGS) + CPPFLAGS += $(COMMONFLAGS) +-COMMONLIBS= -Llib/ -lz -lm -lpthread -lbz2 -lcurl -lcrypto -llzma -fopenmp ++COMMONLIBS += -Llib/ -lz -lm -lpthread -lbz2 -lcurl -lcrypto -llzma -lhts -ldl -fopenmp -L${PREFIX}/lib + + #LIBS += $(COMMONLIBS) -ltcmalloc + LIBS += $(COMMONLIBS) +@@ -38,10 +38,10 @@ all: $(TARGET) + .SUFFIXES: .c .cpp .o + + %.c.o: %.c +- $(CC) $(CFLAGS) $(RELEASE_FLAGS) -c $< -o $@ ++ $(CC) $(CFLAGS) $(RELEASE_FLAGS) $(INCLUDES) $(LIBS) -c $< -o $@ + + %.cpp.o: %.cpp +- $(CPP) $(CPPFLAGS) $(RELEASE_FLAGS) $(OPENMP) -c $< -o $@ ++ $(CPP) $(CPPFLAGS) $(RELEASE_FLAGS) $(OPENMP) $(INCLUDES) $(LIBS) -c $< -o $@ + + $(TARGET): $(OBJS) Makefile + $(LINKLINE) diff --git a/recipes/muse/0001-add-LDFLAGS.patch b/recipes/muse/0001-add-LDFLAGS.patch deleted file mode 100644 index f28ec42a45648..0000000000000 --- a/recipes/muse/0001-add-LDFLAGS.patch +++ /dev/null @@ -1,7 +0,0 @@ ---- Makefile -+++ Makefile -@@ -9,3 +9,3 @@ - $(BIN): $(C_OBJ) $(CPP_OBJ) -- $(CPP) $(C_OBJ) $(CPP_OBJ) -o $(BIN) -lm -lz -+ $(CPP) $(C_OBJ) $(CPP_OBJ) -o $(BIN) $(LDFLAGS) -lm -lz - diff --git a/recipes/muse/build.sh b/recipes/muse/build.sh index f29124b5ed79f..dc0bf210dc652 100644 --- a/recipes/muse/build.sh +++ b/recipes/muse/build.sh @@ -1,6 +1,29 @@ -#!/usr/bin/env bash +#!/bin/bash +set -euo pipefail -make CPP="${CXX}" CPPFLAGS="${CXXFLAGS}" +export LIBPATH="-L${PREFIX}/lib" +export LDFLAGS="${LDFLAGS} -L${PREFIX}/lib" +export CFLAGS="${CFLAGS} -O3" -mkdir -p "${PREFIX}/bin" -cp MuSE "${PREFIX}/bin/" +rm -rf boost_1_70_0/ + +if [[ `uname` == "Darwin" ]]; then + ln -sf ${CC} ${PREFIX}/bin/clang + ln -sf ${CXX} ${PREFIX}/bin/clang++ +else + ln -sf ${CC} ${PREFIX}/bin/gcc + ln -sf ${CXX} ${PREFIX}/bin/g++ +fi + +./install_muse.sh + +if [[ `uname` == "Darwin" ]]; then + rm -rf ${PREFIX}/bin/clang + rm -rf ${PREFIX}/bin/clang++ +else + rm -rf ${PREFIX}/bin/gcc + rm -rf ${PREFIX}/bin/g++ +fi + +install -d "${PREFIX}/bin" +install -v -m 0755 MuSE "${PREFIX}/bin" diff --git a/recipes/muse/fix-install_muse.sh.patch b/recipes/muse/fix-install_muse.sh.patch new file mode 100644 index 0000000000000..cd6bcdbd4a8bb --- /dev/null +++ b/recipes/muse/fix-install_muse.sh.patch @@ -0,0 +1,84 @@ +diff --git a/install_muse.sh b/install_muse.sh +index 7bc2153..f8ab6e3 100755 +--- a/install_muse.sh ++++ b/install_muse.sh +@@ -4,13 +4,21 @@ make clean + + mkdir -p lib + ++if [[ `uname` == "Darwin" ]]; then ++ export TOOL=clang ++else ++ export TOOL=gcc ++fi ++ + # compile boost library +-cd boost_1_70_0/ +-./bootstrap.sh ++cd boost-1.86.0/ ++./bootstrap.sh --with-toolset="${TOOL}" --prefix="${PREFIX}" + ./b2 --clean +-./b2 ++./b2 toolset="${TOOL}" --layout=system link=static \ ++ threading=multi strip=on include="${PREFIX}/include" \ ++ variant=release address-model=64 install + +-cp stage/lib/libboost_iostreams.a ../lib/ ++cp -f ${PREFIX}/lib/libboost_iostreams.a ../lib/ + cd .. + + # compile libtcmalloc +@@ -22,12 +30,12 @@ fi + + git clone https://github.com/gperftools/gperftools.git + cd gperftools +-git checkout gperftools-2.9.1 ++git checkout gperftools-2.16 + ./autogen.sh +-./configure --libdir="$PWD" +-make -j4 ++./configure --libdir="${PWD}" --prefix="${PREFIX}" ++make -j${CPU_COUNT} + make install +-cp libtcmalloc_minimal.a ../lib/ ++cp -f libtcmalloc_minimal.a ../lib/ + cd .. + + # combine htslib +@@ -42,27 +50,15 @@ cd htslib + git checkout 1.9 + #git submodule update --init --recursive + autoreconf -i +-./configure +-make -j4 +-cp libhts.a ../lib/ ++./configure --enable-libcurl --enable-plugins \ ++ LDFLAGS="-L${PREFIX}/lib -Wl,-R${PREFIX}/lib" \ ++ CPPFLAGS="-I${PREFIX}/include" ++make -j${CPU_COUNT} ++cp -f libhts.a ../lib/ + + cd .. + +-make +- +-#clean htslib and gperftools and boost libraries +-rm -r boost_1_70_0/stage +- +-chmod -R 755 gperftools +-rm -r gperftools +- +-chmod -R 755 htslib +-rm -r htslib +- +- +- +- +- +- +- +- ++CFLAGS="${CFLAGS} -O3 ${LDFLAGS}" \ ++ CC="${CC}" CXX="${CXX}" CXXFLAGS="${CXXFLAGS} -O3 -I${PREFIX}/include" \ ++ LDFLAGS="${LDFLAGS} -L${PREFIX}/lib" \ ++ make -j"${CPU_COUNT}" diff --git a/recipes/muse/meta.yaml b/recipes/muse/meta.yaml index 690bc876e5203..533c981c9b17f 100644 --- a/recipes/muse/meta.yaml +++ b/recipes/muse/meta.yaml @@ -1,31 +1,61 @@ +{% set name = "MuSE" %} +{% set version = "2.1.2" %} +{% set sha256 = "48df7ec3f64244400243163b48eb658105854b7b0d6287af98242dd89f396f59" %} + package: - name: muse - version: 1.0.rc + name: {{ name|lower }} + version: {{ version }} source: - md5: c63fdb48c041f6f9545879f1a7e4da58 - url: https://github.com/danielfan/MuSE/archive/v1.0-rc.tar.gz +- url: https://github.com/wwylab/MuSE/archive/refs/tags/v{{ version }}.tar.gz + sha256: {{ sha256 }} patches: - - 0001-add-LDFLAGS.patch + - 0001-Makefile.patch + - fix-install_muse.sh.patch +- url: https://github.com/boostorg/boost/releases/download/boost-1.86.0/boost-1.86.0-b2-nodocs.tar.gz + sha256: 2128a4c96862b5c0970c1e34d76b1d57e4a1016b80df85ad39667f30b1deba26 + folder: boost-1.86.0 build: - number: 8 + number: 0 + skip: True # [osx] + run_exports: + - {{ pin_subpackage('muse', max_pin="x") }} requirements: build: - - make - {{ compiler('cxx') }} - {{ compiler('c') }} + - make + - autoconf + - automake + - libtool host: + - llvm-openmp # [osx] + - libgomp # [linux] + - libcurl + - icu + - bzip2 + - xz - zlib run: - - zlib + - llvm-openmp # [osx] + - libgomp # [linux] test: commands: - - MuSE 2>&1 | grep Version > /dev/null + - "MuSE 2>&1 | grep Version > /dev/null" about: - home: "http://bioinformatics.mdanderson.org/main/MuSE" - license: "https://github.com/danielfan/MuSE/blob/master/LICENSE" - summary: Somatic point mutation caller + home: "https://github.com/wwylab/MuSE" + license: "GPL-2.0-or-later" + license_family: GPL + license_file: "LICENSE" + summary: "An accurate and ultra-fast somatic point mutation calling tool for whole-genome sequencing (WGS) and whole-exome sequencing (WES) data from heterogeneous tumor samples." + doc_url: "https://bioinformatics.mdanderson.org/public-software/muse" + dev_url: "https://github.com/wwylab/MuSE" + +extra: + identifiers: + - doi:10.1101/gr.278456.123 + - doi:10.1186/s13059-016-1029-6