# Class PedigreeDraw

java.lang.Object
org.snpsift.pedigree.PedigreeDraw

public class PedigreeDraw extends Object
Draws a pedigree using SVG

Author:
  pablocingolani

## Field Summary

Fields
Modifier and Type
Field
Description
`static boolean`
`debug`

## Constructor Summary

Constructors
Constructor
Description
`PedigreeDraw(String tfamFileName)`
`PedigreeDraw(org.snpeff.ped.PedPedigree pedigree)`

## Method Summary

Modifier and Type
Method
Description
`int`
`assignOrder()`
Assign order
`int`
`calcDepth()`
Max depth in this pedigree
`void`
`circle(int x, int y, int r, String strokeColor, int strokeWidth, String fillColor)`
`void`
`colorAffected()`
Color individuals by affected status
`void`
`diamond(int x, int y, int width, int height, String strokeColor, int strokeWidth, String fillColor)`
Draw a diamond (unknown sex)
`String`
`drawSvg()`
Draw the full pedigree as an SVG graph
`void`
`drawSvgByFamily(String outdir, String info)`
Draw each family
`void`
`female(Individual ind)`
`List<Individual>`
`findSpouses(Individual ind)`
`Individual`
`get(String id)`
`ArrayList<Individual>`
`getIndividuals()`
`int`
`getSizeX()`
`int`
`getSizeY()`
`void`
`label(Point p, String label)`
`void`
`line(Point p1, Point p2)`
`void`
`line(Point p1, Point p2, String color)`
`void`
`line(Individual parent1, Individual parent2, Individual child)`
Line between Mother-Father and Child
`void`
`lineDashed(Point p1, Point p2, String color)`
`void`
`male(Individual ind)`
`protected void`
`moveIfLeft(int posX, int deltaX, Set<Individual> except)`
Move if the object is located to the left of posX
`protected void`
`moveIfRight(int posX, int deltaX, Set<Individual> except)`
Move if the object is located to the right of posX
`void`
`square(int x, int y, int width, int height, String strokeColor, int strokeWidth, String fillColor)`
`void`
`unknown(Individual ind)`

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### debug

public static boolean debug

## Constructor Details

### PedigreeDraw

public PedigreeDraw(org.snpeff.ped.PedPedigree pedigree)

### PedigreeDraw

public PedigreeDraw(String tfamFileName)

## Method Details

### assignOrder

public int assignOrder()
Assign order

Returns:

### calcDepth

public int calcDepth()
Max depth in this pedigree

Returns:

### circle

public void circle(int x, int y, int r, String strokeColor, int strokeWidth, String fillColor)

### colorAffected

public void colorAffected()
Color individuals by affected status

### diamond

public void diamond(int x, int y, int width, int height, String strokeColor, int strokeWidth, String fillColor)
Draw a diamond (unknown sex)

Parameters:
  `x` -
  `y` -
  `width` -
  `height` -
  `strokeColor` -
  `strokeWidth` -
  `fillColor` -

### drawSvg

public String drawSvg()
Draw the full pedigree as an SVG graph

Returns:

### drawSvgByFamily

public void drawSvgByFamily(String outdir, String info)
Draw each family

### female

public void female(Individual ind)

### findSpouses

public List<Individual> findSpouses(Individual ind)

### get

public Individual get(String id)

### getIndividuals

public ArrayList<Individual> getIndividuals()

### getSizeX

public int getSizeX()

### getSizeY

public int getSizeY()

### label

public void label(Point p, String label)

### line

public void line(Individual parent1, Individual parent2, Individual child)
Line between Mother-Father and Child

Parameters:
  `parent1` -
  `parent2` -
  `child` -

### line

public void line(Point p1, Point p2)

### line

public void line(Point p1, Point p2, String color)

### lineDashed

public void lineDashed(Point p1, Point p2, String color)

### male

public void male(Individual ind)

### moveIfLeft

protected void moveIfLeft(int posX, int deltaX, Set<Individual> except)
Move if the object is located to the left of posX

Parameters:
  `deltaX` -
  `xpos` -

### moveIfRight

protected void moveIfRight(int posX, int deltaX, Set<Individual> except)
Move if the object is located to the right of posX

Parameters:
  `deltaX` -
  `xpos` -

### square

public void square(int x, int y, int width, int height, String strokeColor, int strokeWidth, String fillColor)

### unknown

public void unknown(Individual ind)