isoSeqQC
Quality assessment and re-mapping of poorly mapped isoSeq read segments
Loading...
Searching...
No Matches
isaSpace::BAMfile Class Reference

Records from a BAM file. More...

#include <isoseqAlgn.hpp>

Public Member Functions

 BAMfile ()=default
 Default constructor.
 BAMfile (const std::string &BAMfileName)
 Constructor with BAM file name.
 BAMfile (const BAMfile &toCopy)=delete
 Copy constructor.
BAMfileoperator= (const BAMfile &toCopy)=delete
 Copy assignment operator.
 BAMfile (BAMfile &&toMove) noexcept=default
 Move constructor.
BAMfileoperator= (BAMfile &&toMove) noexcept=default
 Move assignment operator.
 ~BAMfile ()=default
 Destructor.
size_t getPrimaryAlignmentCount () const noexcept
 Get the number of primary alignments.
void addRemaps (const std::string &remapBAMfileName, const float &remapIdentityCutoff)
 Add re-mapped read regions.
std::vector< std::string > saveRemappedBAM (const std::string &outputBAMfileName) const
 Save the reads with re-alignments to a BAM file.
std::vector< std::string > saveSortedRemappedBAM (const std::string &outputBAMfileName) const
 Sort and save the reads with re-alignments to a BAM file.

Detailed Description

Records from a BAM file.

Primary records from a BAM file, including the header. Used to add realignments as secondary records.

Constructor & Destructor Documentation

◆ BAMfile() [1/3]

isaSpace::BAMfile::BAMfile ( const std::string & BAMfileName)

Constructor with BAM file name.

Parameters
[in]BAMfileNamename of the input BAM file

◆ BAMfile() [2/3]

isaSpace::BAMfile::BAMfile ( const BAMfile & toCopy)
delete

Copy constructor.

Parameters
[in]toCopyobject to copy

◆ BAMfile() [3/3]

isaSpace::BAMfile::BAMfile ( BAMfile && toMove)
defaultnoexcept

Move constructor.

Parameters
[in]toMoveobject to move

Member Function Documentation

◆ addRemaps()

void isaSpace::BAMfile::addRemaps ( const std::string & remapBAMfileName,
const float & remapIdentityCutoff )

Add re-mapped read regions.

Add re-mapped read regions as secondary alignments, fixing CIGAR strings for the primaries.

Parameters
[in]remapBAMfileNamename of the BAM file with re-mapped read portions
[in]remapIdentityCutofffraction of sites in the remapped read that are identical to the reference

◆ getPrimaryAlignmentCount()

size_t isaSpace::BAMfile::getPrimaryAlignmentCount ( ) const
nodiscardnoexcept

Get the number of primary alignments.

Returns
number of primary alignments

◆ operator=() [1/2]

BAMfile & isaSpace::BAMfile::operator= ( BAMfile && toMove)
defaultnoexcept

Move assignment operator.

Parameters
[in]toMoveobject to move
Returns
BAMfile object

◆ operator=() [2/2]

BAMfile & isaSpace::BAMfile::operator= ( const BAMfile & toCopy)
delete

Copy assignment operator.

Parameters
[in]toCopyobject to copy
Returns
BAMfile object

◆ saveRemappedBAM()

std::vector< std::string > isaSpace::BAMfile::saveRemappedBAM ( const std::string & outputBAMfileName) const
nodiscard

Save the reads with re-alignments to a BAM file.

Parameters
[in]outputBAMfileNameoutput BAM file name
Returns
names of reads that failed to be written

◆ saveSortedRemappedBAM()

std::vector< std::string > isaSpace::BAMfile::saveSortedRemappedBAM ( const std::string & outputBAMfileName) const
nodiscard

Sort and save the reads with re-alignments to a BAM file.

References saved in the order of the original BAM file. Reads sorted by start position (which is the gene end if mapped to the negative strand).

Parameters
[in]outputBAMfileNameoutput BAM file name
Returns
names of reads that failed to be written

The documentation for this class was generated from the following file: