]> git.donarmstrong.com Git - bamtools.git/blobdiff - BamReader.cpp
json output
[bamtools.git] / BamReader.cpp
index a2f975f9659032bed75b5cb280b12a97e97b94df..7213b237d753f18399e5f1379800492e0f943b7d 100644 (file)
@@ -48,7 +48,7 @@ struct BamReader::BamReaderPrivate {
     int64_t   AlignmentsBeginOffset;\r
     string    Filename;\r
     string    IndexFilename;\r
-    
+    \r
     // system data\r
     bool IsBigEndian;\r
 \r
@@ -71,7 +71,7 @@ struct BamReader::BamReaderPrivate {
     // "public" interface\r
     // -------------------------------\r
 \r
-    // flie operations\r
+    // file operations\r
     void Close(void);\r
     bool Jump(int refID, int position = 0);\r
     void Open(const string& filename, const string& indexFilename = "");\r
@@ -154,6 +154,7 @@ const string BamReader::GetHeaderText(void) const { return d->HeaderText; }
 int BamReader::GetReferenceCount(void) const { return d->References.size(); }\r
 const RefVector BamReader::GetReferenceData(void) const { return d->References; }\r
 int BamReader::GetReferenceID(const string& refName) const { return d->GetReferenceID(refName); }\r
+const std::string BamReader::GetFilename(void) const { return d->Filename; }\r
 \r
 // index operations\r
 bool BamReader::CreateIndex(void) { return d->CreateIndex(); }\r
@@ -614,7 +615,7 @@ void BamReader::BamReaderPrivate::InsertLinearOffset(LinearOffsetVector& offsets
                                                      const uint64_t&     lastOffset)\r
 {\r
     // get converted offsets\r
-    int beginOffset = bAlignment.Position >> BAM_LIDX_SHIFT;
+    int beginOffset = bAlignment.Position >> BAM_LIDX_SHIFT;\r
     int endOffset   = (bAlignment.GetEndPosition() - 1) >> BAM_LIDX_SHIFT;\r
 \r
     // resize vector if necessary\r
@@ -639,7 +640,7 @@ bool BamReader::BamReaderPrivate::IsOverlap(BamAlignment& bAlignment) {
     // read starts after left boundary\r
     if ( bAlignment.Position >= CurrentLeft) { return true; }\r
 \r
-    // return whether alignment end overlaps left boundary
+    // return whether alignment end overlaps left boundary\r
     return ( bAlignment.GetEndPosition() >= CurrentLeft );\r
 }\r
 \r