BAM file safe reader.
More...
#include <isoseqAlgn.hpp>
BAM file safe reader.
Temporarily sets read-only on the BAM file while reading from it. This is because I observed that calls to some (unclear which) HTSL BAM file read function very rarely deletes the file instead of reading it. Restores permissions after closing.
◆ BAMsafeReader() [1/3]
| isaSpace::BAMsafeReader::BAMsafeReader |
( |
const std::string & | bamFileName | ) |
|
Constructor with file name.
- Parameters
-
| [in] | bamFileName | BAM file name |
◆ BAMsafeReader() [2/3]
| isaSpace::BAMsafeReader::BAMsafeReader |
( |
const BAMsafeReader & | toCopy | ) |
|
|
delete |
Copy constructor.
- Parameters
-
◆ BAMsafeReader() [3/3]
| isaSpace::BAMsafeReader::BAMsafeReader |
( |
BAMsafeReader && | toMove | ) |
|
|
inlinenoexcept |
Move constructor.
- Parameters
-
◆ getHeaderCopy()
| std::unique_ptr< sam_hdr_t, BAMheaderDeleter > isaSpace::BAMsafeReader::getHeaderCopy |
( |
| ) |
const |
|
nodiscard |
Get BAM header.
Returns a pointer to a copy of the stored BAM header.
- Returns
- pointer to a copy of the header
◆ getNextRecord()
| std::pair< std::unique_ptr< bam1_t, BAMrecordDeleter >, int32_t > isaSpace::BAMsafeReader::getNextRecord |
( |
| ) |
|
|
nodiscard |
Get the next BAM record.
Returns a pointer to the next BAM record in the file and number of bytes read. The byte count can also be used to test for read success.
- Returns
- BAM header pointer and byte count
◆ operator=() [1/2]
◆ operator=() [2/2]
The documentation for this class was generated from the following file: