Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Class Members | File Members

Pedigree Class Reference

#include <Pedigree.h>

List of all members.

Public Member Functions

 Pedigree ()
 Pedigree (const std::string id, const unsigned tableId)
 ~Pedigree ()
void set (const std::string id, const unsigned tableId)
std::string getId () const
unsigned getTableId () const
void addIndividual (const std::string ind, std::string mother, std::string father, std::string gender, int rowIndex, int tableIndex, const DataTable &pedigreeTable)
void setCoreOptionalFields (const DataTable *pedigreeTable)
void determineFoundingGroups ()
void establishIndividualConnections ()
void checkForAncestorDescendantAnomoly (Individual *ancestor)
void clearVisitCounts ()
void checkParentChildDOB ()
void computePedigreeWidth (const std::string &sortField, bool dobSortOrder)
void draw (const LabelSet *labelSet)
void display () const

Static Public Member Functions

static void setDrawingFileExtension (const std::string &ext)

Private Member Functions

void _setIndividualTwinField (const DataColumn *twinDataColumn, char type)
void _assignChildrenDescentTree (Individual *individual, unsigned descentTreeId)
void _assignDescentTrees ()
void _addDescentTree (unsigned id)
void _addDescentTreesConnectedTo (unsigned dtIndex, std::deque< DescentTree * > &orderedDescentTrees, bool left)
void _sortAndCalculateDescentTreeWidth ()
void _checkParentsGender (Individual *individual)
void _checkMarkedTwinsDOB ()
void _calculateWidth (Individual *individual, bool classicalOrder, unsigned descentTreeIndex)
void _populateIndividualGrid ()
void _sortNuclearFamilies (bool consanguinousFlag)
void _sortIndividualNuclearFamilies ()
void _sortNuclearFamiliesBasedOnDataField (const std::string &name, bool dobSortOrder)
void _addNuclearFamily (Individual *mother, Individual *father)
void _establishNuclearFamilies ()
void _determineConnectorIndividuals ()
void _reorderDescentTreesBasedOnExternalConnections ()
void determineConnectorIndividualsOld ()
void _setLeftShiftConnectionFlags ()
void _markConnectorIndividuals (Individual *individual, unsigned &loopNumber)
void _markLeftLoopFlags (Individual *individual, unsigned loopNumber)
void _markRightLoopFlags (Individual *individual, unsigned loopNumber)
void _markLeftExternalConnectionFlags (Individual *individual, unsigned connectionNumber)
void _markRightExternalConnectionFlags (Individual *individual, unsigned connectionNumber)
void _markExternalConnectionFlags ()
void _markConsanguinousIndividuals ()
void _markConsanguinousFlags (Individual *individual, unsigned &loopNumber)
void _drawConsanguinousConnectors (DrawingCanvas &dc)
void _drawConsanguinityLetter (Individual *mother, Individual *father, unsigned int &uniqueId, double iconInterval, double iconDiameter, std::map< std::string, std::string > &individualConsanguinityLetter, DrawingCanvas &dc, double multipleSpouseOffset=0, bool leftConnector=false)
void _drawHorizontalConnectorLine (double y, double x1, double x2, bool isConsanguinous, DrawingCanvas &dc)
void _drawVerticalConnectorLine (double startY, double endY, double startX, double endX, bool isConsanguinous, DrawingCanvas &dc, double multipleSpouseOffset=0.0, bool singleChild=false)
void _getSpouses (std::set< Individual *, compareIndividual > &foundingGroup, Individual *individual)
bool _hasIndividualAtPosition (Individual *start, Individual *end)
void _sortSibsBasedOnExternalConnections (const std::vector< Individual * > &sibs, std::vector< Individual * > &sortedSibs)
void _sortSibsBasedOnConsanguinousConnections (const std::vector< Individual * > &sibs, std::vector< Individual * > &sortedSibs)
unsigned _getPrimaryDescentTreeIndex (std::set< unsigned > &dt, Individual *individual, bool increment)

Private Attributes

std::string _id
unsigned _tableId
bool _dtsHaveConsanguinity
std::set< Individual *, compareIndividual_individuals
std::set< NuclearFamily *,
compareNuclearFamily
_nuclearFamilies
std::vector< NuclearFamily * > _nfOfOrdinaryFounders
std::vector< DescentTree * > _descentTrees
std::map< std::string, std::vector<
Individual * > > 
_twinMarkers
std::set< std::string > _consangPairIds
Grid< int, Individual * > _individualGrid
std::vector< Individual * > _anomolous


Constructor & Destructor Documentation

Pedigree::Pedigree  )  [inline]
 

