SubcloneSeeker
1.0.0
Subclone deconvolution software framework
|
The class that represents a subclone in a subclonal structure tree. More...
#include <Subclone.h>
Public Member Functions | |
Subclone () | |
void | setParentId (sqlite3_int64 pid) |
double | fraction () const |
void | setFraction (double fraction) |
double | treeFraction () const |
void | setTreeFraction (double fraction) |
std::vector< EventCluster * > & | vecEventCluster () |
void | addEventCluster (EventCluster *cluster) |
![]() | |
TreeNode () | |
virtual | ~TreeNode () |
TreeNodeVec_t & | getVecChildren () |
TreeNode * | getParent () |
void | addChild (TreeNode *child) |
void | removeChild (TreeNode *child) |
bool | isLeaf () const |
bool | isRoot () const |
![]() | |
Archivable () | |
sqlite3_int64 | getId () |
void | setId (sqlite3_int64 nid) |
bool | createTableInDB (sqlite3 *database) |
sqlite3_int64 | archiveObjectToDB (sqlite3 *database) |
bool | unarchiveObjectFromDB (sqlite3 *database, sqlite3_int64 id) |
DBObjectID_vec | vecAllObjectsID (sqlite3 *database) |
Protected Member Functions | |
virtual std::string | getTableName () |
virtual std::string | createTableStatementStr () |
virtual std::string | createObjectStatementStr () |
virtual std::string | updateObjectStatementStr () |
virtual std::string | selectObjectColumnListStr () |
virtual int | bindObjectToStatement (sqlite3_stmt *statement) |
virtual void | updateObjectFromStatement (sqlite3_stmt *statement) |
Protected Attributes | |
double | _fraction |
double | _treeFraction |
std::vector< EventCluster * > | _eventClusters |
sqlite3_int64 | parentId |
![]() | |
TreeNodeVec_t | children |
TreeNode * | parent |
![]() | |
sqlite3_int64 | id |
Additional Inherited Members | |
![]() | |
static void | PreOrderTraverse (TreeNode *root, TreeTraverseDelegate &traverseDelegate) |
static void | PostOrderTraverse (TreeNode *root, TreeTraverseDelegate &traverseDelegate) |
The class that represents a subclone in a subclonal structure tree.
This class implements both the TreeNode and Archivable interfaces, so that it can be a node in a tree structure, and at the same time be archived into a sqlite3 database. This is the fundamental building block of subclonal deconvoution solutions.
|
inline |
Minimal constructor to reset all member variables
void Subclone::addEventCluster | ( | EventCluster * | cluster | ) |
Add a given EventCluster into the subclone
cluster | The EventCluster to be added to the subclone |
|
protectedvirtual |
Bind archivable properties to a prepared, unbound sqlite3 statement
statement | A prepared, unbound sqlite3 statement instance |
Implements SubcloneSeeker::Archivable.
|
protectedvirtual |
return the unbound statement for record creation
Implements SubcloneSeeker::Archivable.
|
protectedvirtual |
return the table definition when creating the table in a sqlite3 database
Imagine a generic SQL create statement: CREATE TABLE <tableName> (id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT <other-columns>); Notice that the returned string must be prefixed with a comma ",", to separate any custom columns from the id column
Implements SubcloneSeeker::Archivable.
|
inline |
return the fraction
|
protectedvirtual |
returns the name of the table in which all object of a specific class are stored
Implements SubcloneSeeker::Archivable.
|
protectedvirtual |
return the list of columns to be used in select statement for getting data from the database
Imagine the generic SQL select statement: SELECT <col1>, <col2>, ... FROM <tableName> WHERE id=?; The method should return the <col1>,<col2>,... part
Implements SubcloneSeeker::Archivable.
|
inline |
update the fraction
fraction | The new fraction value |
|
inline |
set parent id
pid | The new parent id |
|
inline |
update the tree fraction
fraction | The new tree fraction value |
|
inline |
return the tree fraction
|
protectedvirtual |
Populate archivable properties from a prepared statement during unarchiving
statement | A prepared statement contains the retrieved row |
Implements SubcloneSeeker::Archivable.
|
protectedvirtual |
return the unbound statement for record update
Implements SubcloneSeeker::Archivable.
|
inline |
retreve a vector of all EventClusters this subclone has
|
protected |
the event clusters this subclone contains
|
protected |
The percentage of this subclone
|
protected |
The total fraction taken by the subtree rooted by this object
|
protected |
The database id of the parent node, 0 represents a root