SubcloneSeeker
1.0.0
Subclone deconvolution software framework
|
A collection class that each instance groups many SomaticEvents which share the same cell frequency. More...
#include <EventCluster.h>
Public Member Functions | |
EventCluster () | |
std::vector< SomaticEvent * > | members () const |
double | cellFraction () const |
void | setCellFraction (double fraction) |
void | addEvent (SomaticEvent *event, bool updateFraction=true) |
bool | operator< (const EventCluster &another) const |
bool | operator> (const EventCluster &another) const |
void | setSubcloneID (sqlite3_int64 cloneID) |
sqlite3_int64 | subcloneID () |
DBObjectID_vec | allObjectsOfSubclone (sqlite3 *database, sqlite3_int64 subcloneID) |
![]() | |
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) |
Static Public Member Functions | |
static std::vector < EventCluster * > | clustering (const std::vector< SomaticEvent * > &events, double threshold) |
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 | |
std::vector< SomaticEvent * > | _members |
double | _cellFraction |
sqlite3_int64 | ofSubcloneID |
![]() | |
sqlite3_int64 | id |
A collection class that each instance groups many SomaticEvents which share the same cell frequency.
Clustering is a process to group somatic events with (likely) the same into a single entity, based on the simplifying (but likely to be true) assumption that events with the same cell frequency are likely to co-exist in the same subclone
|
inline |
Minimal constructor that resets all member variables
void EventCluster::addEvent | ( | SomaticEvent * | event, |
bool | updateFraction = true |
||
) |
Add an SomaticEvent object into the member list and update cell fraction
event | The event to be added as a member |
updateFraction | Should the method automatically update the cell fraction of the cluster |
DBObjectID_vec EventCluster::allObjectsOfSubclone | ( | sqlite3 * | database, |
sqlite3_int64 | subcloneID | ||
) |
Retrieve a vector of cluster IDs whose parent subclone is the given id
database | A live database connection |
subcloneID | The subclone id who contains the clusters |
|
protectedvirtual |
Bind archivable properties to a prepared, unbound sqlite3 statement
statement | A prepared, unbound sqlite3 statement instance |
Implements SubcloneSeeker::Archivable.
|
inline |
Retrieve the cell fraction
|
static |
SomaticEvent Clustering Algorithm
events | A vector of SomaticEvent to be clustered |
threshold | The difference threshold to use when doing the clustering |
|
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.
|
protectedvirtual |
returns the name of the table in which all object of a specific class are stored
Implements SubcloneSeeker::Archivable.
|
inline |
Retrieve the member vector reference
|
inline |
Override the < operator for sorting purpose
another | the other EventCluster to compare to |
|
inline |
Override the > operator for sorting purpose
another | the other EventCluster to compare to |
|
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 |
Set a new cell fraction
fraction | the new cell fraction |
|
inline |
Set the subclone ID this cluster belongs to
cloneID | the database id of the subclone this cluster belongs to |
|
inline |
Retrieve the subclone ID
|
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.
|
protected |
the cell fraction all members share
|
protected |
the vector that holds all the cluster's members
|
protected |
to which subclone does this cluster belongs