OpenFlexTyper
Public Member Functions | List of all members
ft::KmerClass Class Reference

A class that contains information for a single Kmer.

#include <kmerClass.h>

Public Member Functions

 KmerClass (std::string kmer)
 
virtual ~KmerClass ()
 Class Destructor.
 
Getters

Constant functions to return properties of the Kmer

const std::string & getKmer () const
 
const std::bitset< 8 > & getKFlags () const
 
const std::set< long long > & getKPositions () const
 
const std::set< ft::ReadID > & getReadIDs () const
 
uint getOCC () const
 
Setters

Non-constant functions to update properties of the kmer class

void setKFlags (std::set< ft::FlagType > kFlags)
 
void setKPositions (const std::set< long long > &kPositions)
 
void adjustPosForOffset (uint offset=0)
 
void setReadIDs (std::set< ft::ReadID > readIDs)
 
void setOCC (uint occ)
 
Adders

Non-constant functions to add properties to the kmer class

void addKFlag (const ft::FlagType &kFlag)
 
void addKPosition (const size_t &kPosition, const uint &offset=0)
 
void addReadID (const ft::ReadID &readID)
 
Removers

Non-constant functions to remove properties from the kmer class

void removeKFlag (ft::FlagType kFlag)
 
void removeKPosition (size_t kPosition, uint offset=0)
 
void removeReadID (ft::ReadID readID)
 
Checkers

Constant functions to check the properties of the kmer class

bool isKmerEqual (const KmerClass &test) const
 
bool hasKmer (const std::string &test) const
 
bool hasFlag (const ft::FlagType &flag)
 
bool hasKPosition (const size_t &position) const
 
bool hasReadID (const ft::ReadID &readID) const
 
Manipulation

Functions to convert between index positions, and read IDs

void convertPosToReadID (uint readLength, uint numOfReads, bool pairedReads, bool indexRevComp=false)
 
bool matchingReadID (const ft::ReadID &a, const ft::ReadID &b) const
 
void adjustPositionsWithOffset (uint offset)
 
Overloaded Operators
bool operator< (const ft::KmerClass &k) const
 
bool operator== (const ft::KmerClass &k) const
 

Private Attributes

Properties
std::string _kmer
 
std::bitset< 8 > _kFlags
 
std::set< long long > _positions
 
std::set< ft::ReadID > _readIDs
 
uint _occ
 
bool _isOffsetAdjusted
 

Constructor & Destructor Documentation

◆ KmerClass()

ft::KmerClass::KmerClass ( std::string  kmer)

Constructor

Parameters
stringKmer

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