[med-svn] [Git][med-team/libmaus2][upstream] New upstream version 2.0.812+ds
Étienne Mollier (@emollier)
gitlab at salsa.debian.org
Fri Oct 7 18:08:17 BST 2022
Étienne Mollier pushed to branch upstream at Debian Med / libmaus2
Commits:
487001f7 by Étienne Mollier at 2022-10-07T18:38:28+02:00
New upstream version 2.0.812+ds
- - - - -
5 changed files:
- ChangeLog
- configure.ac
- src/Makefile.am
- + src/libmaus2/bambam/BamAlignmentTagOnlyComparator.hpp
- src/libmaus2/suffixsort/bwtb3m/BwtMergeSortTemplate.hpp
Changes:
=====================================
ChangeLog
=====================================
@@ -1,3 +1,11 @@
+libmaus2 (2.0.812-1) unstable; urgency=medium
+
+ * Add BamAlignmentTagOnlyComparator class
+ * Make conversion between path and string explicit in BwtMergeSortTemplate
+ * Do not use -rdynamic compiler flag if it is not supported
+
+ -- German Tischler-Höhle <germant at miltenyibiotec.de> Mon, 19 Sep 2022 12:33:17 +0200
+
libmaus2 (2.0.811-1) unstable; urgency=medium
* Fix some warnings about std::iterator being deprecated
=====================================
configure.ac
=====================================
@@ -1,5 +1,5 @@
-AC_INIT(libmaus2,2.0.811,[germant at miltenyibiotec.de],[libmaus2],[https://gitlab.com/german.tischler/libmaus2])
-LIBRARY_VERSION=2:811:0
+AC_INIT(libmaus2,2.0.812,[germant at miltenyibiotec.de],[libmaus2],[https://gitlab.com/german.tischler/libmaus2])
+LIBRARY_VERSION=2:812:0
AC_MSG_NOTICE([Configuring for source in directory ${srcdir}])
AC_CANONICAL_SYSTEM
AC_CANONICAL_HOST
@@ -1958,12 +1958,12 @@ elif test "${optimization}" = "yes" ; then
g++)
CXXFLAGS="${CXXFLAGS} -O3"
CFLAGS="${CFLAGS} -O3"
- LDFLAGS="${LDFLAGS} -rdynamic"
+ LDFLAGS="${LDFLAGS} ${LIBMAUS2_COMPILER_SUPPORTS_DYNAMIC}"
;;
*-mingw32msvc-g++)
CXXFLAGS="${CXXFLAGS} -O3"
CFLAGS="${CFLAGS} -O3"
- LDFLAGS="${LDFLAGS} -rdynamic"
+ LDFLAGS="${LDFLAGS} ${LIBMAUS2_COMPILER_SUPPORTS_DYNAMIC}"
;;
cl.exe)
CXXFLAGS="${CXXFLAGS} -O2 -Ob2 -Ot -Oy"
=====================================
src/Makefile.am
=====================================
@@ -639,6 +639,7 @@ libmaus2bambam_include_HEADERS = libmaus2/bambam/DecoderBase.hpp libmaus2/bambam
libmaus2/bambam/BamAlignmentNameHIComparator.hpp \
libmaus2/bambam/BamAlignmentPosComparator.hpp \
libmaus2/bambam/BamAlignmentTagComparator.hpp \
+ libmaus2/bambam/BamAlignmentTagOnlyComparator.hpp \
libmaus2/bambam/BamEntryContainer.hpp \
libmaus2/bambam/Scram.h \
libmaus2/bambam/AlignmentValidity.hpp \
=====================================
src/libmaus2/bambam/BamAlignmentTagOnlyComparator.hpp
=====================================
@@ -0,0 +1,171 @@
+/*
+ libmaus2
+ Copyright (C) 2009-2022 German Tischler
+ Copyright (C) 2011-2013 Genome Research Limited
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>..
+*/
+#if ! defined(LIBMAUS2_BAMBAM_BAMALIGNMENTTAGONLYCOMPARATOR_HPP)
+#define LIBMAUS2_BAMBAM_BAMALIGNMENTTAGONLYCOMPARATOR_HPP
+
+#include <libmaus2/bambam/BamAlignment.hpp>
+#include <libmaus2/bambam/BamAlignmentNameComparator.hpp>
+#include <libmaus2/bambam/BamAlignmentPosComparator.hpp>
+#include <libmaus2/bambam/StrCmpNum.hpp>
+#include <libmaus2/digest/Digests.hpp>
+
+namespace libmaus2
+{
+ namespace bambam
+ {
+ /**
+ * comparator for BAM alignments by tag.
+ **/
+ struct BamAlignmentTagOnlyComparator : public StrCmpNum, public DecoderBase
+ {
+ //! data pointer
+ uint8_t const * data;
+ char const * tagname;
+
+ void setup(char const * rtagname)
+ {
+ tagname = rtagname;
+ }
+
+ /**
+ * constructor from data pointer
+ *
+ * @param rdata container data
+ **/
+ BamAlignmentTagOnlyComparator(uint8_t const * rdata)
+ :
+ data(rdata), tagname(0)
+ {
+
+ }
+
+ /**
+ * compare alignment blocks da and db by name as described in class description. if names are equal then
+ * da < db iff da is read 1
+ *
+ * @param da first string
+ * @param db second string
+ * @return true iff da < db (alignments referenced by da and db, not pointers)
+ **/
+ static bool compare(uint8_t const * da, uint64_t const al, uint8_t const * db, uint64_t const bl, char const * tagname)
+ {
+ return compareInt(da,al,db,bl,tagname) < 0;
+ }
+
+ /**
+ * compare alignment blocks da and db by name as described in class description. if names are equal then
+ * da < db iff da is read 1
+ *
+ * @param da first alignment
+ * @param db second alignment
+ * @return true iff da < db (alignments referenced by da and db, not pointers)
+ **/
+ static bool compare(libmaus2::bambam::BamAlignment const & A, libmaus2::bambam::BamAlignment const & B, char const * tagname)
+ {
+ return compare(A.D.begin(),A.blocksize,B.D.begin(),B.blocksize,tagname);
+ }
+
+ /**
+ * compare alignment blocks da and db by name as described in class description. if names are equal then compare by read1 flag (read1 < !read1)
+ *
+ * @param da first string
+ * @param db second string
+ * @return -1 if da<db, 0 if da == db, 1 if da > db (alignments referenced by da and db, not pointers)
+ **/
+ static int compareInt(uint8_t const * da, uint64_t const al, uint8_t const * db, uint64_t const bl, char const * tagname)
+ {
+ char const * taga = ::libmaus2::bambam::BamAlignmentDecoderBase::getAuxString(da,al,tagname);
+ char const * tagb = ::libmaus2::bambam::BamAlignmentDecoderBase::getAuxString(db,bl,tagname);
+
+ if ( ! taga || ! tagb )
+ {
+ if ( taga )
+ return -1;
+ else if ( tagb )
+ return 1;
+ // both with no tag
+ else
+ return 0;
+ }
+
+ int const tagcomp = strcmpnum(taga,tagb);
+
+ return tagcomp;
+ }
+
+ /**
+ * compare alignment blocks da and db by name as described in class description. if names are equal then compare by read1 flag (read1 < !read1)
+ *
+ * @param da first string
+ * @param db second string
+ * @return -1 if da<db, 0 if da == db, 1 if da > db (alignments referenced by da and db, not pointers)
+ **/
+ int compareInt(uint8_t const * da, uint64_t const al, uint8_t const * db, uint64_t const bl) const
+ {
+ return compareInt(da,al,db,bl,tagname);
+ }
+
+ /**
+ * compare alignment blocks da and db by name as described in class description. if names are equal then
+ * da < db iff da is read 1
+ *
+ * @param da first alignment
+ * @param db second alignment
+ * @return true iff da < db (alignments referenced by da and db, not pointers)
+ **/
+ static bool compareInt(libmaus2::bambam::BamAlignment const & A, libmaus2::bambam::BamAlignment const & B, char const * tagname)
+ {
+ return compareInt(A.D.begin(),A.blocksize,B.D.begin(),B.blocksize,tagname);
+ }
+
+ /**
+ * compare alignments at offsets a and b in the data block
+ *
+ * @param a first offset into data block
+ * @param b second offset into data block
+ * @return true iff alignment at a < alignment at b (alignments at offset a and b, not offsets and b)
+ **/
+ bool operator()(uint64_t const a, uint64_t const b) const
+ {
+ uint8_t const * da = data + a;
+ uint64_t const la = static_cast<int32_t>(getLEInteger(da,4));
+ uint8_t const * db = data + b;
+ uint64_t const lb = static_cast<int32_t>(getLEInteger(db,4));
+ return compare(da+sizeof(uint32_t),la,db+sizeof(uint32_t),lb,tagname);
+ }
+
+ /**
+ * compare alignments at offsets a and b in the data block
+ *
+ * @param a first offset into data block
+ * @param b second offset into data block
+ * @return -1 for a < b, 0 for a == b, 1 for a > b (alignments at offset a and b, not offsets and b)
+ **/
+ int compareInt(uint64_t const a, uint64_t const b) const
+ {
+ uint8_t const * da = data + a;
+ uint64_t const la = static_cast<int32_t>(getLEInteger(da,4));
+ uint8_t const * db = data + b;
+ uint64_t const lb = static_cast<int32_t>(getLEInteger(db,4));
+ return compareInt(da+sizeof(uint32_t),la,db+sizeof(uint32_t),lb,tagname);
+ }
+ };
+ }
+}
+#endif
=====================================
src/libmaus2/suffixsort/bwtb3m/BwtMergeSortTemplate.hpp
=====================================
@@ -358,7 +358,7 @@ namespace libmaus2
preisasamplingrate(std::min(options.maxpreisasamplingrate,blocksizeprevtwo)),
V_boundedlcpblockvalues(new libmaus2::util::AtomicArray<uint64_t>(numblocks,0)),
// tmp directory name
- tmpdirname(ensureDirectory(options.tmpfilenamebase + "_tmpdir")),
+ tmpdirname(ensureDirectory(std::filesystem::path(options.tmpfilenamebase + "_tmpdir")).string()),
// path object for tmp directory name
tmppath(tmpdirname),
base_tmp_path(ensureDirectory(tmppath / "base_tmp")),
@@ -412,7 +412,7 @@ namespace libmaus2
DSmerge->doRemove();
}
else
- libmaus2::aio::OutputStreamFactoryContainer::rmdir(merge_tmp_path);
+ libmaus2::aio::OutputStreamFactoryContainer::rmdir(merge_tmp_path.string());
DSbase->doRemove();
libmaus2::aio::FileRemoval::removeFile(ds_tmp_path_base_ds_tmp.string());
View it on GitLab: https://salsa.debian.org/med-team/libmaus2/-/commit/487001f7ae9966c91e7a67a5821f0484a3182af4
--
View it on GitLab: https://salsa.debian.org/med-team/libmaus2/-/commit/487001f7ae9966c91e7a67a5821f0484a3182af4
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/20221007/e4c07d08/attachment-0001.htm>
More information about the debian-med-commit
mailing list