Pedigree::Pedigree const std::string  id,
const unsigned  tableId
[inline]
 

Pedigree::~Pedigree  ) 
 


Member Function Documentation

void Pedigree::_addDescentTree unsigned  id  )  [private]
 

void Pedigree::_addDescentTreesConnectedTo unsigned  dtIndex,
std::deque< DescentTree * > &  orderedDescentTrees,
bool  left
[private]
 

_addDescentTreesConnectedTo: For each descent tree determine which are the other descent trees that have connectors to it.

void Pedigree::_addNuclearFamily Individual mother,
Individual father
[private]
 

void Pedigree::_assignChildrenDescentTree Individual individual,
unsigned  descentTreeId
[private]
 

void Pedigree::_assignDescentTrees  )  [private]
 

void Pedigree::_calculateWidth Individual individual,
bool  classicalOrdering,
unsigned  descentTreeIndex
[private]
 

_calculateWidth: Calculates the width of a descent tree.

void Pedigree::_checkMarkedTwinsDOB  )  [private]
 

_checkMarkedTwinsDOB: Issue warning messages if the DOB of twins in a twin group do not match.

void Pedigree::_checkParentsGender Individual individual  )  [private]
 

_checkParentsGender: Checks the consistency of the pedigree input data table.

void Pedigree::_determineConnectorIndividuals  )  [private]
 

_determineConnectorIndividuals(): A depth-first search approach is used to mark individuals who are consanguinous or have mates who are part of a different descent tree.

void Pedigree::_drawConsanguinityLetter Individual mother,
Individual father,
unsigned int &  uniqueId,
double  iconInterval,
double  iconDiameter,
std::map< std::string, std::string > &  individualConsanguinityLetter,
DrawingCanvas dc,
double  multipleSpouseOffset = 0,
bool  leftConnector = false
[private]
 

_drawConsanguinityLetter: Assign a unique label to each unique individual who is repeated for consanguinity and external connections.

void Pedigree::_drawConsanguinousConnectors DrawingCanvas dc  )  [private]
 

void Pedigree::_drawHorizontalConnectorLine double  y,
double  x1,
double  x2,
bool  isConsanguinous,
DrawingCanvas dc
[private]
 

_drawHorizontalConnectorLine: Draws horizontal consanguinous and external connections.

void Pedigree::_drawVerticalConnectorLine double  startY,
double  endY,
double  startX,
double  endX,
bool  isConsanguinous,
DrawingCanvas dc,
double  multipleSpouseOffset = 0.0,
bool  singleChild = false
[private]
 

_drawVerticalConnectorLine: Draws vertical consanguinous and external connections.

void Pedigree::_establishNuclearFamilies  )  [private]
 

_establishNuclearFamilies: Determine the nuclear families of a pedigree.

unsigned Pedigree::_getPrimaryDescentTreeIndex std::set< unsigned > &  dt,
Individual individual,
bool  increment
[private]
 

_getPrimaryDescentTreeIndex: Get the descent tree index of the individual.

void Pedigree::_getSpouses std::set< Individual *, compareIndividual > &  foundingGroup,
Individual individual
[private]
 

bool Pedigree::_hasIndividualAtPosition Individual start,
Individual end
[private]
 

_hasIndividualAtPosition: Checks if an individual exists between two given individuals on the grid.

void Pedigree::_markConnectorIndividuals Individual individual,
unsigned &  loopNumber
[private]
 

_markConnectorIndividuals: This function marks all the individuals that are consanguinous or have an external connection.

void Pedigree::_markConsanguinousFlags Individual individual,
unsigned &  loopNumber
[private]
 

_markConsanguinousFlags: This function gets all the individuals with consanguinity and propagates the flags up in the descent tree These flags determine the sibling sorting order of the Nuclear Family.

void Pedigree::_markConsanguinousIndividuals  )  [private]
 

_markConsanguinousIndividuals: This function marks all the individuals that are consanguinous.

void Pedigree::_markExternalConnectionFlags  )  [private]
 

_markExternalConnectionFlags:

void Pedigree::_markLeftExternalConnectionFlags Individual individual,
unsigned  connectionNumber
[private]
 

_markLeftExternalConnectionFlags:Recursively traverses up the descent tree from an individual with an external connection and marks the left external connection flags

void Pedigree::_markLeftLoopFlags Individual individual,
unsigned  loopNumber
[private]
 

_markLeftLoopFlags: Recursively traverses up the descent tree from a consanguinous individual and marks the left consanguinous flags

void Pedigree::_markRightExternalConnectionFlags Individual individual,
unsigned  connectionNumber
[private]
 

