1 /*=========================================================================== 2 * 3 * PUBLIC DOMAIN NOTICE 4 * National Center for Biotechnology Information 5 * 6 * This software/database is a "United States Government Work" under the 7 * terms of the United States Copyright Act. It was written as part of 8 * the author's official duties as a United States Government employee and 9 * thus cannot be copyrighted. This software/database is freely available 10 * to the public for use. The National Library of Medicine and the U.S. 11 * Government have not placed any restriction on its use or reproduction. 12 * 13 * Although all reasonable efforts have been taken to ensure the accuracy 14 * and reliability of the software and data, the NLM and the U.S. 15 * Government do not and cannot warrant the performance or results that 16 * may be obtained by using this software or data. The NLM and the U.S. 17 * Government disclaim all warranties, express or implied, including 18 * warranties of performance, merchantability or fitness for any particular 19 * purpose. 20 * 21 * Please cite the author in any work or product based on this material. 22 * 23 * =========================================================================== 24 * 25 */ 26 27 #ifndef _inl_ngs_alignment_ 28 #define _inl_ngs_alignment_ 29 30 #ifndef _hpp_ngs_alignment_ 31 #include <ngs/Alignment.hpp> 32 #endif 33 34 #ifndef _hpp_ngs_itf_alignmentitf_ 35 #include <ngs/itf/AlignmentItf.hpp> 36 #endif 37 38 namespace ngs 39 { 40 41 // the "self" member is typed as FragmentRef 42 // but is used here as an AlignmentRef 43 #define self reinterpret_cast < const AlignmentItf * > ( self ) 44 45 /*---------------------------------------------------------------------- 46 * Alignment 47 * inline dispatch 48 */ 49 50 inline getAlignmentId() const51 StringRef Alignment :: getAlignmentId () const 52 NGS_THROWS ( ErrorMsg ) 53 { return StringRef ( self -> getAlignmentId () ); } 54 55 inline getReferenceSpec() const56 String Alignment :: getReferenceSpec () const 57 NGS_THROWS ( ErrorMsg ) 58 { return StringRef ( self -> getReferenceSpec () ) . toString (); } 59 60 inline getMappingQuality() const61 int Alignment :: getMappingQuality () const 62 NGS_THROWS ( ErrorMsg ) 63 { return self -> getMappingQuality (); } 64 65 inline getReferenceBases() const66 StringRef Alignment :: getReferenceBases () const 67 NGS_THROWS ( ErrorMsg ) 68 { return StringRef ( self -> getReferenceBases () ); } 69 70 inline getReadGroup() const71 String Alignment :: getReadGroup () const 72 NGS_THROWS ( ErrorMsg ) 73 { return StringRef ( self -> getReadGroup () ) . toString (); } 74 75 inline getReadId() const76 StringRef Alignment :: getReadId () const 77 NGS_THROWS ( ErrorMsg ) 78 { return StringRef ( self -> getReadId () ); } 79 80 inline getClippedFragmentBases() const81 StringRef Alignment :: getClippedFragmentBases () const 82 NGS_THROWS ( ErrorMsg ) 83 { return StringRef ( self -> getClippedFragmentBases () ); } 84 85 inline getClippedFragmentQualities() const86 StringRef Alignment :: getClippedFragmentQualities () const 87 NGS_THROWS ( ErrorMsg ) 88 { return StringRef ( self -> getClippedFragmentQualities () ); } 89 90 inline getAlignedFragmentBases() const91 StringRef Alignment :: getAlignedFragmentBases () const 92 NGS_THROWS ( ErrorMsg ) 93 { return StringRef ( self -> getAlignedFragmentBases () ); } 94 95 inline getAlignmentCategory() const96 Alignment :: AlignmentCategory Alignment :: getAlignmentCategory () const 97 NGS_THROWS ( ErrorMsg ) 98 { return ( Alignment :: AlignmentCategory ) self -> getAlignmentCategory (); } 99 100 inline getAlignmentPosition() const101 int64_t Alignment :: getAlignmentPosition () const 102 NGS_THROWS ( ErrorMsg ) 103 { return self -> getAlignmentPosition (); } 104 105 inline getReferencePositionProjectionRange(int64_t ref_pos) const106 uint64_t Alignment :: getReferencePositionProjectionRange (int64_t ref_pos) const 107 NGS_THROWS ( ErrorMsg ) 108 { return self -> getReferencePositionProjectionRange (ref_pos); } 109 110 inline getAlignmentLength() const111 uint64_t Alignment :: getAlignmentLength () const 112 NGS_THROWS ( ErrorMsg ) 113 { return self -> getAlignmentLength (); } 114 115 inline getIsReversedOrientation() const116 bool Alignment :: getIsReversedOrientation () const 117 NGS_THROWS ( ErrorMsg ) 118 { return self -> getIsReversedOrientation (); } 119 120 inline getSoftClip(ClipEdge edge) const121 int Alignment :: getSoftClip ( ClipEdge edge ) const 122 NGS_THROWS ( ErrorMsg ) 123 { return self -> getSoftClip ( edge ); } 124 125 inline getTemplateLength() const126 uint64_t Alignment :: getTemplateLength () const 127 NGS_THROWS ( ErrorMsg ) 128 { return self -> getTemplateLength (); } 129 130 inline getShortCigar(bool clipped) const131 StringRef Alignment :: getShortCigar ( bool clipped ) const 132 NGS_THROWS ( ErrorMsg ) 133 { return StringRef ( self -> getShortCigar ( clipped ) ); } 134 135 inline getLongCigar(bool clipped) const136 StringRef Alignment :: getLongCigar ( bool clipped ) const 137 NGS_THROWS ( ErrorMsg ) 138 { return StringRef ( self -> getLongCigar ( clipped ) ); } 139 140 inline getRNAOrientation() const141 char Alignment :: getRNAOrientation () const 142 NGS_THROWS ( ErrorMsg ) 143 { return self -> getRNAOrientation (); } 144 145 inline hasMate() const146 bool Alignment :: hasMate () const 147 NGS_NOTHROW () 148 { return self -> hasMate (); } 149 150 inline getMateAlignmentId() const151 StringRef Alignment :: getMateAlignmentId () const 152 NGS_THROWS ( ErrorMsg ) 153 { return StringRef ( self -> getMateAlignmentId () ); } 154 155 inline getMateAlignment() const156 Alignment Alignment :: getMateAlignment () const 157 NGS_THROWS ( ErrorMsg ) 158 { return Alignment ( ( AlignmentRef ) self -> getMateAlignment () ); } 159 160 inline getMateReferenceSpec() const161 String Alignment :: getMateReferenceSpec () const 162 NGS_THROWS ( ErrorMsg ) 163 { return StringRef ( self -> getMateReferenceSpec () ) . toString (); } 164 165 inline getMateIsReversedOrientation() const166 bool Alignment :: getMateIsReversedOrientation () const 167 NGS_THROWS ( ErrorMsg ) 168 { return self -> getMateIsReversedOrientation (); } 169 170 #undef self 171 172 } // namespace ngs 173 174 #endif // _inl_ngs_alignment_ 175