Skip to content

Commit

Permalink
Upate BamReader files to add seek and tell functions
Browse files Browse the repository at this point in the history
  • Loading branch information
morispi committed Feb 22, 2021
1 parent 2391b1a commit 78305ef
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/api/BamReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,14 @@ bool BamReader::Close()
return d->Close();
}

bool BamReader::FSeek(const int64_t& position) {
return d->Seek(position);
}

int64_t BamReader::FTell() const {
return d->Tell();
}

/*! \fn bool BamReader::CreateIndex(const BamIndex::IndexType& type)
\brief Creates an index file for current BAM file.
Expand Down
4 changes: 4 additions & 0 deletions src/api/BamReader.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include "api/BamIndex.h"
#include "api/SamHeader.h"
#include "api/api_global.h"
//#include "api/internal/bam/BamReader_p.h"

namespace BamTools {

Expand All @@ -36,6 +37,9 @@ class API_EXPORT BamReader
// BAM file operations
// ----------------------

bool FSeek(const int64_t& position);
int64_t FTell() const;

// closes the current BAM file
bool Close();
// returns filename of current BAM file
Expand Down

0 comments on commit 78305ef

Please sign in to comment.