[med-svn] [Git][med-team/racon][master] 13 commits: New upstream version
Michael R. Crusoe
gitlab at salsa.debian.org
Tue Nov 12 14:40:20 GMT 2019
Michael R. Crusoe pushed to branch master at Debian Med / racon
Commits:
78473cf1 by Michael R. Crusoe at 2019-11-12T13:14:41Z
New upstream version
- - - - -
46027c68 by Michael R. Crusoe at 2019-11-12T13:14:42Z
New upstream version 1.4.10
- - - - -
6752f2c9 by Michael R. Crusoe at 2019-11-12T13:14:43Z
Update upstream source from tag 'upstream/1.4.10'
Update to upstream version '1.4.10'
with Debian dir 59e7d9917e239dfb651af1a429c5ba043465cfcf
- - - - -
d13a4da7 by Michael R. Crusoe at 2019-11-12T13:20:20Z
patch refresh
- - - - -
73639426 by Michael R. Crusoe at 2019-11-12T13:23:51Z
try the tests
- - - - -
0aad7cf1 by Michael R. Crusoe at 2019-11-12T13:33:14Z
include example files & ship the test executable
- - - - -
1806af54 by Michael R. Crusoe at 2019-11-12T13:38:22Z
turn on autopkgtest
- - - - -
b26dfde2 by Michael R. Crusoe at 2019-11-12T13:56:50Z
include wrapper
- - - - -
54c8d0cd by Michael R. Crusoe at 2019-11-12T13:56:50Z
remove __FILE__ ref
- - - - -
d63fdb97 by Michael R. Crusoe at 2019-11-12T14:31:38Z
mark script as being py3
- - - - -
59010b19 by Michael R. Crusoe at 2019-11-12T14:31:59Z
don't hardbake the test path
- - - - -
725e769a by Michael R. Crusoe at 2019-11-12T14:33:54Z
test fixup
- - - - -
8cd0ae14 by Michael R. Crusoe at 2019-11-12T14:33:54Z
update changelog and release
- - - - -
18 changed files:
- .gitmodules
- CMakeLists.txt
- debian/changelog
- debian/control
- + debian/examples
- + debian/install
- + debian/patches/py3
- + debian/patches/remove_buildpath
- debian/patches/series
- debian/patches/use_debian_packaged_libs.patch
- debian/rules
- + debian/tests/control
- src/cuda/cudapolisher.cpp
- + src/logger.cpp
- + src/logger.hpp
- src/polisher.cpp
- src/polisher.hpp
- src/window.cpp
Changes:
=====================================
.gitmodules
=====================================
@@ -16,9 +16,6 @@
[submodule "vendor/rampler"]
path = vendor/rampler
url = https://github.com/rvaser/rampler
-[submodule "vendor/logger"]
- path = vendor/logger
- url = https://github.com/rvaser/logger
[submodule "vendor/ClaraGenomicsAnalysis"]
path = vendor/ClaraGenomicsAnalysis
url = https://github.com/clara-genomics/ClaraGenomicsAnalysis
=====================================
CMakeLists.txt
=====================================
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.2)
project(racon)
-set(racon_version 1.4.7)
+set(racon_version 1.4.10)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib)
@@ -30,6 +30,7 @@ include_directories(${PROJECT_SOURCE_DIR}/src)
set(racon_sources
src/main.cpp
+ src/logger.cpp
src/polisher.cpp
src/overlap.cpp
src/sequence.cpp
@@ -58,9 +59,6 @@ endif()
if (NOT TARGET edlib)
add_subdirectory(vendor/edlib EXCLUDE_FROM_ALL)
endif()
-if (NOT TARGET logger)
- add_subdirectory(vendor/logger EXCLUDE_FROM_ALL)
-endif()
if (racon_enable_cuda)
if (DEFINED CLARAGENOMICSANALYSIS_SDK_PATH)
list(APPEND CMAKE_PREFIX_PATH "${CLARAGENOMICSANALYSIS_SDK_PATH}/cmake")
@@ -90,7 +88,7 @@ if (racon_enable_cuda)
endif()
endif()
-target_link_libraries(racon bioparser spoa thread_pool edlib_static logger)
+target_link_libraries(racon bioparser spoa thread_pool edlib_static)
if (racon_enable_cuda)
target_link_libraries(racon cudapoa cudaaligner)
endif()
@@ -106,6 +104,7 @@ if (racon_build_tests)
set(racon_test_sources
test/racon_test.cpp
+ src/logger.cpp
src/polisher.cpp
src/overlap.cpp
src/sequence.cpp
@@ -123,7 +122,7 @@ if (racon_build_tests)
add_subdirectory(vendor/googletest/googletest EXCLUDE_FROM_ALL)
endif()
- target_link_libraries(racon_test bioparser spoa thread_pool edlib_static logger gtest_main)
+ target_link_libraries(racon_test bioparser spoa thread_pool edlib_static gtest_main)
if (racon_enable_cuda)
target_link_libraries(racon_test cudapoa cudaaligner)
endif()
=====================================
debian/changelog
=====================================
@@ -1,17 +1,21 @@
-racon (1.4.7-1) UNRELEASED; urgency=medium
+racon (1.4.10-1) unstable; urgency=medium
+ * Team upload.
+
+ [ Andreas Tille ]
* New upstream version
* debhelper-compat 12
* Standards-Version: 4.4.0
- * Build-Depends: liblogger-dev
- Closes: #940564
* Point watch file to new location
* New homepage
* Versioned Build-Depends: libthread-pool-dev (>= 2)
- * New upstream version
- * New upstream version
- -- Andreas Tille <tille at debian.org> Wed, 18 Sep 2019 11:43:24 +0200
+ [ Michael Crusoe ]
+ * New upstream version Closes: #940564
+ * Run the tests during the build
+ * Run the tests as part of 'autopkgtest'ing
+
+ -- Michael R. Crusoe <michael.crusoe at gmail.com> Tue, 12 Nov 2019 14:43:58 +0100
racon (1.3.2-1) unstable; urgency=medium
=====================================
debian/control
=====================================
@@ -11,7 +11,6 @@ Build-Depends: debhelper-compat (= 12),
libedlib-dev,
libspoa-dev,
libthread-pool-dev (>= 2),
- liblogger-dev,
rampler
Standards-Version: 4.4.0
Vcs-Browser: https://salsa.debian.org/med-team/racon
@@ -22,6 +21,7 @@ Package: racon
Architecture: any
Depends: ${shlibs:Depends},
${misc:Depends}
+Recommends: python3
Description: consensus module for raw de novo DNA assembly of long uncorrected reads
Racon is intended as a standalone consensus module to correct raw
contigs generated by rapid assembly methods which do not include a
=====================================
debian/examples
=====================================
@@ -0,0 +1 @@
+test/data
=====================================
debian/install
=====================================
@@ -0,0 +1,2 @@
+obj-*/bin/racon_test /usr/lib/racon/
+scripts/racon_wrapper.py /usr/bin/
=====================================
debian/patches/py3
=====================================
@@ -0,0 +1,10 @@
+From: Michael R. Crusoe <michael.crusoe at gmail.com>
+Subject: Mark script as being Python version 3
+--- racon.orig/scripts/racon_wrapper.py
++++ racon/scripts/racon_wrapper.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+
+ from __future__ import print_function
+ import os, sys, time, shutil, argparse, subprocess
=====================================
debian/patches/remove_buildpath
=====================================
@@ -0,0 +1,24 @@
+From: Michael R. Crusoe <michael.crusoe>
+Subject: remove unnecessary __FILE__ reference
+
+It reduces the reproduciblilty of the build
+--- racon.orig/src/polisher.cpp
++++ racon/src/polisher.cpp
+@@ -143,8 +143,7 @@
+ #else
+ fprintf(stderr, "[racon::createPolisher] error: "
+ "Attemping to use CUDA when CUDA support is not available.\n"
+- "Please check logic in %s:%s\n",
+- __FILE__, __func__);
++ "Please check logic in scripts/racon_wrapper.py:%s\n", __func__);
+ exit(1);
+ #endif
+ }
+--- racon.orig/test/racon_test_config.h.in
++++ racon/test/racon_test_config.h.in
+@@ -6,4 +6,4 @@
+
+ #include <string>
+
+-const std::string racon_test_data_path = "@racon_test_data_path@";
++const std::string racon_test_data_path = "./data/";
=====================================
debian/patches/series
=====================================
@@ -1 +1,3 @@
use_debian_packaged_libs.patch
+remove_buildpath
+py3
=====================================
debian/patches/use_debian_packaged_libs.patch
=====================================
@@ -2,9 +2,9 @@ Author: Andreas Tille <tille at debian.org>
Last-Update: Fri, 08 Jun 2018 13:20:51 +0200
Description: Use Debian packaged libraries
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -46,21 +46,6 @@ endif()
+--- racon.orig/CMakeLists.txt
++++ racon/CMakeLists.txt
+@@ -47,18 +47,6 @@
# Add version information to bibary.
target_compile_definitions(racon PRIVATE RACON_VERSION="v${racon_version}")
@@ -19,25 +19,21 @@ Description: Use Debian packaged libraries
-endif()
-if (NOT TARGET edlib)
- add_subdirectory(vendor/edlib EXCLUDE_FROM_ALL)
--endif()
--if (NOT TARGET logger)
-- add_subdirectory(vendor/logger EXCLUDE_FROM_ALL)
-endif()
if (racon_enable_cuda)
if (DEFINED CLARAGENOMICSANALYSIS_SDK_PATH)
list(APPEND CMAKE_PREFIX_PATH "${CLARAGENOMICSANALYSIS_SDK_PATH}/cmake")
-@@ -90,7 +75,9 @@ if (racon_enable_cuda)
+@@ -88,7 +76,8 @@
endif()
endif()
--target_link_libraries(racon bioparser spoa thread_pool edlib_static logger)
-+#set_target_properties(racon PROPERTIES COMPILE_FLAGS -pthread LINK_FLAGS -pthread) # does not work
-+target_link_libraries(racon spoa thread_pool edlib logger z)
+-target_link_libraries(racon bioparser spoa thread_pool edlib_static)
++target_link_libraries(racon spoa thread_pool edlib z)
+set_target_properties(racon PROPERTIES COMPILE_FLAGS -pthread LINK_FLAGS -pthread)
if (racon_enable_cuda)
target_link_libraries(racon cudapoa cudaaligner)
endif()
-@@ -119,11 +106,7 @@ if (racon_build_tests)
+@@ -118,11 +107,7 @@
add_executable(racon_test ${racon_test_sources})
endif()
@@ -45,8 +41,8 @@ Description: Use Debian packaged libraries
- add_subdirectory(vendor/googletest/googletest EXCLUDE_FROM_ALL)
- endif()
-
-- target_link_libraries(racon_test bioparser spoa thread_pool edlib_static logger gtest_main)
-+ target_link_libraries(racon_test spoa thread_pool pthread edlib logger gtest_main gtest z)
+- target_link_libraries(racon_test bioparser spoa thread_pool edlib_static gtest_main)
++ target_link_libraries(racon_test spoa thread_pool pthread edlib gtest_main gtest z)
if (racon_enable_cuda)
target_link_libraries(racon_test cudapoa cudaaligner)
endif()
=====================================
debian/rules
=====================================
@@ -12,3 +12,8 @@ override_dh_auto_configure:
# Somehow the means in the patch for CMakeLists.txt to replace -lpthread by -pthread to not work
# Just hack it here
sed -i 's/-lpthread/-pthread/' obj-*/CMakeFiles/racon_test.dir/link.txt
+
+override_dh_auto_test:
+ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
+ cd test && ../obj-*/bin/racon_test
+endif
=====================================
debian/tests/control
=====================================
@@ -0,0 +1,3 @@
+Test-Command: sh -c "cd /usr/share/doc/racon/examples && /usr/lib/racon/racon_test"
+Depends: @
+Restrictions: allow-stderr
=====================================
src/cuda/cudapolisher.cpp
=====================================
@@ -10,11 +10,11 @@
#include <cuda_profiler_api.h>
#include "sequence.hpp"
+#include "logger.hpp"
#include "cudapolisher.hpp"
#include <claragenomics/utils/cudautils.hpp>
#include "bioparser/bioparser.hpp"
-#include "logger/logger.hpp"
namespace racon {
=====================================
src/logger.cpp
=====================================
@@ -0,0 +1,56 @@
+/*!
+ * @file logger.cpp
+ *
+ * @brief Logger source file
+ */
+
+#include <iostream>
+
+#include "logger.hpp"
+
+namespace racon {
+
+Logger::Logger()
+ : time_(0.), bar_(0), time_point_() {
+}
+
+Logger::~Logger() {
+}
+
+void Logger::log() {
+ auto now = std::chrono::steady_clock::now();
+ if (time_point_ != std::chrono::time_point<std::chrono::steady_clock>()) {
+ time_ += std::chrono::duration_cast<std::chrono::duration<double>>(now - time_point_).count();
+ }
+ time_point_ = now;
+}
+
+void Logger::log(const std::string& msg) const {
+ std::cerr << msg << " " << std::fixed
+ << std::chrono::duration_cast<std::chrono::duration<double>>(std::chrono::steady_clock::now() - time_point_).count()
+ << " s" << std::endl;
+}
+
+void Logger::bar(const std::string& msg) {
+ ++bar_;
+ std::string progress_bar = "[" + std::string(bar_, '=') + (bar_ == 20 ? "" : ">" + std::string(19 - bar_, ' ')) + "]";
+
+ std::cerr << msg << " " << progress_bar << " " << std::fixed
+ << std::chrono::duration_cast<std::chrono::duration<double>>(std::chrono::steady_clock::now() - time_point_).count()
+ << " s";
+
+ bar_ %= 20;
+ if (bar_ == 0) {
+ std::cerr << std::endl;
+ } else {
+ std::cerr << "\r";
+ }
+}
+
+void Logger::total(const std::string& msg) const {
+ std::cerr << msg << " " << std::fixed
+ << time_ + std::chrono::duration_cast<std::chrono::duration<double>>(std::chrono::steady_clock::now() - time_point_).count()
+ << " s" << std::endl;
+}
+
+}
=====================================
src/logger.hpp
=====================================
@@ -0,0 +1,56 @@
+/*!
+ * @file logger.hpp
+ *
+ * @brief Logger header file
+ */
+
+#pragma once
+
+#include <cstdint>
+#include <chrono>
+#include <string>
+
+namespace racon {
+
+static const std::string version = "v1.0.0";
+
+class Logger {
+public:
+ Logger();
+
+ Logger(const Logger&) = default;
+ Logger& operator=(const Logger&) = default;
+
+ Logger(Logger&&) = default;
+ Logger& operator=(Logger&&) = default;
+
+ ~Logger();
+
+ /*!
+ * @brief Resets the time point
+ */
+ void log();
+
+ /*!
+ * @brief Prints the elapsed time from last time point to stderr
+ */
+ void log(const std::string& msg) const;
+
+ /*!
+ * @brief Prints a progress bar and the elapsed time from last time to
+ * stderr (the progress bar resets after 20 calls)
+ */
+ void bar(const std::string& msg);
+
+ /*!
+ * @brief Prints the total elapsed time from the first log() call
+ */
+ void total(const std::string& msg) const;
+
+private:
+ double time_;
+ std::uint32_t bar_;
+ std::chrono::time_point<std::chrono::steady_clock> time_point_;
+};
+
+}
=====================================
src/polisher.cpp
=====================================
@@ -11,6 +11,7 @@
#include "overlap.hpp"
#include "sequence.hpp"
#include "window.hpp"
+#include "logger.hpp"
#include "polisher.hpp"
#ifdef CUDA_ENABLED
#include "cuda/cudapolisher.hpp"
@@ -19,7 +20,6 @@
#include "bioparser/bioparser.hpp"
#include "thread_pool/thread_pool.hpp"
#include "spoa/spoa.hpp"
-#include "logger/logger.hpp"
namespace racon {
@@ -170,7 +170,7 @@ Polisher::Polisher(std::unique_ptr<bioparser::Parser<Sequence>> sparser,
alignment_engines_(), sequences_(), dummy_quality_(window_length, '!'),
window_length_(window_length), windows_(),
thread_pool_(thread_pool::createThreadPool(num_threads)),
- thread_to_id_(), logger_(new logger::Logger()) {
+ thread_to_id_(), logger_(new Logger()) {
uint32_t id = 0;
for (const auto& it: thread_pool_->thread_identifiers()) {
=====================================
src/polisher.hpp
=====================================
@@ -25,15 +25,13 @@ namespace spoa {
class AlignmentEngine;
}
-namespace logger {
- class Logger;
-}
namespace racon {
class Sequence;
class Overlap;
class Window;
+class Logger;
enum class PolisherType {
kC, // Contig polishing
@@ -95,7 +93,7 @@ protected:
std::unique_ptr<thread_pool::ThreadPool> thread_pool_;
std::unordered_map<std::thread::id, uint32_t> thread_to_id_;
- std::unique_ptr<logger::Logger> logger_;
+ std::unique_ptr<Logger> logger_;
};
}
=====================================
src/window.cpp
=====================================
@@ -42,6 +42,10 @@ Window::~Window() {
void Window::add_layer(const char* sequence, uint32_t sequence_length,
const char* quality, uint32_t quality_length, uint32_t begin, uint32_t end) {
+ if (sequence_length == 0 || begin == end) {
+ return;
+ }
+
if (quality != nullptr && sequence_length != quality_length) {
fprintf(stderr, "[racon::Window::add_layer] error: "
"unequal quality size!\n");
View it on GitLab: https://salsa.debian.org/med-team/racon/compare/8aa72dc8661102bb424e32f2ceaf9934b02ebbf0...8cd0ae1434a1fa9db553dd7e786a7135f68d6af5
--
View it on GitLab: https://salsa.debian.org/med-team/racon/compare/8aa72dc8661102bb424e32f2ceaf9934b02ebbf0...8cd0ae1434a1fa9db553dd7e786a7135f68d6af5
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20191112/c7fd5ca3/attachment-0001.html>
More information about the debian-med-commit
mailing list