[med-svn] [Git][med-team/diamond-aligner][master] 4 commits: Fixed missing definition
Andreas Tille
gitlab at salsa.debian.org
Thu Apr 30 20:48:04 BST 2020
Andreas Tille pushed to branch master at Debian Med / diamond-aligner
Commits:
75cdd3e5 by Andreas Tille at 2020-04-29T19:50:45+02:00
Fixed missing definition
- - - - -
b4966d14 by Andreas Tille at 2020-04-30T21:37:46+02:00
Fixed compiler error, unsigned char errors
- - - - -
135698a6 by Andreas Tille at 2020-04-30T21:43:06+02:00
Upstream says diamond-aligner does not run on 32bit systems
- - - - -
88b91b35 by Andreas Tille at 2020-04-30T21:46:50+02:00
Upload to unstable
- - - - -
5 changed files:
- debian/changelog
- debian/control
- + debian/patches/63b3e686f41272851a87c632441ba8c6484a2fe2.patch
- + debian/patches/f5daf92d3ece50ebb0c0a5f9b4133769347ec55b.patch
- debian/patches/series
Changes:
=====================================
debian/changelog
=====================================
@@ -1,3 +1,11 @@
+diamond-aligner (0.9.32-2) unstable; urgency=medium
+
+ * Fixed different build issues
+ * Upstream says diamond-aligner does not run on 32bit systems
+ https://github.com/bbuchfink/diamond/issues/347#issuecomment-622051316
+
+ -- Andreas Tille <tille at debian.org> Thu, 30 Apr 2020 21:43:33 +0200
+
diamond-aligner (0.9.32-1) unstable; urgency=medium
* New upstream version
=====================================
debian/control
=====================================
@@ -13,7 +13,7 @@ Homepage: https://github.com/bbuchfink/diamond
Rules-Requires-Root: no
Package: diamond-aligner
-Architecture: any
+Architecture: any-amd64 arm64 mips64el ppc64el s390x ia64 ppc64 riscv64 sh4 sparc64
Depends: ${shlibs:Depends},
${misc:Depends}
Recommends: med-config (>= 2.1)
=====================================
debian/patches/63b3e686f41272851a87c632441ba8c6484a2fe2.patch
=====================================
@@ -0,0 +1,380 @@
+From 63b3e686f41272851a87c632441ba8c6484a2fe2 Mon Sep 17 00:00:00 2001
+From: Benjamin Buchfink <buchfink at gmail.com>
+Date: Thu, 30 Apr 2020 16:35:49 +0200
+Subject: [PATCH] Fixed compiler error, unsigned char errors.
+
+---
+ CMakeLists.txt | 1 +
+ src/basic/basic.cpp | 14 ----------
+ src/basic/masking.cpp | 4 +--
+ src/basic/masking.h | 4 +--
+ src/basic/reduction.h | 6 ++--
+ src/basic/score_matrix.cpp | 57 +++++++++++++++-----------------------
+ src/basic/score_matrix.h | 12 ++++----
+ src/basic/value.cpp | 16 ++++++++++-
+ src/basic/value.h | 2 +-
+ src/dp/score_vector_int8.h | 2 +-
+ src/search/stage2.cpp | 2 ++
+ src/util/tantan.cpp | 2 +-
+ src/util/tantan.h | 2 +-
+ 13 files changed, 57 insertions(+), 67 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 8eb8f16b..59b92b79 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -87,6 +87,7 @@ if(X86)
+ add_library(arch_sse4_1 OBJECT ${DISPATCH_OBJECTS})
+ if (${CMAKE_CXX_COMPILER_ID} STREQUAL MSVC)
+ target_compile_options(arch_sse4_1 PUBLIC -DDISPATCH_ARCH=ARCH_SSE4_1 -D__SSSE3__ -D__SSE4_1__ -D__POPCNT__)
++ #target_compile_options(arch_sse4_1 PUBLIC -DDISPATCH_ARCH=ARCH_SSE4_1)
+ else()
+ target_compile_options(arch_sse4_1 PUBLIC -DDISPATCH_ARCH=ARCH_SSE4_1 -mssse3 -mpopcnt -msse4.1)
+ endif()
+diff --git a/src/basic/basic.cpp b/src/basic/basic.cpp
+index 508327cd..3e546e45 100644
+--- a/src/basic/basic.cpp
++++ b/src/basic/basic.cpp
+@@ -28,20 +28,6 @@ const char* Const::version_string = "0.9.32";
+ const char* Const::program_name = "diamond";
+ const char* Const::id_delimiters = " \a\b\f\n\r\t\v\1";
+
+-Value_traits::Value_traits(const char *alphabet, Letter mask_char, const char *ignore) :
+- alphabet(alphabet),
+- alphabet_size((unsigned)strlen(alphabet)),
+- mask_char(mask_char),
+- from_char(Char_representation((unsigned)alphabet_size, alphabet, mask_char, ignore))
+-{}
+-
+-const char Char_representation::invalid = '\xff';
+-
+-const Value_traits amino_acid_traits(AMINO_ACID_ALPHABET, 23, "UO-");
+-const Value_traits nucleotide_traits("ACGTN", 4, "MRWSYKVHDBX");
+-Value_traits value_traits(amino_acid_traits);
+-Value_traits input_value_traits(amino_acid_traits);
+-
+ Align_mode::Align_mode(unsigned mode) :
+ mode(mode)
+ {
+diff --git a/src/basic/masking.cpp b/src/basic/masking.cpp
+index ddbd801e..5ac76c09 100644
+--- a/src/basic/masking.cpp
++++ b/src/basic/masking.cpp
+@@ -26,7 +26,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ using namespace std;
+
+ unique_ptr<Masking> Masking::instance;
+-const uint8_t Masking::bit_mask = 128;
++const int8_t Masking::bit_mask = (int8_t)128;
+
+ Masking::Masking(const Score_matrix &score_matrix)
+ {
+@@ -42,7 +42,7 @@ Masking::Masking(const Score_matrix &score_matrix)
+ const double lambda = lc.lambda(); // 0.324032
+ for (unsigned i = 0; i < size; ++i) {
+ mask_table_x_[i] = value_traits.mask_char;
+- mask_table_bit_[i] = (uint8_t)i | bit_mask;
++ mask_table_bit_[i] = (int8_t)i | bit_mask;
+ for (unsigned j = 0; j < size; ++j)
+ if (i < n && j < n) {
+ likelihoodRatioMatrixf_[i][j] = (float)exp(lambda * score_matrix(i, j));
+diff --git a/src/basic/masking.h b/src/basic/masking.h
+index 24e872d9..dcc5db75 100644
+--- a/src/basic/masking.h
++++ b/src/basic/masking.h
+@@ -34,11 +34,11 @@ struct Masking
+ return *instance;
+ }
+ static std::unique_ptr<Masking> instance;
+- static const uint8_t bit_mask;
++ static const int8_t bit_mask;
+ private:
+ enum { size = 64 };
+ float likelihoodRatioMatrixf_[size][size], *probMatrixPointersf_[size];
+- char mask_table_x_[size], mask_table_bit_[size];
++ Letter mask_table_x_[size], mask_table_bit_[size];
+ };
+
+ size_t mask_seqs(Sequence_set &seqs, const Masking &masking, bool hard_mask = true);
+\ No newline at end of file
+diff --git a/src/basic/reduction.h b/src/basic/reduction.h
+index 54e36431..768fe59d 100644
+--- a/src/basic/reduction.h
++++ b/src/basic/reduction.h
+@@ -76,7 +76,7 @@ struct Reduction
+ return map_[a];
+ }
+
+- const char* map8() const
++ const Letter* map8() const
+ {
+ return map8_;
+ }
+@@ -107,9 +107,9 @@ struct Reduction
+
+ unsigned map_[256];
+ #ifdef _MSC_VER
+- __declspec(align(16)) char map8_[256];
++ __declspec(align(16)) Letter map8_[256];
+ #else
+- char map8_[256] __attribute__((aligned(16)));
++ Letter map8_[256] __attribute__((aligned(16)));
+ #endif
+ unsigned size_;
+ uint64_t bit_size_;
+diff --git a/src/basic/score_matrix.cpp b/src/basic/score_matrix.cpp
+index 1a2357b1..b3ba7eac 100644
+--- a/src/basic/score_matrix.cpp
++++ b/src/basic/score_matrix.cpp
+@@ -38,18 +38,6 @@ typedef double array_of_8[BLAST_NUM_STAT_VALUES];
+
+ const double INT2_MAX = std::numeric_limits<double>::max();
+
+-const signed char DNA_scores[5 * 5] = {
+- 2, -3, -3, -3, -3,
+- -3,2,-3,-3,-3,
+- -3,-3,2,-3,-3,
+- -3,-3,-3,2,-3,
+- -3,-3,-3,-3,2
+-};
+-
+-static array_of_8 dna_values[1] = {
+- { 5, 2, (double)INT2_MAX, 0, 0, 0, 0, 0, 0, 0, 0 }
+-};
+-
+ #define BLOSUM45_VALUES_MAX 14 /**< Number of different combinations supported for BLOSUM45. */
+ static array_of_8 blosum45_values[BLOSUM45_VALUES_MAX] = {
+ { (double)INT2_MAX, (double)INT2_MAX, (double)INT2_MAX, 0.2291, 0.0924, 0.2514, 0.9113, -5.7, 0.641318, 9.611060, 9.611060 },
+@@ -177,7 +165,7 @@ struct Matrix_info
+ {
+ const char *name;
+ const array_of_8 *constants;
+- const char *scores;
++ const signed char *scores;
+ const unsigned count;
+ const int default_gap_open, default_gap_extend;
+
+@@ -199,19 +187,18 @@ struct Matrix_info
+ return 0;
+ }
+
+- static const Matrix_info matrices[9];
++ static const Matrix_info matrices[8];
+ };
+
+ const Matrix_info Matrix_info::matrices[] = {
+- { "BLOSUM45", blosum45_values, (const char*)s_Blosum45PSM, BLOSUM45_VALUES_MAX, 14, 2 },
+- { "BLOSUM50", blosum50_values, (const char*)s_Blosum50PSM, BLOSUM50_VALUES_MAX, 13, 2 },
+- { "BLOSUM62", blosum62_values, (const char*)s_Blosum62PSM, BLOSUM62_VALUES_MAX, 11, 1 },
+- { "BLOSUM80", blosum80_values, (const char*)s_Blosum80PSM, BLOSUM80_VALUES_MAX, 10, 1 },
+- { "BLOSUM90", blosum90_values, (const char*)s_Blosum90PSM, BLOSUM90_VALUES_MAX, 10, 1 },
+- { "PAM70", pam70_values, (const char*)s_Pam70PSM, PAM70_VALUES_MAX, 10, 1 },
+- { "PAM250", pam250_values, (const char*)s_Pam250PSM, PAM250_VALUES_MAX, 14, 2 },
+- { "PAM30", pam30_values, (const char*)s_Pam30PSM, PAM30_VALUES_MAX, 9, 1 },
+- { "DNA", dna_values, (const char*)DNA_scores, 1, 4, 2 }
++ { "BLOSUM45", blosum45_values, (const signed char*)s_Blosum45PSM, BLOSUM45_VALUES_MAX, 14, 2 },
++ { "BLOSUM50", blosum50_values, (const signed char*)s_Blosum50PSM, BLOSUM50_VALUES_MAX, 13, 2 },
++ { "BLOSUM62", blosum62_values, (const signed char*)s_Blosum62PSM, BLOSUM62_VALUES_MAX, 11, 1 },
++ { "BLOSUM80", blosum80_values, (const signed char*)s_Blosum80PSM, BLOSUM80_VALUES_MAX, 10, 1 },
++ { "BLOSUM90", blosum90_values, (const signed char*)s_Blosum90PSM, BLOSUM90_VALUES_MAX, 10, 1 },
++ { "PAM70", pam70_values, (const signed char*)s_Pam70PSM, PAM70_VALUES_MAX, 10, 1 },
++ { "PAM250", pam250_values, (const signed char*)s_Pam250PSM, PAM250_VALUES_MAX, 14, 2 },
++ { "PAM30", pam30_values, (const signed char*)s_Pam30PSM, PAM30_VALUES_MAX, 9, 1 }
+ };
+
+ Score_matrix::Score_matrix(const string & matrix, int gap_open, int gap_extend, int frameshift, int stop_match_score, uint64_t db_letters):
+@@ -228,21 +215,21 @@ Score_matrix::Score_matrix(const string & matrix, int gap_open, int gap_extend,
+ matrix32_(Matrix_info::get(matrix).scores, stop_match_score)
+ { }
+
+-char Score_matrix::low_score() const
++int8_t Score_matrix::low_score() const
+ {
+- char low = std::numeric_limits<char>::max();
+- for (Letter i = 0; i < (char)value_traits.alphabet_size; ++i)
+- for (Letter j = i + 1; j < (char)value_traits.alphabet_size; ++j)
+- low = std::min(low, (char)this->operator()(i, j));
++ int8_t low = std::numeric_limits<int8_t>::max();
++ for (Letter i = 0; i < (Letter)value_traits.alphabet_size; ++i)
++ for (Letter j = i + 1; j < (Letter)value_traits.alphabet_size; ++j)
++ low = std::min(low, (int8_t)this->operator()(i, j));
+ return low;
+ }
+
+-char Score_matrix::high_score() const
++int8_t Score_matrix::high_score() const
+ {
+- char high = std::numeric_limits<char>::min();
+- for (Letter i = 0; i < (char)value_traits.alphabet_size; ++i)
+- for (Letter j = i; j < (char)value_traits.alphabet_size; ++j)
+- high = std::max(high, (char)this->operator()(i, j));
++ int8_t high = std::numeric_limits<int8_t>::min();
++ for (Letter i = 0; i < (Letter)value_traits.alphabet_size; ++i)
++ for (Letter j = i; j < (Letter)value_traits.alphabet_size; ++j)
++ high = std::max(high, (int8_t)this->operator()(i, j));
+ return high;
+ }
+
+@@ -264,9 +251,9 @@ std::ostream& operator<<(std::ostream& s, const Score_matrix &m)
+ return s;
+ }
+
+-const char* custom_scores(const string &matrix_file)
++const signed char* custom_scores(const string &matrix_file)
+ {
+- static char scores[25 * 25];
++ static signed char scores[25 * 25];
+ string l, s;
+ std::stringstream ss;
+ vector<Letter> pos;
+diff --git a/src/basic/score_matrix.h b/src/basic/score_matrix.h
+index 02cc710d..9fa132e3 100644
+--- a/src/basic/score_matrix.h
++++ b/src/basic/score_matrix.h
+@@ -60,7 +60,7 @@ struct Score_matrix
+ return matrix8_.data[(int(a) << 5) + int(b)];
+ }
+
+- const int* row(char a) const
++ const int* row(Letter a) const
+ {
+ return &matrix32_.data[(int)a << 5];
+ }
+@@ -106,8 +106,8 @@ struct Score_matrix
+ return log(k());
+ }
+
+- char low_score() const;
+- char high_score() const;
++ int8_t low_score() const;
++ int8_t high_score() const;
+
+ int gap_open() const
+ {
+@@ -142,7 +142,7 @@ struct Score_matrix
+ struct Scores
+ {
+ Scores() {}
+- Scores(const char *scores, int stop_match_score = 1, char bias = 0)
++ Scores(const int8_t *scores, int stop_match_score = 1, int8_t bias = 0)
+ {
+ const unsigned n = value_traits.alphabet_size;
+ for (unsigned i = 0; i < 32; ++i)
+@@ -163,7 +163,7 @@ struct Score_matrix
+ const double *constants_;
+ string name_;
+ Scores<int8_t> matrix8_;
+- char bias_;
++ int8_t bias_;
+ Scores<uint8_t> matrix8u_;
+ Scores<int16_t> matrix16_;
+ Scores<int> matrix32_;
+@@ -171,7 +171,7 @@ struct Score_matrix
+ };
+
+ extern Score_matrix score_matrix;
+-typedef signed char MatrixTable[AMINO_ACID_COUNT*AMINO_ACID_COUNT];
++typedef int8_t MatrixTable[AMINO_ACID_COUNT*AMINO_ACID_COUNT];
+ extern const MatrixTable s_Blosum45PSM, s_Blosum50PSM, s_Blosum62PSM, s_Blosum80PSM, s_Blosum90PSM, s_Pam250PSM, s_Pam30PSM, s_Pam70PSM;
+
+ #endif /* SCORE_MATRIX_H_ */
+diff --git a/src/basic/value.cpp b/src/basic/value.cpp
+index 3a5169f7..aa350cf9 100644
+--- a/src/basic/value.cpp
++++ b/src/basic/value.cpp
+@@ -3,6 +3,8 @@
+ #include "value.h"
+ #include "../util/util.h"
+
++const Letter Char_representation::invalid = '\xff';
++
+ invalid_sequence_char_exception::invalid_sequence_char_exception(char ch) :
+ msg(std::string("Invalid character (") + print_char(ch) + ") in sequence")
+ { }
+@@ -21,4 +23,16 @@ Char_representation::Char_representation(unsigned size, const char* chars, char
+ data_[(long)tolower(ch)] = mask;
+ ++mask_chars;
+ }
+-}
+\ No newline at end of file
++}
++
++Value_traits::Value_traits(const char* alphabet, Letter mask_char, const char* ignore) :
++ alphabet(alphabet),
++ alphabet_size((unsigned)strlen(alphabet)),
++ mask_char(mask_char),
++ from_char(Char_representation((unsigned)alphabet_size, alphabet, mask_char, ignore))
++{}
++
++const Value_traits amino_acid_traits(AMINO_ACID_ALPHABET, 23, "UO-");
++const Value_traits nucleotide_traits("ACGTN", 4, "MRWSYKVHDBX");
++Value_traits value_traits(amino_acid_traits);
++Value_traits input_value_traits(amino_acid_traits);
+\ No newline at end of file
+diff --git a/src/basic/value.h b/src/basic/value.h
+index 214eda9b..db6c7c08 100644
+--- a/src/basic/value.h
++++ b/src/basic/value.h
+@@ -51,7 +51,7 @@ struct Char_representation
+ return data_[(long)c];
+ }
+ private:
+- static const char invalid;
++ static const Letter invalid;
+ Letter data_[256];
+ };
+
+diff --git a/src/dp/score_vector_int8.h b/src/dp/score_vector_int8.h
+index 67406fbc..ff7b271a 100644
+--- a/src/dp/score_vector_int8.h
++++ b/src/dp/score_vector_int8.h
+@@ -28,7 +28,7 @@ struct score_vector<int8_t>
+ {
+
+ score_vector():
+- data_(_mm_set1_epi8(std::numeric_limits<char>::min()))
++ data_(_mm_set1_epi8(SCHAR_MIN))
+ {}
+
+ explicit score_vector(__m128i data):
+diff --git a/src/search/stage2.cpp b/src/search/stage2.cpp
+index 1f2ab6c4..a2df8374 100644
+--- a/src/search/stage2.cpp
++++ b/src/search/stage2.cpp
+@@ -189,8 +189,10 @@ void stage2(const Packed_loc *q,
+ typedef Map<vector<Stage1_hit>::const_iterator, Stage1_hit::Query> Map_t;
+ Map_t map(hits.begin(), hits.end());
+ if (config.fast_stage2) {
++#ifdef __SSE2__
+ for (Map_t::Iterator i = map.begin(); i.valid(); ++i)
+ search_query_offset(q[i.begin()->q], s, i.begin(), i.end(), stats, out, sid, context);
++#endif
+ }
+ else {
+ for (Map_t::Iterator i = map.begin(); i.valid(); ++i)
+diff --git a/src/util/tantan.cpp b/src/util/tantan.cpp
+index bdae2b4b..54a7c64d 100644
+--- a/src/util/tantan.cpp
++++ b/src/util/tantan.cpp
+@@ -40,7 +40,7 @@ void mask(Letter *seq,
+ float p_repeat_end,
+ float repeat_growth,
+ float p_mask,
+- const char *mask_table) {
++ const Letter *mask_table) {
+ constexpr int WINDOW = 50, RESERVE = 50000;
+
+ thread_local std::array<Array<float, Dynamic, 1>, AMINO_ACID_COUNT> e;
+diff --git a/src/util/tantan.h b/src/util/tantan.h
+index 60ab831f..3fd3ecec 100644
+--- a/src/util/tantan.h
++++ b/src/util/tantan.h
+@@ -26,7 +26,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+ namespace Util { namespace tantan {
+
+-DECL_DISPATCH(void, mask, (Letter *seq, int len, const float **likelihood_ratio_matrix, float p_repeat, float p_repeat_end, float repeat_decay, float p_mask, const char *maskTable))
++DECL_DISPATCH(void, mask, (Letter *seq, int len, const float **likelihood_ratio_matrix, float p_repeat, float p_repeat_end, float repeat_decay, float p_mask, const Letter *maskTable))
+
+ }}
+
=====================================
debian/patches/f5daf92d3ece50ebb0c0a5f9b4133769347ec55b.patch
=====================================
@@ -0,0 +1,36 @@
+From f5daf92d3ece50ebb0c0a5f9b4133769347ec55b Mon Sep 17 00:00:00 2001
+From: Benjamin Buchfink <buchfink at gmail.com>
+Date: Wed, 29 Apr 2020 18:02:04 +0200
+Subject: [PATCH] Fixed missing definition.
+
+---
+ src/search/sse_dist.h | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/src/search/sse_dist.h b/src/search/sse_dist.h
+index 44c37d03..54769483 100644
+--- a/src/search/sse_dist.h
++++ b/src/search/sse_dist.h
+@@ -116,9 +116,8 @@ static inline uint64_t reduced_match(const Letter* q, const Letter* s, int len)
+ return (uint64_t)match_block_reduced(q, s) | ((uint64_t)match_block_reduced(q + 16, s + 16) << 16) | ((uint64_t)match_block_reduced(q + 32, s + 32) << 32) | ((uint64_t)match_block_reduced(q + 48, s + 48) << 48);
+ }
+
+-#ifdef __SSE2__
+-
+ static inline uint64_t seed_mask(const Letter* s, int len) {
++#ifdef __SSE2__
+ assert(len <= 64);
+ uint64_t mask = 0;
+ const __m128i m = _mm_set1_epi8(SEED_MASK);
+@@ -130,8 +129,9 @@ static inline uint64_t seed_mask(const Letter* s, int len) {
+ if (len < 64)
+ mask &= (1llu << len) - 1;
+ return mask;
+-}
+-
++#else
++ return 0;
+ #endif
++}
+
+ #endif /* SSE_DIST_H_ */
=====================================
debian/patches/series
=====================================
@@ -1,2 +1,4 @@
avoid_unwanted_optimisation.patch
82feea2aee5c82e283704b9317cb5e8abc625f90.patch
+f5daf92d3ece50ebb0c0a5f9b4133769347ec55b.patch
+63b3e686f41272851a87c632441ba8c6484a2fe2.patch
View it on GitLab: https://salsa.debian.org/med-team/diamond-aligner/-/compare/eebe9008a9acb84672a00fd5759ac2455a218274...88b91b35667da03fe23ce867a386507859914f33
--
View it on GitLab: https://salsa.debian.org/med-team/diamond-aligner/-/compare/eebe9008a9acb84672a00fd5759ac2455a218274...88b91b35667da03fe23ce867a386507859914f33
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/20200430/af85fcca/attachment-0001.html>
More information about the debian-med-commit
mailing list