pedview
A lightweight command-line tool for visualizing family pedigrees in genetics and clinical research workflows.
pedview reads standard pedigree files and generates self-contained, interactive HTML reports with publication-ready SVG diagrams. It has zero external runtime dependencies (built purely on Python standard library) and runs completely offline.
Features
- Zero Runtime Dependencies: Pure Python standard library (
math,html,dataclasses,pathlib,argparse). - Flexible Input: Auto-detects standard 6-column PLINK
.fam/.pedfiles and extended headered pedigree files. - Clinical & Research Attributes: Visualizes affected status, proband indicators, carriers, deceased status, age labels, and genotype calls.
- Layered Graph Engine: Sugiyama-style layout with barycenter crossing reduction, twin handling, and consanguinity loop routing.
- Interactive Standalone HTML: Produces a single offline HTML report with pan/zoom navigation, individual detail drawer, and search.
- Publication Exports: One-click download for vector SVG, journal-styled SVG, and high-resolution PNG.
- Mendelian Quality Control: Automated parent-child relationship validation and Wright's inbreeding coefficient calculations ($f_a$).
Installation
pip install pedview
Or install from source:
git clone https://github.com/DKunLee/Pedview.git
cd Pedview
pip install .
Quickstart
# 1. Validate pedigree format, integrity, and relationships
pedview validate <input.ped>
# 2. Preview family and cohort summaries directly in the terminal
pedview preview <input.ped>
# 3. Build a standalone interactive HTML report
pedview build <input.ped> -o <output_report.html>
# 4. Render a single family from a multi-family cohort
pedview build <input.ped> --family <family_id> -o <family_report.html>
# 5. Highlight a candidate variant and set ancestor inbreeding coefficient
pedview build <input.ped> --variant-name "<variant_name>" --ancestor-inbreeding 0.02 -o <output_report.html>
Supported Formats
1. Standard Headerless PLINK .fam / .ped (6 Columns)
FAM01 101 0 0 1 1
FAM01 102 0 0 2 1
FAM01 201 101 102 1 2
FAM01 202 101 102 2 1
- Sex:
1= Male,2= Female,0= Unknown. - Phenotype:
1= Unaffected,2= Affected,0/-9= Unknown. - Missing Parents:
0,.,-9,NA.
2. Headered Extended Pedigree (Tab- or Space-delimited)
famid id fid mid sex affected proband deceased age genotype
FAM01 101 0 0 1 unaffected 0 1 72y 0/0
FAM01 102 0 0 2 unaffected 0 0 68y 0/1
FAM01 201 101 102 1 affected 1 0 14y 0/1
Common column header aliases are resolved automatically:
- Family:
famid,family_id,family,pedigree,fid - Individual:
id,iid,individual_id,sample_id - Father:
fid,pat,pid,father,father_id - Mother:
mid,mat,mother,mother_id - Sex:
sex,gender - Phenotype:
affected,phenotype,affection
CLI Reference
| Command | Description | Example |
|---|---|---|
validate |
Validates file format, parent references, sex codes, and loops | pedview validate <input.ped> |
preview |
Prints terminal summary of families, founders, and generations | pedview preview <input.ped> |
build |
Generates interactive HTML report | pedview build <input.ped> -o <output_report.html> |
Build Options
-o, --output: Output file path (defaults to<input>.html).--family: Filter report to a specific family ID (<family_id>).--title: Custom title for the HTML report ("<title>").--variant-name: Candidate variant annotation label (e.g."<variant_name>").--ancestor-inbreeding: Global Wright ancestor inbreeding coefficient ($f_a$). Defaults to0.0.
License
This project is licensed under the MIT License.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pedview-1.0.0.tar.gz.
File metadata
- Download URL: pedview-1.0.0.tar.gz
- Upload date:
- Size: 47.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7989d628cd715985f8079660bd942ece730abd162621afd75b9bee6b55024b71
|
|
| MD5 |
4d0c1941ee6dd0824a356aa200aa5c24
|
|
| BLAKE2b-256 |
38858799d7a9763f5aaa33eab47dd89036aeea0ed151bd5c1ffc5a9d4b90c51c
|
Provenance
The following attestation bundles were made for pedview-1.0.0.tar.gz:
Publisher:
publish.yml on DKunLee/Pedview
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pedview-1.0.0.tar.gz -
Subject digest:
7989d628cd715985f8079660bd942ece730abd162621afd75b9bee6b55024b71 - Sigstore transparency entry: 2743690594
- Sigstore integration time:
-
Permalink:
DKunLee/Pedview@39a9dc39b040957e69d167a4ea7ec731e5c6256f -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/DKunLee
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@39a9dc39b040957e69d167a4ea7ec731e5c6256f -
Trigger Event:
push
-
Statement type:
File details
Details for the file pedview-1.0.0-py3-none-any.whl.
File metadata
- Download URL: pedview-1.0.0-py3-none-any.whl
- Upload date:
- Size: 49.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f2864f65a9ad7f1305aa948c2f956b7dc901ee43d83388e1f0ec6fd4798133d5
|
|
| MD5 |
4cb5d3df1016a3c1c04099d3a262b239
|
|
| BLAKE2b-256 |
6c00b388749698d6355b6fd403e7c44e98b79e4c29293df1045cfbd1befe92e6
|
Provenance
The following attestation bundles were made for pedview-1.0.0-py3-none-any.whl:
Publisher:
publish.yml on DKunLee/Pedview
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pedview-1.0.0-py3-none-any.whl -
Subject digest:
f2864f65a9ad7f1305aa948c2f956b7dc901ee43d83388e1f0ec6fd4798133d5 - Sigstore transparency entry: 2743690611
- Sigstore integration time:
-
Permalink:
DKunLee/Pedview@39a9dc39b040957e69d167a4ea7ec731e5c6256f -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/DKunLee
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@39a9dc39b040957e69d167a4ea7ec731e5c6256f -
Trigger Event:
push
-
Statement type: