Package org.snpsift.pedigree
Class Individual
- java.lang.Object
-
- org.snpsift.pedigree.Individual
-
- All Implemented Interfaces:
java.lang.Comparable<Individual>
public class Individual extends java.lang.Object implements java.lang.Comparable<Individual>
An individual in the pedigree Individuals are like TfamEntries but have drawing info (coordinates, color, etc.)- Author:
- pablocingolani
-
-
Constructor Summary
Constructors Constructor Description Individual(org.snpeff.ped.TfamEntry tfamEntry)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addChild(Individual ind)
int
calcDepth()
Depth in the graph.int
compareTo(Individual ind)
java.lang.Boolean
getAffected()
java.util.Collection<Individual>
getChilds()
java.util.ArrayList<Individual>
getChilds(Individual spouse)
Get only childs from this spousejava.lang.String
getColor()
int
getDepth()
java.lang.String
getFamilyId()
Individual
getFather()
java.lang.String
getId()
java.lang.String
getLabel()
Individual
getMother()
int
getOrder()
java.awt.Point
getPosition()
org.snpeff.ped.Sex
getSex()
protected boolean
hasOrder()
boolean
hasPosition()
boolean
isDescendant(Individual ind)
Is 'this' descendant from 'ind' (e.g.boolean
isFemale()
boolean
isMale()
boolean
isRoot()
Is this a root node?protected void
removeChild(Individual ind)
void
setAffected(java.lang.Boolean affected)
void
setColor(java.lang.String color)
void
setDepth(int depth)
void
setFather(Individual father)
void
setId(java.lang.String id)
void
setLabel(java.lang.String label)
void
setMother(Individual mother)
void
setOrder(int order)
void
setSex(org.snpeff.ped.Sex sex)
void
sizeByDepth(int[] sizeByLevel)
Size by depthjava.lang.String
toString()
java.lang.String
toStringTree()
-
-
-
Method Detail
-
addChild
protected void addChild(Individual ind)
-
calcDepth
public int calcDepth()
Depth in the graph. Depth is zero for root nodes- Returns:
-
compareTo
public int compareTo(Individual ind)
- Specified by:
compareTo
in interfacejava.lang.Comparable<Individual>
-
getAffected
public java.lang.Boolean getAffected()
-
getChilds
public java.util.Collection<Individual> getChilds()
-
getChilds
public java.util.ArrayList<Individual> getChilds(Individual spouse)
Get only childs from this spouse- Parameters:
spouse
-- Returns:
-
getColor
public java.lang.String getColor()
-
getDepth
public int getDepth()
-
getFamilyId
public java.lang.String getFamilyId()
-
getFather
public Individual getFather()
-
getId
public java.lang.String getId()
-
getLabel
public java.lang.String getLabel()
-
getMother
public Individual getMother()
-
getOrder
public int getOrder()
-
getPosition
public java.awt.Point getPosition()
-
getSex
public org.snpeff.ped.Sex getSex()
-
hasOrder
protected boolean hasOrder()
-
hasPosition
public boolean hasPosition()
-
isDescendant
public boolean isDescendant(Individual ind)
Is 'this' descendant from 'ind' (e.g. son, grand son, etc.)- Parameters:
ind
-- Returns:
-
isFemale
public boolean isFemale()
-
isMale
public boolean isMale()
-
isRoot
public boolean isRoot()
Is this a root node?- Returns:
-
removeChild
protected void removeChild(Individual ind)
-
setAffected
public void setAffected(java.lang.Boolean affected)
-
setColor
public void setColor(java.lang.String color)
-
setDepth
public void setDepth(int depth)
-
setFather
public void setFather(Individual father)
-
setId
public void setId(java.lang.String id)
-
setLabel
public void setLabel(java.lang.String label)
-
setMother
public void setMother(Individual mother)
-
setOrder
public void setOrder(int order)
-
setSex
public void setSex(org.snpeff.ped.Sex sex)
-
sizeByDepth
public void sizeByDepth(int[] sizeByLevel)
Size by depth- Parameters:
sizeByLevel
-
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
toStringTree
public java.lang.String toStringTree()
-
-