Front end to IntervalTree based on reference ranges that allows to load annotations from a file. More...
#include <RangeAnnotationStore.hpp>
Public Types | |
typedef DataStore::QueryResultType | QueryResultType |
Public Member Functions | |
RangeAnnotationStore (const reference::CrrFile &crr) | |
const util::DelimitedFileMetadata & | getMetadata () const |
Returns metadata of the source delimited file. | |
void | intersect (const reference::Range &range, std::vector< QueryResultType > &result) const |
Fills the vector with iterators that point to the ranges intersecting a given range. | |
Protected Types | |
typedef RangeAnnotationStore < Derived, TValue > | Base |
Typedef for this class to simplify constructor invocation in descendants. | |
Protected Member Functions | |
void | load (const std::string &fn) |
Load data from the file with a given name. | |
void | bindRangeColumns (util::DelimitedFile &df, reference::Range &range, const std::string &chrColName="chromosome", const std::string &begColName="begin", const std::string &endColName="end") |
Utility function that the implementation of the derived class can call from bindColumns to add the parsers for the columns that correspond to range data. |
Front end to IntervalTree based on reference ranges that allows to load annotations from a file.
To build your own annotation store, derive from this class and provide an implementation for bindColumns method to associate column names to fields of the TValue structure. See class RepMaskStore in VarFileCombine.cpp for an example.
void cgatools::reference::RangeAnnotationStore< Derived, TValue >::bindRangeColumns | ( | util::DelimitedFile & | df, | |
reference::Range & | range, | |||
const std::string & | chrColName = "chromosome" , |
|||
const std::string & | begColName = "begin" , |
|||
const std::string & | endColName = "end" | |||
) | [inline, protected] |
Utility function that the implementation of the derived class can call from bindColumns to add the parsers for the columns that correspond to range data.
void cgatools::reference::RangeAnnotationStore< Derived, TValue >::intersect | ( | const reference::Range & | range, | |
std::vector< QueryResultType > & | result | |||
) | const [inline] |
Fills the vector with iterators that point to the ranges intersecting a given range.