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 voidaddChild(Individual ind)intcalcDepth()Depth in the graph.intcompareTo(Individual ind)java.lang.BooleangetAffected()java.util.Collection<Individual>getChilds()java.util.ArrayList<Individual>getChilds(Individual spouse)Get only childs from this spousejava.lang.StringgetColor()intgetDepth()java.lang.StringgetFamilyId()IndividualgetFather()java.lang.StringgetId()java.lang.StringgetLabel()IndividualgetMother()intgetOrder()java.awt.PointgetPosition()org.snpeff.ped.SexgetSex()protected booleanhasOrder()booleanhasPosition()booleanisDescendant(Individual ind)Is 'this' descendant from 'ind' (e.g.booleanisFemale()booleanisMale()booleanisRoot()Is this a root node?protected voidremoveChild(Individual ind)voidsetAffected(java.lang.Boolean affected)voidsetColor(java.lang.String color)voidsetDepth(int depth)voidsetFather(Individual father)voidsetId(java.lang.String id)voidsetLabel(java.lang.String label)voidsetMother(Individual mother)voidsetOrder(int order)voidsetSex(org.snpeff.ped.Sex sex)voidsizeByDepth(int[] sizeByLevel)Size by depthjava.lang.StringtoString()java.lang.StringtoStringTree()
-
-
-
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:
compareToin 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:
toStringin classjava.lang.Object
-
toStringTree
public java.lang.String toStringTree()
-
-