diff options
author | Andreas Tille <tille@debian.org> | 2021-11-06 19:31:45 +0100 |
---|---|---|
committer | Étienne Mollier <emollier@debian.org> | 2021-11-06 19:31:45 +0100 |
commit | 3163d9c563067feb60afe9cda7bd8c5e75f6b4aa (patch) | |
tree | 03fd907a4d2e6a3eac58fb817bfc73e3581d0363 | |
parent | 1eb2dc964428537e09fee60c2f860e765ffdaf4a (diff) |
Add IsSupplementaryAlignment() patch from bamtools code copy
Last-Update: Wed, 27 May 2020 09:59:29 +0200
shipped with tiddit
Gbp-Pq: Name tiddit.patch
-rw-r--r-- | src/api/BamAlignment.cpp | 7 | ||||
-rw-r--r-- | src/api/BamAlignment.h | 1 | ||||
-rw-r--r-- | src/api/BamConstants.h | 1 |
3 files changed, 9 insertions, 0 deletions
diff --git a/src/api/BamAlignment.cpp b/src/api/BamAlignment.cpp index 8173dcf..142c8e9 100644 --- a/src/api/BamAlignment.cpp +++ b/src/api/BamAlignment.cpp @@ -822,6 +822,13 @@ bool BamAlignment::IsSecondMate() const return ((AlignmentFlag & Constants::BAM_ALIGNMENT_READ_2) != 0); } +/*! \fn bool BamAlignment::IsSupplementaryAlignment() const + \return \c true if ailgnment is supplementary (This is an additional patch by tiddit package) + */ +bool BamAlignment::IsSupplementaryAlignment(void) const { + return ( (AlignmentFlag & Constants::SUPPLEMENTARY) != 0 ); +} + /*! \fn bool BamAlignment::IsValidSize(const std::string& tag, const std::string& type) const \internal diff --git a/src/api/BamAlignment.h b/src/api/BamAlignment.h index 845e83a..a887a49 100644 --- a/src/api/BamAlignment.h +++ b/src/api/BamAlignment.h @@ -53,6 +53,7 @@ public: const; // returns true if alignment is part of read that satisfied paired-end resolution bool IsReverseStrand() const; // returns true if alignment mapped to reverse strand bool IsSecondMate() const; // returns true if alignment is second mate on read + bool IsSupplementaryAlignment(void) const; // Additional patch by tiddit package // manipulate alignment flags public: diff --git a/src/api/BamConstants.h b/src/api/BamConstants.h index 973c13b..f0f9c64 100644 --- a/src/api/BamConstants.h +++ b/src/api/BamConstants.h @@ -43,6 +43,7 @@ const int BAM_ALIGNMENT_READ_2 = 0x0080; const int BAM_ALIGNMENT_SECONDARY = 0x0100; const int BAM_ALIGNMENT_QC_FAILED = 0x0200; const int BAM_ALIGNMENT_DUPLICATE = 0x0400; +const int SUPPLEMENTARY = 0x0800; // Additional patch by tiddit package // CIGAR constants const char* const BAM_CIGAR_LOOKUP = "MIDNSHP=X"; |