Class PedigreeDraw

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

public class PedigreeDraw extends Object
Draws a pedigree using SVG
Author:
pablocingolani
  • 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)