diff options
author | Yuri Victorovich <yuri@FreeBSD.org> | 2021-01-19 09:28:00 +0000 |
---|---|---|
committer | Yuri Victorovich <yuri@FreeBSD.org> | 2021-01-19 09:28:00 +0000 |
commit | 1446cc829cf794e5bcfac689a94345ed65870805 (patch) | |
tree | 9901227eddced4e3d2a3e41d1c3686b9ac8e03d6 /biology/spoa | |
parent | f579f97eec26a1b7ec01d4842130da676a9050e1 (diff) |
New port: biology/spoa: C++ implementation of the partial order alignment (POA) algorithm
Notes
Notes:
svn path=/head/; revision=562036
Diffstat (limited to 'biology/spoa')
-rw-r--r-- | biology/spoa/Makefile | 38 | ||||
-rw-r--r-- | biology/spoa/distinfo | 3 | ||||
-rw-r--r-- | biology/spoa/files/patch-CMakeLists.txt | 107 | ||||
-rw-r--r-- | biology/spoa/pkg-descr | 9 | ||||
-rw-r--r-- | biology/spoa/pkg-plist | 8 |
5 files changed, 165 insertions, 0 deletions
diff --git a/biology/spoa/Makefile b/biology/spoa/Makefile new file mode 100644 index 000000000000..cca49a95a263 --- /dev/null +++ b/biology/spoa/Makefile @@ -0,0 +1,38 @@ +# $FreeBSD$ + +PORTNAME= spoa +DISTVERSION= 4.0.7 +CATEGORIES= biology + +MAINTAINER= yuri@FreeBSD.org +COMMENT= C++ implementation of the partial order alignment (POA) algorithm + +LICENSE= MIT +LICENSE_FILE= ${WRKSRC}/LICENSE + +BUILD_DEPENDS= bioparser>0:biology/bioparser \ + ${LOCALBASE}/include/biosoup/nucleic_acid.hpp:biology/biosoup \ + cereal>0:devel/cereal \ + cpu_features>0:devel/cpu_features \ + simde>0:devel/simde +RUN_DEPENDS= cereal>0:devel/cereal +TEST_DEPENDS= googletest>0:devel/googletest + +USES= cmake compiler:c++11-lang localbase:ldflags +USE_LDCONFIG= yes + +USE_GITHUB= yes +GH_ACCOUNT= rvaser + +CMAKE_ON= BUILD_SHARED_LIBS spoa_optimize_for_portability spoa_build_executable spoa_use_simde spoa_use_simde_nonvec spoa_use_simde_openmp spoa_generate_dispatch +CMAKE_OFF= spoa_optimize_for_native + +LDFLAGS+= -lz -lcpu_features + +do-test: + @cd ${BUILD_WRKSRC} && \ + ${SETENV} ${CONFIGURE_ENV} ${CMAKE_BIN} ${CMAKE_ARGS} -D${PORTNAME}_build_tests:BOOL=ON ${CMAKE_SOURCE_PATH} && \ + ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} ${ALL_TARGET} && \ + ${BUILD_WRKSRC}/bin/${PORTNAME}_test + +.include <bsd.port.mk> diff --git a/biology/spoa/distinfo b/biology/spoa/distinfo new file mode 100644 index 000000000000..b004cd66001d --- /dev/null +++ b/biology/spoa/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1611045674 +SHA256 (rvaser-spoa-4.0.7_GH0.tar.gz) = f8cb409adcca20ca6cc0025371743b915790879957cf001ca5e155ed16fd14e0 +SIZE (rvaser-spoa-4.0.7_GH0.tar.gz) = 43574 diff --git a/biology/spoa/files/patch-CMakeLists.txt b/biology/spoa/files/patch-CMakeLists.txt new file mode 100644 index 000000000000..a94d9aae7e0e --- /dev/null +++ b/biology/spoa/files/patch-CMakeLists.txt @@ -0,0 +1,107 @@ +--- CMakeLists.txt.orig 2021-01-15 03:44:02 UTC ++++ CMakeLists.txt +@@ -44,9 +44,10 @@ if (spoa_use_simde OR + endif () + endif () + +-if (NOT TARGET cereal) +- add_subdirectory(vendor/cereal EXCLUDE_FROM_ALL) +-endif () ++#if (NOT TARGET cereal) ++# add_subdirectory(vendor/cereal EXCLUDE_FROM_ALL) ++#endif () ++find_package(cereal REQUIRED) + + add_library(${PROJECT_NAME} + src/alignment_engine.cpp +@@ -55,8 +56,8 @@ add_library(${PROJECT_NAME} + src/dispatcher.cpp) + target_include_directories(${PROJECT_NAME} PUBLIC + $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> +- $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/vendor/simde> +- $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/vendor/cpu_features/include> ++ #$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/vendor/simde> ++ #$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/vendor/cpu_features/include> + $<INSTALL_INTERFACE:include>) + target_link_libraries(${PROJECT_NAME} + cereal) +@@ -65,9 +66,9 @@ if (BUILD_SHARED_LIBS) + endif () + + if (spoa_generate_dispatch) +- if (NOT TARGET cpu_features) +- add_subdirectory(vendor/cpu_features EXCLUDE_FROM_ALL) +- endif () ++ #if (NOT TARGET cpu_features) ++ # add_subdirectory(vendor/cpu_features EXCLUDE_FROM_ALL) ++ #endif () + + list(APPEND ARCHITECTURES avx2 sse4.1 sse2) + foreach(arch IN LISTS ARCHITECTURES) +@@ -92,8 +93,8 @@ if (spoa_generate_dispatch) + ${PROJECT_NAME}_sse4.1 + ${PROJECT_NAME}_sse2) + +- target_link_libraries(${PROJECT_NAME} +- cpu_features) ++ #target_link_libraries(${PROJECT_NAME} ++ # cpu_features) + endif () + + include(GNUInstallDirs) +@@ -110,18 +111,19 @@ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/spoa-1.pc + + option(spoa_build_executable "Build spoa standalone tool" OFF) + if (spoa_build_executable) +- if (NOT TARGET biosoup) +- add_subdirectory(vendor/bioparser/vendor/biosoup EXCLUDE_FROM_ALL) +- endif () +- if (NOT TARGET bioparser) +- add_subdirectory(vendor/bioparser EXCLUDE_FROM_ALL) +- endif () ++ #if (NOT TARGET biosoup) ++ # add_subdirectory(vendor/bioparser/vendor/biosoup EXCLUDE_FROM_ALL) ++ #endif () ++ #if (NOT TARGET bioparser) ++ # add_subdirectory(vendor/bioparser EXCLUDE_FROM_ALL) ++ #endif () + add_executable(${PROJECT_NAME}_exe + src/main.cpp) + target_link_libraries(${PROJECT_NAME}_exe + ${PROJECT_NAME} +- bioparser +- biosoup) ++ #bioparser ++ #biosoup ++ ) + target_compile_definitions(${PROJECT_NAME}_exe PRIVATE + SPOA_VERSION="v${PROJECT_VERSION}") + set_property(TARGET ${PROJECT_NAME}_exe PROPERTY +@@ -134,19 +136,19 @@ endif () + option(spoa_build_tests "Build spoa unit tests" OFF) + if (spoa_build_tests) + find_package(GTest REQUIRED) +- if (NOT TARGET biosoup) +- add_subdirectory(vendor/bioparser/vendor/biosoup EXCLUDE_FROM_ALL) +- endif () +- if (NOT TARGET bioparser) +- add_subdirectory(vendor/bioparser EXCLUDE_FROM_ALL) +- endif () ++ #if (NOT TARGET biosoup) ++ # add_subdirectory(vendor/bioparser/vendor/biosoup EXCLUDE_FROM_ALL) ++ #endif () ++ #if (NOT TARGET bioparser) ++ # add_subdirectory(vendor/bioparser EXCLUDE_FROM_ALL) ++ #endif () + include_directories(${PROJECT_SOURCE_DIR}/src) + add_executable(${PROJECT_NAME}_test + test/spoa_test.cpp) + target_link_libraries(${PROJECT_NAME}_test + ${PROJECT_NAME} +- bioparser +- biosoup ++ #bioparser ++ #biosoup + GTest::Main) + target_compile_definitions(${PROJECT_NAME}_test PRIVATE + SPOA_DATA_PATH="${PROJECT_SOURCE_DIR}/test/data/sample.fastq.gz") diff --git a/biology/spoa/pkg-descr b/biology/spoa/pkg-descr new file mode 100644 index 000000000000..bbdf84e7cca3 --- /dev/null +++ b/biology/spoa/pkg-descr @@ -0,0 +1,9 @@ +Spoa (SIMD POA) is a c++ implementation of the partial order alignment (POA) +algorithm (as described in 10.1093/bioinformatics/18.3.452) which is used to +generate consensus sequences. It supports three alignment modes: local +(Smith-Waterman), global (Needleman-Wunsch) and semi-global alignment (overlap), +and three gap modes: linear, affine and convex (piecewise affine). It also +supports Intel SSE4.1+ and AVX2 vectorization (marginally faster due to high +latency shifts), SIMDe and dispatching. + +WWW: https://github.com/rvaser/spoa diff --git a/biology/spoa/pkg-plist b/biology/spoa/pkg-plist new file mode 100644 index 000000000000..7883602bf5f0 --- /dev/null +++ b/biology/spoa/pkg-plist @@ -0,0 +1,8 @@ +bin/spoa +include/spoa/alignment_engine.hpp +include/spoa/architectures.hpp +include/spoa/graph.hpp +include/spoa/spoa.hpp +lib/libspoa.so +lib/libspoa.so.7.0.0 +libdata/pkgconfig/spoa-1.pc |