Commit 5eb60d22 authored by Andreas Tille's avatar Andreas Tille
Browse files

New upstream version 2.2.4

parent 34df23e4
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
### Version 2.2.4 - 2019-02-10

  * Fixed bug in --trim5p N which would AdapterRemoval to abort if N was greater
    than the pre-trimmed read length.
  * Fixed --identify-adapters not respecting the --mate-separator option.


### Version 2.2.3 - 2019-01-22

  * Added support for trimming reads by a fixed amount: --trim5p N --trim3p N.
+7 −6
Original line number Diff line number Diff line
@@ -57,16 +57,17 @@ const char* assert_failed::what() const noexcept
void debug_raise_assert(const char* filename, size_t lineno, const char* what)
{
    std::stringstream message;
    message << "\nFATAL ERROR:\n"
            << "Debug assertion failed in '" << filename << "', line "
            << lineno << ": " << what << "\n\n"
            << "This should not happen! Please file a bug-report at\n    "
            << "https://github.com/MikkelSchubert/adapterremoval/issues/new";
    message << "Assertion failed in '" << filename << "', line "
            << lineno << ": " << what;

#ifdef AR_TEST_BUILD
    throw assert_failed(message.str());
#else
    std::cerr << message.str() << std::endl;
    std::cerr << "\nFATAL ERROR:\n"
              << message.str() << "\n\n"
              << "This should not happen! Please file a bug-report at\n    "
              << "https://github.com/MikkelSchubert/adapterremoval/issues/new"
              << std::endl;

    std::abort();
#endif
+2 −2
Original line number Diff line number Diff line
@@ -57,8 +57,8 @@ private:
 * Aborts after printing the filename, line-number, and message, plus
 * instructions for how to report the problem.
 */
void debug_raise_assert(const char* filename, size_t lineno,
                        const char* what) __attribute__ ((noreturn));
[[noreturn]] void debug_raise_assert(const char* filename, size_t lineno,
                                     const char* what);


/** Custom assert which prints various information on failure; always enabled. */
+2 −0
Original line number Diff line number Diff line
@@ -244,6 +244,8 @@ fastq::ntrimmed fastq::trim_windowed_bases(const bool trim_ns,

void fastq::truncate(size_t pos, size_t len)
{
    AR_DEBUG_ASSERT(pos == 0 || pos <= length());

    if (pos || len < length()) {
        m_sequence = m_sequence.substr(pos, len);
        m_qualities = m_qualities.substr(pos, len);
+7 −6
Original line number Diff line number Diff line
@@ -36,9 +36,6 @@
namespace ar
{

void invalid_solexa(const char offset, const char max_score, const char raw) __attribute__((noreturn));


///////////////////////////////////////////////////////////////////////////////
// fastq_error

@@ -108,7 +105,7 @@ const std::string g_phred_to_solexa = calc_phred_to_solexa();

///////////////////////////////////////////////////////////////////////////////

void invalid_phred(const char offset, const char max_score, const char raw)
[[noreturn]] void invalid_phred(const char offset, const char max_score, const char raw)
{
    if (raw < offset) {
        AR_DEBUG_ASSERT(offset == 33 || offset == 64);
@@ -134,6 +131,8 @@ void invalid_phred(const char offset, const char max_score, const char raw)
                                  "\"--qualitybase solexa\"\n\n"

                                  "See README for more information.");
            } else {
                AR_DEBUG_FAIL("TODO");
            }
        } else {
            AR_DEBUG_FAIL("Unexpected offset in fastq_encoding::decode");
@@ -181,11 +180,13 @@ void invalid_phred(const char offset, const char max_score, const char raw)
        } else {
            AR_DEBUG_FAIL("Unexpected offset in fastq_encoding::decode");
        }
    } else {
        AR_DEBUG_FAIL("invalid_phred called on valid PHRED score");
    }
}


void invalid_solexa(const char offset, const char max_score, const char raw)
[[noreturn]] void invalid_solexa(const char offset, const char max_score, const char raw)
{
    if (raw < ';') {
        if (raw < '!') {
@@ -311,7 +312,7 @@ void fastq_encoding_solexa::decode(std::string& qualities) const
    const char max_score = m_offset + m_max_score;
    for (auto& quality : qualities) {
        if (quality < ';' || quality > max_score) {
            invalid_phred(m_offset, m_max_score, quality);
            invalid_solexa(m_offset, m_max_score, quality);
        }

        quality = g_solexa_to_phred.at(quality - ';') + '!';
Loading