- Open Access
ped_draw: pedigree drawing with ease
BMC Bioinformatics volume 21, Article number: 569 (2020)
Pedigree files are ubiquitously used within bioinformatics and genetics studies to convey critical information about relatedness, sex and affected status of study samples. While the text based format of ped files is efficient for computational methods, it is not immediately intuitive to a bioinformatician or geneticist trying to understand family structures, many of which encode the affected status of individuals across multiple generations. The visualization of pedigrees into connected nodes with descriptive shapes and shading provides a far more interpretable format to recognize visual patterns and intuit family structures. Despite these advantages of a visual pedigree, it remains difficult to quickly and accurately visualize a pedigree given a pedigree text file.
Here we describe ped_draw a command line and web tool as a simple and easy solution to pedigree visualization. Ped_draw is capable of drawing complex multi-generational pedigrees and conforms to the accepted standards for depicting pedigrees visually. The command line tool can be used as a simple one liner command, utilizing graphviz to generate an image file. The web tool, https://peddraw.github.io, allows the user to either: paste a pedigree file, type to construct a pedigree file in the text box or upload a pedigree file. Users can save the generated image file in various formats.
We believe ped_draw is a useful pedigree drawing tool that improves on current methods due to its ease of use and approachability. Ped_draw allows users with various levels of expertise to quickly and easily visualize pedigrees.
Pedigree files are text files that convey important information about the samples within a genetics or bioinformatics study . This includes, at a minimum, for each sample: a kindred/family identifier, a sample identifier, a paternal identifier, a maternal identifier, a sex identifier (1 = male, 2 = female), and an affected status or phenotype identifier (1 = unaffected, 2 = affected) . This text encoding is efficient for computational tools, but is difficult for a human user to visually parse and understand family and inheritance relationships. As such, bioinformaticians and geneticists typically rely on visual depictions of pedigrees where each individual is a node in a connected network, with: squares representing males, circles representing females, unshaded nodes representing unaffected samples and shaded nodes representing affected samples. Individuals in the same family generation are drawn at the same vertical height (ie, father and mother), while individuals in the subsequent generation (ie, children of the father and mother) are drawn below and connected to their respective parents. This accepted format allows for rapid and intuitive visualization of family structures and how affected status is segregating in the family (ie, de novo, dominant, recessive, X-linked modes of inheritance). This visual format becomes particularly useful in large, multi-generation pedigrees such as the Utah Centre d'Etude du Polymorphisme Humain (CEPH) dataset which comprises 603 individuals across 34 different large multi-generation families .
Importantly, all of these published tools have significant installation dependencies, have substantial programming learning curves and lack a simple one command input–output approach. Ped_draw was designed to occupy a specific niche within this set of available software. All of ped_draw’s dependencies are installed by default in a typical Linux environment and a Docker image provides additional portability. Ped_draw’s simplified approach removes the need for customization and allows users to easily and rapidly visualize pedigrees directly from a provided ped file.
Ped_draw is solely implemented in Python and requires Python 2.7.15 or greater. Converting the dot output of ped_draw to an image is achieved using graphviz (not provided). Image outputs from graphviz can be visualized in any graphics viewing application.
The input for ped_draw is a ped file and the output is an image file (generated by graphviz). Ped_draw generates a dot file that can be passed directly as stdout to graphviz to generate an image file. Ped_draw is capable of visualizing complex ped files including multi-generation (3 or more) parent-pairs, multiple affected individuals, large numbers of children (8 or more per parent-pair) and multiple distinct families/kindreds in the same input ped file into a single image output.
Ped_draw can be used as a simple one-liner command as follows (where example.ped is an example pedigree file):
Generate a dot formatted file (written to stdout):
$ python ~ /bin/ped_draw/ped_to_dot.py example.ped
Generate a png image of the pedigree by piping the ped_draw output to graphviz/dot:
$ python ~ /bin/ped_draw/ped_to_dot.py example.ped | dot -T png -o example.png
We demonstrate the ease and usage of ped_draw in multiple examples in Fig. 1. A relatively simple two generation pedigree with a single parent-pair and three children (one of which is affected) is drawn (Fig. 1a). Occasionally, ped files can contain multiple distinct families/kindreds, as specified by the first column of the file. This is interpreted by ped_draw and two distinct pedigrees are drawn (Fig. 1b). Pedigree files can also specify more than two generations. A three generation pedigree with multiple children in each generation and an unrelated father (node 1006) in generation 2 is drawn (Fig. 1c). An extended four generation family with multiple affected children across multiple generations is drawn (Fig. 1d).
In these examples and others, ped_draw draws the pedigree in the accepted “tree” representation, connecting all related nodes, assigning node shaped based on sex, labels nodes based on sample name and shades all affected nodes grey. This allows geneticists and bioinformaticians to readily visualize relatedness between samples and identify inheritance modes through multiple generations. Numerous other examples of pedigrees drawn by ped_draw, including pedigrees from the CEPH families, can be found on the Github repository under examples/.
Ped_draw is a simple solution to the persistent bioinformatics and genetics challenge of visualizing pedigrees. Ped_draw is a robust and capable solution for drawing complex pedigrees within a simple Python and graphviz command. Both Python and graphviz are widely used, accessible, long-maintained and portable programming solutions. We anticipate ped_draw will be useful for both experienced bioinformaticians (using the command line tool) and users with little or no computational expertise (using the web tool).
Availability and requirements
Project name: ped_draw.
Operating system(s): UNIX (command line tool); platform-independent (web tool)
Other requirements: Python 2.7.15 or greater (command line tool), conversion of ped_draw output dot files to pngs or other image types requires graphviz, visualization of graphical outputs can be done by any number of graphics viewing applications; Chrome 80.0.3987.149 or greater (web tool)
Any restrictions to use by non-academics: MIT-license
Centre d'Etude du Polymorphisme Humain
Carver T, Cunningham AP, Babb C, de Villiers A, Lee SH, Tischkowitz M, Walter FM, Easton DF, Antoniou AC. Pedigreejs: a web-based graphical pedigree editor. Bioinformatics. 2018;34(6):1069–71.
Dausset J, Cann H, Cohen D, Lathrop M, Lalouel JM, White R. Centre D’etude Du Polymorphisme Humain (CEPH): collaborative genetic mapping of the human genome. Genomics. 1990;6(3):575–7.
Geraldine_VdAuwera. “Pedigree / PED Files.” GATK-Forum. 2016. https://gatkforums.broadinstitute.org/gatk/discussion/7696/pedigree-ped-files. Accessed 12 Feb 2020.
McKenna A, Hanna M, Banks E, Sivachenko A, Cibulskis K, Kernytsky A, Garimella K, et al. The genome analysis toolkit: a mapreduce framework for analyzing next-generation DNA sequencing data. Genome Res. 2010;20(9):1297–303.
Sinnwell JP, Therneau TM, Schaid DJ. The kinship2 R package for pedigree data. Hum Hered. 2014;78(2):91–3.
Trager EH, Khanna R, Marrs A, Siden L, Branham KEH, Swaroop A, Richards JE. Madeline 2.0 PDE: a new program for local and web-based pedigree drawing. Bioinformatics. 2007;23(14):1854–6.
R01HG009000 from NHGRI to G.T.M., R01HG009712 from NHGRI to G.T.M.—The funding bodies played no role in the design of the study and collection, analysis, and interpretation of data and in writing the manuscript
Ethics approval and consent to participate
Consent for publication
The authors declare that they have no competing interests.
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
About this article
Cite this article
Velinder, M., Lee, D. & Marth, G. ped_draw: pedigree drawing with ease. BMC Bioinformatics 21, 569 (2020). https://doi.org/10.1186/s12859-020-03917-4
- Family studies