|
BamIndex * | getBamIndex () |
|
| SamFile () |
| Default Constructor, initializes the variables, but does not open any files.
|
|
| SamFile (ErrorHandler::HandlingType errorHandlingType) |
| Constructor that sets the error handling type.
|
|
| SamFile (const char *filename, OpenType mode) |
| Constructor that opens the specified file based on the specified mode (READ/WRITE), aborts if the file could not be opened.
|
|
| SamFile (const char *filename, OpenType mode, ErrorHandler::HandlingType errorHandlingType) |
| Constructor that opens the specified file based on the specified mode (READ/WRITE) and handles errors per the specified handleType.
|
|
| SamFile (const char *filename, OpenType mode, SamFileHeader *header) |
| Constructor that opens the specified file based on the specified mode (READ/WRITE) and reads the header, aborts if the file could not be opened or the header not read.
|
|
| SamFile (const char *filename, OpenType mode, ErrorHandler::HandlingType errorHandlingType, SamFileHeader *header) |
| Constructor that opens the specified file based on the specified mode (READ/WRITE) and reads the header, handling errors per the specified handleType.
|
|
virtual | ~SamFile () |
| Destructor.
|
|
bool | OpenForRead (const char *filename, SamFileHeader *header=NULL) |
| Open a sam/bam file for reading with the specified filename, determing the type of file and SAM/BAM by reading the file (if not stdin).
|
|
bool | OpenForWrite (const char *filename, SamFileHeader *header=NULL) |
| Open a sam/bam file for writing with the specified filename, determining SAM/BAM from the extension (.bam = BAM).
|
|
bool | ReadBamIndex (const char *filename) |
| Read the specified bam index file.
|
|
bool | ReadBamIndex () |
| Read the bam index file using the BAM filename as a base.
|
|
void | SetReference (GenomeSequence *reference) |
| Sets the reference to the specified genome sequence object.
|
|
void | SetReadSequenceTranslation (SamRecord::SequenceTranslation translation) |
| Set the type of sequence translation to use when reading the sequence.
|
|
void | SetWriteSequenceTranslation (SamRecord::SequenceTranslation translation) |
| Set the type of sequence translation to use when writing the sequence.
|
|
void | Close () |
| Close the file if there is one open.
|
|
bool | IsOpen () |
| Returns whether or not the file has been opened successfully.
|
|
bool | IsEOF () |
| Returns whether or not the end of the file has been reached.
|
|
bool | IsStream () |
| Returns whether or not the file has been opened for streaming input/output.
|
|
bool | ReadHeader (SamFileHeader &header) |
| Reads the header section from the file and stores it in the passed in header.
|
|
bool | WriteHeader (SamFileHeader &header) |
| Writes the specified header into the file.
|
|
bool | ReadRecord (SamFileHeader &header, SamRecord &record) |
| Reads the next record from the file & stores it in the passed in record.
|
|
bool | WriteRecord (SamFileHeader &header, SamRecord &record) |
| Writes the specified record into the file.
|
|
void | setSortedValidation (SortedType sortType) |
| Set the flag to validate that the file is sorted as it is read/written.
|
|
uint32_t | GetCurrentRecordCount () |
| Return the number of records that have been read/written so far.
|
|
SamStatus::Status | GetFailure () |
| Deprecated, get the Status of the last call that sets status.
|
|
SamStatus::Status | GetStatus () |
| Get the Status of the last call that sets status.
|
|
const char * | GetStatusMessage () |
| Get the Status Message of the last call that sets status.
|
|
bool | SetReadSection (int32_t refID) |
| Sets which reference id (index into the BAM list of reference information) of the BAM file should be read.
|
|
bool | SetReadSection (const char *refName) |
| Sets which reference name of the BAM file should be read.
|
|
bool | SetReadSection (int32_t refID, int32_t start, int32_t end, bool overlap=true) |
| Sets which reference id (index into the BAM list of reference information) & start/end positions of the BAM file should be read.
|
|
bool | SetReadSection (const char *refName, int32_t start, int32_t end, bool overlap=true) |
| Sets which reference name & start/end positions of the BAM file should be read.
|
|
void | SetReadFlags (uint16_t requiredFlags, uint16_t excludedFlags) |
| Specify which reads should be returned by ReadRecord.
|
|
int32_t | getNumMappedReadsFromIndex (int32_t refID) |
| Get the number of mapped reads in the specified reference id.
|
|
int32_t | getNumUnMappedReadsFromIndex (int32_t refID) |
| Get the number of unmapped reads in the specified reference id.
|
|
int32_t | getNumMappedReadsFromIndex (const char *refName, SamFileHeader &header) |
| Get the number of mapped reads in the specified reference name.
|
|
int32_t | getNumUnMappedReadsFromIndex (const char *refName, SamFileHeader &header) |
| Get the number of unmapped reads in the specified reference name.
|
|
uint32_t | GetNumOverlaps (SamRecord &samRecord) |
| Returns the number of bases in the passed in read that overlap the region that is currently set.
|
|
void | GenerateStatistics (bool genStats) |
| Whether or not statistics should be generated for this file.
|
|
const BamIndex * | GetBamIndex () |
| Return the bam index if one has been opened.
|
|
int64_t | GetCurrentPosition () |
| Get the current file position.
|
|
void | DisableBuffering () |
| Turn off file read buffering.
|
|
void | PrintStatistics () |
| Print the statistics that have been recorded due to a call to GenerateStatistics.
|
|
bool | attemptRecoverySync (bool(*checkSignature)(void *data), int length) |
|
void | setAttemptRecovery (bool flag=false) |
|
Definition at line 19 of file BamIndexTest.h.