X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=src%2Fapi%2FBamAlignment.h;h=a2349ea9ce9b254066450dc953b99925a8f03b56;hb=c3a7c31347d42a926214e2508d713975d124e8c6;hp=daea418228a7bf4759a946b8aa4d78d64278073f;hpb=25a2a1f6598b6452455da96c28a7f58fd9e7ed2d;p=bamtools.git diff --git a/src/api/BamAlignment.h b/src/api/BamAlignment.h index daea418..a2349ea 100644 --- a/src/api/BamAlignment.h +++ b/src/api/BamAlignment.h @@ -2,7 +2,7 @@ // BamAlignment.h (c) 2009 Derek Barnett // Marth Lab, Department of Biology, Boston College // --------------------------------------------------------------------------- -// Last modified: 10 October 2011 (DB) +// Last modified: 16 October 2011 (DB) // --------------------------------------------------------------------------- // Provides the BamAlignment data structure // *************************************************************************** @@ -10,9 +10,9 @@ #ifndef BAMALIGNMENT_H #define BAMALIGNMENT_H -#include -#include -#include +#include "api/api_global.h" +#include "api/BamAux.h" +#include "api/BamConstants.h" #include #include #include @@ -100,6 +100,12 @@ struct API_EXPORT BamAlignment { // returns a description of the last error that occurred std::string GetErrorString(void) const; + // retrieves the size, read locations and reference locations of soft-clip operations + bool GetSoftClips(std::vector& clipSizes, + std::vector& readPositions, + std::vector& genomePositions, + bool usePadded = false) const; + // public data fields public: std::string Name; // read name @@ -421,7 +427,7 @@ inline bool BamAlignment::GetTag(const std::string& tag, T& destination) const { unsigned int numBytesParsed = 0; // return failure if tag not found - if ( FindTag(tag, pTagData, tagDataLength, numBytesParsed) ) { + if ( !FindTag(tag, pTagData, tagDataLength, numBytesParsed) ) { // TODO: set error string? return false; } @@ -502,7 +508,7 @@ inline bool BamAlignment::GetTag(const std::string& tag, unsigned int numBytesParsed = 0; // return failure if tag not found - if ( FindTag(tag, pTagData, tagDataLength, numBytesParsed) ) { + if ( !FindTag(tag, pTagData, tagDataLength, numBytesParsed) ) { // TODO: set error string? return false; }