_markRightExternalConnectionFlags:Recursively traverses up the descent tree from an individual with external connection and marks the right external connection flags

void Pedigree::_markRightLoopFlags Individual individual,
unsigned  loopNumber
[private]
 

_markRightLoopFlags: Recursively traverses up the descent tree from a consanguinous individual and marks the right consanguinous flags

void Pedigree::_populateIndividualGrid  )  [private]
 

_populateIndividualGrid: Initialize the grid with the x and y positions of the individuals on the canvas.

void Pedigree::_reorderDescentTreesBasedOnExternalConnections  )  [private]
 

_reorderDescentTreesBasedOnExternalConnections: Rearrange the descent trees based on the external connections.

void Pedigree::_setIndividualTwinField const DataColumn twinDataColumn,
char  type
[private]
 

void Pedigree::_setLeftShiftConnectionFlags  )  [private]
 

void Pedigree::_sortAndCalculateDescentTreeWidth  )  [private]
 

_sortAndCalculateDescentTreeWidth: Sorts the nuclear families based on consanguinous connections and calculates the descent tree width.

void Pedigree::_sortIndividualNuclearFamilies  )  [private]
 

_sortIndividualNuclearFamilies: Sort individuals with multiple spouses for cases with consanguinity/external connections:

void Pedigree::_sortNuclearFamilies bool  consanguinousFlag  )  [private]
 

Sort all the nuclear families based on optimal/classical ordering of children when consanguinity or external connection is found in the descent tree

void Pedigree::_sortNuclearFamiliesBasedOnDataField const std::string &  name,
bool  dobSortOrder
[private]
 

_sortNuclearFamiliesBasedOnDataField: If the user specifies a sorting field, the siblings are sorted based on that data field.

void Pedigree::_sortSibsBasedOnConsanguinousConnections const std::vector< Individual * > &  sibs,
std::vector< Individual * > &  sortedSibs
[private]
 

void Pedigree::_sortSibsBasedOnExternalConnections const std::vector< Individual * > &  sibs,
std::vector< Individual * > &  sortedSibs
[private]
 

void Pedigree::addIndividual const std::string  ind,
std::string  mother,
std::string  father,
std::string  gender,
int  rowIndex,
int  tableIndex,
const DataTable pedigreeTable
 

void Pedigree::checkForAncestorDescendantAnomoly Individual ancestor  ) 
 

void Pedigree::checkParentChildDOB  ) 
 

checkParentChildDOB: Checks if the parents age is comparable to the ages of their children.

void Pedigree::clearVisitCounts  ) 
 

void Pedigree::computePedigreeWidth const std::string &  sortField,
bool  dobSortOrder
 

void Pedigree::determineConnectorIndividualsOld  )  [private]
 

void Pedigree::determineFoundingGroups  ) 
 

determineFoundingGroups: Determine the original founding groups in a pedigree.

void Pedigree::display  )  const
 

void Pedigree::draw const LabelSet labelSet  ) 
 

draw: Draws a pedigree for each family on a separate SVG canvas and outputs them to separate files. The output file names correspond to the family ids.

void Pedigree::establishIndividualConnections  ) 
 

establishIndividualConnections: Establish parent/child and spouse connections:

std::string Pedigree::getId void   )  const [inline]
 

unsigned Pedigree::getTableId  )  const [inline]
 

void Pedigree::set const std::string  id,
const unsigned  tableId
[inline]
 

void Pedigree::setCoreOptionalFields const DataTable pedigreeTable  ) 
 

setCoreOptionalFields: Sets core optional fields (if present) like deceased, proband, affected on the individual.

void Pedigree::setDrawingFileExtension const std::string &  ext  )  [static]
 


Member Data Documentation

std::vector<Individual *> Pedigree::_anomolous [private]
 

std::set<std::string> Pedigree::_consangPairIds [private]
 

std::vector<DescentTree*> Pedigree::_descentTrees [private]
 

bool Pedigree::_dtsHaveConsanguinity [private]
 

std::string Pedigree::_id [private]
 

Grid<int,Individual* > Pedigree::_individualGrid [private]
 

std::set<Individual*,compareIndividual> Pedigree::_individuals [private]
 

std::vector<NuclearFamily*> Pedigree::_nfOfOrdinaryFounders [private]
 

std::set<NuclearFamily*,compareNuclearFamily> Pedigree::_nuclearFamilies [private]
 

unsigned Pedigree::_tableId [private]
 

std::map<std::string, std::vector<Individual*> > Pedigree::_twinMarkers [private]
 


The documentation for this class was generated from the following files:
Generated on Fri Nov 18 16:24:39 2011 for MADELINE by  doxygen 1.4.4