#include <Pedigree.h>
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 |
|
|
|
|
|
|
|
|
|
_addDescentTreesConnectedTo: For each descent tree determine which are the other descent trees that have connectors to it. |
|
|
|
|
|
|
|
_calculateWidth: Calculates the width of a descent tree. |
|
_checkMarkedTwinsDOB: Issue warning messages if the DOB of twins in a twin group do not match. |
|
_checkParentsGender: Checks the consistency of the pedigree input data table. |
|
_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. |
|
_drawConsanguinityLetter: Assign a unique label to each unique individual who is repeated for consanguinity and external connections. |
|
|
|
_drawHorizontalConnectorLine: Draws horizontal consanguinous and external connections. |
|
_drawVerticalConnectorLine: Draws vertical consanguinous and external connections. |
|
_establishNuclearFamilies: Determine the nuclear families of a pedigree. |
|
_getPrimaryDescentTreeIndex: Get the descent tree index of the individual. |
|
|
|
_hasIndividualAtPosition: Checks if an individual exists between two given individuals on the grid. |
|
_markConnectorIndividuals: This function marks all the individuals that are consanguinous or have an external connection. |
|
_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. |
|
_markConsanguinousIndividuals: This function marks all the individuals that are consanguinous. |
|
_markExternalConnectionFlags: |
|
_markLeftExternalConnectionFlags:Recursively traverses up the descent tree from an individual with an external connection and marks the left external connection flags |
|
_markLeftLoopFlags: Recursively traverses up the descent tree from a consanguinous individual and marks the left consanguinous flags |
|
_markRightExternalConnectionFlags:Recursively traverses up the descent tree from an individual with external connection and marks the right external connection flags |
|
_markRightLoopFlags: Recursively traverses up the descent tree from a consanguinous individual and marks the right consanguinous flags |
|
_populateIndividualGrid: Initialize the grid with the x and y positions of the individuals on the canvas. |
|
_reorderDescentTreesBasedOnExternalConnections: Rearrange the descent trees based on the external connections. |
|
|
|
|
|
_sortAndCalculateDescentTreeWidth: Sorts the nuclear families based on consanguinous connections and calculates the descent tree width. |
|
_sortIndividualNuclearFamilies: Sort individuals with multiple spouses for cases with consanguinity/external connections: |
|
Sort all the nuclear families based on optimal/classical ordering of children when consanguinity or external connection is found in the descent tree |
|
_sortNuclearFamiliesBasedOnDataField: If the user specifies a sorting field, the siblings are sorted based on that data field. |
|
|
|
|
|
|
|
|
|
checkParentChildDOB: Checks if the parents age is comparable to the ages of their children. |
|
|
|
|
|
|
|
determineFoundingGroups: Determine the original founding groups in a pedigree. |
|
|
|
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. |
|
establishIndividualConnections: Establish parent/child and spouse connections: |
|
|
|
|
|
|
|
setCoreOptionalFields: Sets core optional fields (if present) like deceased, proband, affected on the individual. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|