repare 0.1.0__tar.gz → 0.1.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of repare might be problematic. Click here for more details.
- repare-0.1.2/CITATION.cff +31 -0
- {repare-0.1.0 → repare-0.1.2}/PKG-INFO +27 -7
- {repare-0.1.0 → repare-0.1.2}/README.md +25 -6
- {repare-0.1.0 → repare-0.1.2}/benchmarks/simulations/simulator/simulated_pedigree.py +2 -2
- {repare-0.1.0 → repare-0.1.2}/pixi.lock +2 -2
- {repare-0.1.0 → repare-0.1.2}/pyproject.toml +3 -0
- {repare-0.1.0 → repare-0.1.2}/src/repare/main.py +6 -3
- {repare-0.1.0 → repare-0.1.2}/src/repare.egg-info/PKG-INFO +27 -7
- {repare-0.1.0 → repare-0.1.2}/src/repare.egg-info/SOURCES.txt +1 -0
- {repare-0.1.0 → repare-0.1.2}/.gitattributes +0 -0
- {repare-0.1.0 → repare-0.1.2}/.gitignore +0 -0
- {repare-0.1.0 → repare-0.1.2}/.pre-commit-config.yaml +0 -0
- {repare-0.1.0 → repare-0.1.2}/LICENSE +0 -0
- {repare-0.1.0 → repare-0.1.2}/benchmarks/published/compare_gurgy_pedigrees.py +0 -0
- {repare-0.1.0 → repare-0.1.2}/benchmarks/published/compare_nepluyevsky_pedigrees.py +0 -0
- {repare-0.1.0 → repare-0.1.2}/benchmarks/published/data/gurgy/citation.md +0 -0
- {repare-0.1.0 → repare-0.1.2}/benchmarks/published/data/gurgy/inferred_relations_READv2.csv +0 -0
- {repare-0.1.0 → repare-0.1.2}/benchmarks/published/data/gurgy/nodes.csv +0 -0
- {repare-0.1.0 → repare-0.1.2}/benchmarks/published/data/gurgy/published_exact_relations.csv +0 -0
- {repare-0.1.0 → repare-0.1.2}/benchmarks/published/data/hazleton_north/citation.md +0 -0
- {repare-0.1.0 → repare-0.1.2}/benchmarks/published/data/hazleton_north/inferred_relations_coeffs.csv +0 -0
- {repare-0.1.0 → repare-0.1.2}/benchmarks/published/data/hazleton_north/inferred_relations_custom.csv +0 -0
- {repare-0.1.0 → repare-0.1.2}/benchmarks/published/data/hazleton_north/nodes.csv +0 -0
- {repare-0.1.0 → repare-0.1.2}/benchmarks/published/data/hazleton_north/published_exact_relations.csv +0 -0
- {repare-0.1.0 → repare-0.1.2}/benchmarks/published/data/nepluyevsky/citation.md +0 -0
- {repare-0.1.0 → repare-0.1.2}/benchmarks/published/data/nepluyevsky/inferred_relations_KIN.csv +0 -0
- {repare-0.1.0 → repare-0.1.2}/benchmarks/published/data/nepluyevsky/inferred_relations_custom.csv +0 -0
- {repare-0.1.0 → repare-0.1.2}/benchmarks/published/data/nepluyevsky/nodes.csv +0 -0
- {repare-0.1.0 → repare-0.1.2}/benchmarks/published/data/nepluyevsky/published_exact_relations.csv +0 -0
- {repare-0.1.0 → repare-0.1.2}/benchmarks/published/evaluator/__init__.py +0 -0
- {repare-0.1.0 → repare-0.1.2}/benchmarks/published/evaluator/comparison_utils.py +0 -0
- {repare-0.1.0 → repare-0.1.2}/benchmarks/published/evaluator/pedigree_evaluator.py +0 -0
- {repare-0.1.0 → repare-0.1.2}/benchmarks/published/results/gurgy_comparison/inferred_pedigree.svg +0 -0
- {repare-0.1.0 → repare-0.1.2}/benchmarks/published/results/gurgy_comparison/inferred_pedigree_repositioned_cropped.pdf +0 -0
- {repare-0.1.0 → repare-0.1.2}/benchmarks/published/results/gurgy_comparison/inferred_pedigree_repositioned_cropped.svg +0 -0
- {repare-0.1.0 → repare-0.1.2}/benchmarks/published/results/gurgy_comparison/published_pedigree.svg +0 -0
- {repare-0.1.0 → repare-0.1.2}/benchmarks/published/results/gurgy_comparison/published_pedigree_cropped.pdf +0 -0
- {repare-0.1.0 → repare-0.1.2}/benchmarks/published/results/gurgy_comparison/published_pedigree_cropped.svg +0 -0
- {repare-0.1.0 → repare-0.1.2}/benchmarks/published/results/gurgy_comparison/relation_differences.csv +0 -0
- {repare-0.1.0 → repare-0.1.2}/benchmarks/published/results/nepluyevsky_comparison/inferred_pedigree.svg +0 -0
- {repare-0.1.0 → repare-0.1.2}/benchmarks/published/results/nepluyevsky_comparison/inferred_pedigree_cropped.pdf +0 -0
- {repare-0.1.0 → repare-0.1.2}/benchmarks/published/results/nepluyevsky_comparison/inferred_pedigree_cropped.svg +0 -0
- {repare-0.1.0 → repare-0.1.2}/benchmarks/published/results/nepluyevsky_comparison/published_pedigree.svg +0 -0
- {repare-0.1.0 → repare-0.1.2}/benchmarks/published/results/nepluyevsky_comparison/published_pedigree_cropped.pdf +0 -0
- {repare-0.1.0 → repare-0.1.2}/benchmarks/published/results/nepluyevsky_comparison/published_pedigree_cropped.svg +0 -0
- {repare-0.1.0 → repare-0.1.2}/benchmarks/published/results/nepluyevsky_comparison/relation_differences.csv +0 -0
- {repare-0.1.0 → repare-0.1.2}/benchmarks/published/results/results.csv +0 -0
- {repare-0.1.0 → repare-0.1.2}/benchmarks/published/run_evaluations.py +0 -0
- {repare-0.1.0 → repare-0.1.2}/benchmarks/simulations/plot_parameter_data.py +0 -0
- {repare-0.1.0 → repare-0.1.2}/benchmarks/simulations/plot_sampling_data.py +0 -0
- {repare-0.1.0 → repare-0.1.2}/benchmarks/simulations/results/parameter_experiment/data/p_mask_node=0.0_error_rate_scale=0.0.csv +0 -0
- {repare-0.1.0 → repare-0.1.2}/benchmarks/simulations/results/parameter_experiment/data/p_mask_node=0.0_error_rate_scale=0.5.csv +0 -0
- {repare-0.1.0 → repare-0.1.2}/benchmarks/simulations/results/parameter_experiment/data/p_mask_node=0.0_error_rate_scale=1.0.csv +0 -0
- {repare-0.1.0 → repare-0.1.2}/benchmarks/simulations/results/parameter_experiment/data/p_mask_node=0.0_error_rate_scale=2.0.csv +0 -0
- {repare-0.1.0 → repare-0.1.2}/benchmarks/simulations/results/parameter_experiment/data/p_mask_node=0.2_error_rate_scale=0.0.csv +0 -0
- {repare-0.1.0 → repare-0.1.2}/benchmarks/simulations/results/parameter_experiment/data/p_mask_node=0.2_error_rate_scale=0.5.csv +0 -0
- {repare-0.1.0 → repare-0.1.2}/benchmarks/simulations/results/parameter_experiment/data/p_mask_node=0.2_error_rate_scale=1.0.csv +0 -0
- {repare-0.1.0 → repare-0.1.2}/benchmarks/simulations/results/parameter_experiment/data/p_mask_node=0.2_error_rate_scale=2.0.csv +0 -0
- {repare-0.1.0 → repare-0.1.2}/benchmarks/simulations/results/parameter_experiment/data/p_mask_node=0.4_error_rate_scale=0.0.csv +0 -0
- {repare-0.1.0 → repare-0.1.2}/benchmarks/simulations/results/parameter_experiment/data/p_mask_node=0.4_error_rate_scale=0.5.csv +0 -0
- {repare-0.1.0 → repare-0.1.2}/benchmarks/simulations/results/parameter_experiment/data/p_mask_node=0.4_error_rate_scale=1.0.csv +0 -0
- {repare-0.1.0 → repare-0.1.2}/benchmarks/simulations/results/parameter_experiment/data/p_mask_node=0.4_error_rate_scale=2.0.csv +0 -0
- {repare-0.1.0 → repare-0.1.2}/benchmarks/simulations/results/parameter_experiment/data/p_mask_node=0.6_error_rate_scale=0.0.csv +0 -0
- {repare-0.1.0 → repare-0.1.2}/benchmarks/simulations/results/parameter_experiment/data/p_mask_node=0.6_error_rate_scale=0.5.csv +0 -0
- {repare-0.1.0 → repare-0.1.2}/benchmarks/simulations/results/parameter_experiment/data/p_mask_node=0.6_error_rate_scale=1.0.csv +0 -0
- {repare-0.1.0 → repare-0.1.2}/benchmarks/simulations/results/parameter_experiment/data/p_mask_node=0.6_error_rate_scale=2.0.csv +0 -0
- {repare-0.1.0 → repare-0.1.2}/benchmarks/simulations/results/parameter_experiment/plots/degree_f1_heatmap.pdf +0 -0
- {repare-0.1.0 → repare-0.1.2}/benchmarks/simulations/results/parameter_experiment/plots/pedigree_summary_statistics.pdf +0 -0
- {repare-0.1.0 → repare-0.1.2}/benchmarks/simulations/results/parameter_experiment/plots/relation_f1_heatmap.pdf +0 -0
- {repare-0.1.0 → repare-0.1.2}/benchmarks/simulations/results/sampling_experiment/data/max_candidate_pedigrees=10000_epsilon=0.0.csv +0 -0
- {repare-0.1.0 → repare-0.1.2}/benchmarks/simulations/results/sampling_experiment/data/max_candidate_pedigrees=10000_epsilon=0.2.csv +0 -0
- {repare-0.1.0 → repare-0.1.2}/benchmarks/simulations/results/sampling_experiment/data/max_candidate_pedigrees=10000_epsilon=0.4.csv +0 -0
- {repare-0.1.0 → repare-0.1.2}/benchmarks/simulations/results/sampling_experiment/data/max_candidate_pedigrees=1000_epsilon=0.0.csv +0 -0
- {repare-0.1.0 → repare-0.1.2}/benchmarks/simulations/results/sampling_experiment/data/max_candidate_pedigrees=1000_epsilon=0.2.csv +0 -0
- {repare-0.1.0 → repare-0.1.2}/benchmarks/simulations/results/sampling_experiment/data/max_candidate_pedigrees=1000_epsilon=0.4.csv +0 -0
- {repare-0.1.0 → repare-0.1.2}/benchmarks/simulations/results/sampling_experiment/data/max_candidate_pedigrees=100_epsilon=0.0.csv +0 -0
- {repare-0.1.0 → repare-0.1.2}/benchmarks/simulations/results/sampling_experiment/data/max_candidate_pedigrees=100_epsilon=0.2.csv +0 -0
- {repare-0.1.0 → repare-0.1.2}/benchmarks/simulations/results/sampling_experiment/data/max_candidate_pedigrees=100_epsilon=0.4.csv +0 -0
- {repare-0.1.0 → repare-0.1.2}/benchmarks/simulations/results/sampling_experiment/data/max_candidate_pedigrees=10_epsilon=0.0.csv +0 -0
- {repare-0.1.0 → repare-0.1.2}/benchmarks/simulations/results/sampling_experiment/data/max_candidate_pedigrees=10_epsilon=0.2.csv +0 -0
- {repare-0.1.0 → repare-0.1.2}/benchmarks/simulations/results/sampling_experiment/data/max_candidate_pedigrees=10_epsilon=0.4.csv +0 -0
- {repare-0.1.0 → repare-0.1.2}/benchmarks/simulations/results/sampling_experiment/plots/degree_f1_heatmap.pdf +0 -0
- {repare-0.1.0 → repare-0.1.2}/benchmarks/simulations/results/sampling_experiment/plots/relation_f1_heatmap.pdf +0 -0
- {repare-0.1.0 → repare-0.1.2}/benchmarks/simulations/run_parameter_experiment.py +0 -0
- {repare-0.1.0 → repare-0.1.2}/benchmarks/simulations/run_sampling_experiment.py +0 -0
- {repare-0.1.0 → repare-0.1.2}/benchmarks/simulations/simulator/__init__.py +0 -0
- {repare-0.1.0 → repare-0.1.2}/examples/algorithm_diagram.svg +0 -0
- {repare-0.1.0 → repare-0.1.2}/examples/nodes.csv +0 -0
- {repare-0.1.0 → repare-0.1.2}/examples/outputs/corrected_input_relations.csv +0 -0
- {repare-0.1.0 → repare-0.1.2}/examples/outputs/reconstructed_exact_relations.csv +0 -0
- {repare-0.1.0 → repare-0.1.2}/examples/outputs/reconstructed_pedigree.pdf +0 -0
- {repare-0.1.0 → repare-0.1.2}/examples/relations.csv +0 -0
- {repare-0.1.0 → repare-0.1.2}/examples/repare.sh +0 -0
- {repare-0.1.0 → repare-0.1.2}/setup.cfg +0 -0
- {repare-0.1.0 → repare-0.1.2}/src/repare/__init__.py +0 -0
- {repare-0.1.0 → repare-0.1.2}/src/repare/pedigree.py +0 -0
- {repare-0.1.0 → repare-0.1.2}/src/repare/pedigree_reconstructor.py +0 -0
- {repare-0.1.0 → repare-0.1.2}/src/repare.egg-info/dependency_links.txt +0 -0
- {repare-0.1.0 → repare-0.1.2}/src/repare.egg-info/entry_points.txt +0 -0
- {repare-0.1.0 → repare-0.1.2}/src/repare.egg-info/requires.txt +0 -0
- {repare-0.1.0 → repare-0.1.2}/src/repare.egg-info/top_level.txt +0 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
cff-version: 1.2.0
|
|
2
|
+
type: software
|
|
3
|
+
title: "repare"
|
|
4
|
+
message: "If you use repare in your work, please cite our preprint below!"
|
|
5
|
+
authors:
|
|
6
|
+
- family-names: Huang
|
|
7
|
+
given-names: Edward C.
|
|
8
|
+
orcid: https://orcid.org/0009-0000-2471-0531
|
|
9
|
+
- family-names: Li
|
|
10
|
+
given-names: Kevin A.
|
|
11
|
+
orcid: https://orcid.org/0009-0009-0446-6135
|
|
12
|
+
- family-names: Narasimhan
|
|
13
|
+
given-names: Vagheesh M.
|
|
14
|
+
orcid: https://orcid.org/0000-0001-8651-8844
|
|
15
|
+
repository-code: "https://github.com/ehuangc/repare"
|
|
16
|
+
|
|
17
|
+
preferred-citation:
|
|
18
|
+
type: article
|
|
19
|
+
title: "Fault-tolerant pedigree reconstruction from pairwise kinship relations"
|
|
20
|
+
authors:
|
|
21
|
+
- family-names: Huang
|
|
22
|
+
given-names: Edward C.
|
|
23
|
+
- family-names: Li
|
|
24
|
+
given-names: Kevin A.
|
|
25
|
+
- family-names: Narasimhan
|
|
26
|
+
given-names: Vagheesh M.
|
|
27
|
+
journal: "bioRxiv"
|
|
28
|
+
status: preprint
|
|
29
|
+
date-published: 2025-08-26
|
|
30
|
+
doi: 10.1101/2025.08.21.671608
|
|
31
|
+
url: "https://doi.org/10.1101/2025.08.21.671608"
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: repare
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.2
|
|
4
4
|
Summary: Reconstruct (ancient) pedigrees from pairwise kinship relations.
|
|
5
5
|
Author-email: Edward Huang <edwardhuangc@gmail.com>
|
|
6
6
|
License-Expression: MIT
|
|
7
|
+
Project-URL: Source, https://github.com/ehuangc/repare
|
|
7
8
|
Requires-Python: >=3.10
|
|
8
9
|
Description-Content-Type: text/markdown
|
|
9
10
|
License-File: LICENSE
|
|
@@ -18,7 +19,7 @@ Provides-Extra: plot
|
|
|
18
19
|
Requires-Dist: pygraphviz; extra == "plot"
|
|
19
20
|
Dynamic: license-file
|
|
20
21
|
|
|
21
|
-
|
|
22
|
+
🌲 **repare** is a Python package for (ancient) pedigree reconstruction.
|
|
22
23
|
|
|
23
24
|
## Installation
|
|
24
25
|
|
|
@@ -28,12 +29,14 @@ conda create -n "repare" -c conda-forge python=3.13 pygraphviz matplotlib networ
|
|
|
28
29
|
conda activate repare
|
|
29
30
|
pip install repare
|
|
30
31
|
```
|
|
31
|
-
repare uses PyGraphviz to plot reconstructed pedigrees. Since PyGraphviz relies on Graphviz which cannot be installed using `pip`, we recommend installing repare and its dependencies in a fresh conda environment, as shown above.
|
|
32
|
+
repare uses PyGraphviz to plot reconstructed pedigrees. Since PyGraphviz relies on Graphviz which cannot be installed using `pip`, we recommend installing repare and its dependencies in a fresh conda environment, as shown above. This conda-based installation method automatically installs Graphviz and ensures PyGraphviz is linked to it.
|
|
32
33
|
|
|
33
|
-
|
|
34
|
+
To install conda, see [this page](https://www.anaconda.com/docs/getting-started/miniconda/install).
|
|
34
35
|
|
|
35
|
-
|
|
36
|
+
### Other
|
|
37
|
+
If you don't need to plot reconstructed pedigrees, you can install repare directly with `pip install repare`. If you need to plot reconstructed pedigrees but have your own Graphviz installation, you can install repare and Pygraphviz (and not Graphviz) with `pip install repare[plot]`.
|
|
36
38
|
|
|
39
|
+
To install PyGraphviz and Graphviz (yourself), see [this page](https://pygraphviz.github.io/documentation/stable/install.html).
|
|
37
40
|
|
|
38
41
|
## Usage
|
|
39
42
|
|
|
@@ -47,7 +50,7 @@ repare -n NODES -r RELATIONS [-o OUTPUT] [-m MAX_CANDIDATE_PEDIGREES] [-e EPSILO
|
|
|
47
50
|
> ```
|
|
48
51
|
> repare -n nodes.csv -r relations.csv
|
|
49
52
|
> ```
|
|
50
|
-
> For example data inputs, see [examples/nodes.csv](examples/nodes.csv) and [examples/relations.csv](examples/relations.csv).
|
|
53
|
+
> For example data inputs, see [examples/nodes.csv](https://github.com/ehuangc/repare/blob/main/examples/nodes.csv) and [examples/relations.csv](https://github.com/ehuangc/repare/blob/main/examples/relations.csv).
|
|
51
54
|
|
|
52
55
|
### Inputs
|
|
53
56
|
**Nodes** (-n) (*required*): Path to a CSV file that contains information about the individuals to be analyzed by repare.
|
|
@@ -99,7 +102,7 @@ repare -n NODES -r RELATIONS [-o OUTPUT] [-m MAX_CANDIDATE_PEDIGREES] [-e EPSILO
|
|
|
99
102
|
**Verbose** (-v) (*flag*): If set, enable verbose output (INFO-level logging).
|
|
100
103
|
|
|
101
104
|
<p align="center">
|
|
102
|
-
<img src="examples/algorithm_diagram.svg" alt="Reconstruction Process Diagram"
|
|
105
|
+
<img src="https://raw.githubusercontent.com/ehuangc/repare/main/examples/algorithm_diagram.svg" alt="Reconstruction Process Diagram" />
|
|
103
106
|
<br>
|
|
104
107
|
<em>Diagram of repare's pedigree reconstruction process</em>
|
|
105
108
|
</p>
|
|
@@ -118,3 +121,20 @@ python benchmarks/published/run_parameter_experiment.py
|
|
|
118
121
|
exit
|
|
119
122
|
```
|
|
120
123
|
To install pixi, see [this page](https://pixi.sh/latest/installation/).
|
|
124
|
+
|
|
125
|
+
## Citation
|
|
126
|
+
If you use repare in your work, please cite our preprint:
|
|
127
|
+
|
|
128
|
+
> Huang, E. C., Li, K. A., & Narasimhan, V. M. (2025). Fault-tolerant pedigree reconstruction from pairwise kinship relations. bioRxiv. [https://doi.org/10.1101/2025.08.21.671608](https://doi.org/10.1101/2025.08.21.671608)
|
|
129
|
+
|
|
130
|
+
```
|
|
131
|
+
@article{repare_preprint2025,
|
|
132
|
+
doi = {10.1101/2025.08.21.671608},
|
|
133
|
+
author = {Huang, Edward C. and Li, Kevin A. and Narasimhan, Vagheesh M.},
|
|
134
|
+
title = {Fault-tolerant pedigree reconstruction from pairwise kinship relations},
|
|
135
|
+
journal = {bioRxiv},
|
|
136
|
+
month = {aug},
|
|
137
|
+
year = {2025},
|
|
138
|
+
url = {https://doi.org/10.1101/2025.08.21.671608},
|
|
139
|
+
}
|
|
140
|
+
```
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
🌲 **repare** is a Python package for (ancient) pedigree reconstruction.
|
|
2
2
|
|
|
3
3
|
## Installation
|
|
4
4
|
|
|
@@ -8,12 +8,14 @@ conda create -n "repare" -c conda-forge python=3.13 pygraphviz matplotlib networ
|
|
|
8
8
|
conda activate repare
|
|
9
9
|
pip install repare
|
|
10
10
|
```
|
|
11
|
-
repare uses PyGraphviz to plot reconstructed pedigrees. Since PyGraphviz relies on Graphviz which cannot be installed using `pip`, we recommend installing repare and its dependencies in a fresh conda environment, as shown above.
|
|
11
|
+
repare uses PyGraphviz to plot reconstructed pedigrees. Since PyGraphviz relies on Graphviz which cannot be installed using `pip`, we recommend installing repare and its dependencies in a fresh conda environment, as shown above. This conda-based installation method automatically installs Graphviz and ensures PyGraphviz is linked to it.
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
To install conda, see [this page](https://www.anaconda.com/docs/getting-started/miniconda/install).
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
### Other
|
|
16
|
+
If you don't need to plot reconstructed pedigrees, you can install repare directly with `pip install repare`. If you need to plot reconstructed pedigrees but have your own Graphviz installation, you can install repare and Pygraphviz (and not Graphviz) with `pip install repare[plot]`.
|
|
16
17
|
|
|
18
|
+
To install PyGraphviz and Graphviz (yourself), see [this page](https://pygraphviz.github.io/documentation/stable/install.html).
|
|
17
19
|
|
|
18
20
|
## Usage
|
|
19
21
|
|
|
@@ -27,7 +29,7 @@ repare -n NODES -r RELATIONS [-o OUTPUT] [-m MAX_CANDIDATE_PEDIGREES] [-e EPSILO
|
|
|
27
29
|
> ```
|
|
28
30
|
> repare -n nodes.csv -r relations.csv
|
|
29
31
|
> ```
|
|
30
|
-
> For example data inputs, see [examples/nodes.csv](examples/nodes.csv) and [examples/relations.csv](examples/relations.csv).
|
|
32
|
+
> For example data inputs, see [examples/nodes.csv](https://github.com/ehuangc/repare/blob/main/examples/nodes.csv) and [examples/relations.csv](https://github.com/ehuangc/repare/blob/main/examples/relations.csv).
|
|
31
33
|
|
|
32
34
|
### Inputs
|
|
33
35
|
**Nodes** (-n) (*required*): Path to a CSV file that contains information about the individuals to be analyzed by repare.
|
|
@@ -79,7 +81,7 @@ repare -n NODES -r RELATIONS [-o OUTPUT] [-m MAX_CANDIDATE_PEDIGREES] [-e EPSILO
|
|
|
79
81
|
**Verbose** (-v) (*flag*): If set, enable verbose output (INFO-level logging).
|
|
80
82
|
|
|
81
83
|
<p align="center">
|
|
82
|
-
<img src="examples/algorithm_diagram.svg" alt="Reconstruction Process Diagram"
|
|
84
|
+
<img src="https://raw.githubusercontent.com/ehuangc/repare/main/examples/algorithm_diagram.svg" alt="Reconstruction Process Diagram" />
|
|
83
85
|
<br>
|
|
84
86
|
<em>Diagram of repare's pedigree reconstruction process</em>
|
|
85
87
|
</p>
|
|
@@ -98,3 +100,20 @@ python benchmarks/published/run_parameter_experiment.py
|
|
|
98
100
|
exit
|
|
99
101
|
```
|
|
100
102
|
To install pixi, see [this page](https://pixi.sh/latest/installation/).
|
|
103
|
+
|
|
104
|
+
## Citation
|
|
105
|
+
If you use repare in your work, please cite our preprint:
|
|
106
|
+
|
|
107
|
+
> Huang, E. C., Li, K. A., & Narasimhan, V. M. (2025). Fault-tolerant pedigree reconstruction from pairwise kinship relations. bioRxiv. [https://doi.org/10.1101/2025.08.21.671608](https://doi.org/10.1101/2025.08.21.671608)
|
|
108
|
+
|
|
109
|
+
```
|
|
110
|
+
@article{repare_preprint2025,
|
|
111
|
+
doi = {10.1101/2025.08.21.671608},
|
|
112
|
+
author = {Huang, Edward C. and Li, Kevin A. and Narasimhan, Vagheesh M.},
|
|
113
|
+
title = {Fault-tolerant pedigree reconstruction from pairwise kinship relations},
|
|
114
|
+
journal = {bioRxiv},
|
|
115
|
+
month = {aug},
|
|
116
|
+
year = {2025},
|
|
117
|
+
url = {https://doi.org/10.1101/2025.08.21.671608},
|
|
118
|
+
}
|
|
119
|
+
```
|
|
@@ -34,7 +34,7 @@ class SimulatedPedigree:
|
|
|
34
34
|
self._mean_children_per_mate = 2
|
|
35
35
|
self._sd_children_per_mate = 1
|
|
36
36
|
self._num_generations = 4
|
|
37
|
-
self.
|
|
37
|
+
self._generation_zero_starting_size = 3
|
|
38
38
|
|
|
39
39
|
# Probability that a node will be masked (i.e., not included in node data)
|
|
40
40
|
self._p_mask_node = p_mask_node
|
|
@@ -70,7 +70,7 @@ class SimulatedPedigree:
|
|
|
70
70
|
def create_pedigree(self) -> None:
|
|
71
71
|
self._create_node(generation=0, sex="M", can_have_children=True)
|
|
72
72
|
self._create_node(generation=0, sex="F", can_have_children=True)
|
|
73
|
-
for _ in range(self.
|
|
73
|
+
for _ in range(self._generation_zero_starting_size - 2):
|
|
74
74
|
self._create_node(generation=0)
|
|
75
75
|
|
|
76
76
|
for generation in range(self._num_generations - 1):
|
|
@@ -6292,8 +6292,8 @@ packages:
|
|
|
6292
6292
|
timestamp: 1740379663071
|
|
6293
6293
|
- pypi: ./
|
|
6294
6294
|
name: repare
|
|
6295
|
-
version: 0.
|
|
6296
|
-
sha256:
|
|
6295
|
+
version: 0.1.2.dev7+gf68ea5614.d20250828
|
|
6296
|
+
sha256: 0f172b4560db64d24d092d7dbf70afac9f6349e0ba36ef203aa736eedc57ee69
|
|
6297
6297
|
requires_dist:
|
|
6298
6298
|
- matplotlib
|
|
6299
6299
|
- networkx
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import argparse
|
|
2
2
|
import logging
|
|
3
3
|
import os
|
|
4
|
+
from datetime import datetime
|
|
4
5
|
|
|
5
6
|
from tqdm.contrib.logging import logging_redirect_tqdm
|
|
6
7
|
|
|
@@ -8,15 +9,17 @@ from repare.pedigree_reconstructor import PedigreeReconstructor
|
|
|
8
9
|
|
|
9
10
|
|
|
10
11
|
def parse_arguments():
|
|
11
|
-
parser = argparse.ArgumentParser(description="
|
|
12
|
+
parser = argparse.ArgumentParser(description="Reconstruct (ancient) pedigrees from pairwise kinship relations.")
|
|
12
13
|
parser.add_argument("-n", "--nodes", type=str, required=True, help="Path to the nodes CSV file.")
|
|
13
14
|
parser.add_argument("-r", "--relations", type=str, required=True, help="Path to the relations CSV file.")
|
|
14
15
|
parser.add_argument(
|
|
15
16
|
"-o",
|
|
16
17
|
"--output",
|
|
17
18
|
type=str,
|
|
18
|
-
default=
|
|
19
|
-
help=
|
|
19
|
+
default=datetime.now().strftime("repare_output_%Y%m%d_%H%M%S"),
|
|
20
|
+
help=(
|
|
21
|
+
"Directory to save the output files. Defaults to repare_output_<YYYYMMDD_HHMMSS> in the current directory."
|
|
22
|
+
),
|
|
20
23
|
)
|
|
21
24
|
parser.add_argument(
|
|
22
25
|
"-m",
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: repare
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.2
|
|
4
4
|
Summary: Reconstruct (ancient) pedigrees from pairwise kinship relations.
|
|
5
5
|
Author-email: Edward Huang <edwardhuangc@gmail.com>
|
|
6
6
|
License-Expression: MIT
|
|
7
|
+
Project-URL: Source, https://github.com/ehuangc/repare
|
|
7
8
|
Requires-Python: >=3.10
|
|
8
9
|
Description-Content-Type: text/markdown
|
|
9
10
|
License-File: LICENSE
|
|
@@ -18,7 +19,7 @@ Provides-Extra: plot
|
|
|
18
19
|
Requires-Dist: pygraphviz; extra == "plot"
|
|
19
20
|
Dynamic: license-file
|
|
20
21
|
|
|
21
|
-
|
|
22
|
+
🌲 **repare** is a Python package for (ancient) pedigree reconstruction.
|
|
22
23
|
|
|
23
24
|
## Installation
|
|
24
25
|
|
|
@@ -28,12 +29,14 @@ conda create -n "repare" -c conda-forge python=3.13 pygraphviz matplotlib networ
|
|
|
28
29
|
conda activate repare
|
|
29
30
|
pip install repare
|
|
30
31
|
```
|
|
31
|
-
repare uses PyGraphviz to plot reconstructed pedigrees. Since PyGraphviz relies on Graphviz which cannot be installed using `pip`, we recommend installing repare and its dependencies in a fresh conda environment, as shown above.
|
|
32
|
+
repare uses PyGraphviz to plot reconstructed pedigrees. Since PyGraphviz relies on Graphviz which cannot be installed using `pip`, we recommend installing repare and its dependencies in a fresh conda environment, as shown above. This conda-based installation method automatically installs Graphviz and ensures PyGraphviz is linked to it.
|
|
32
33
|
|
|
33
|
-
|
|
34
|
+
To install conda, see [this page](https://www.anaconda.com/docs/getting-started/miniconda/install).
|
|
34
35
|
|
|
35
|
-
|
|
36
|
+
### Other
|
|
37
|
+
If you don't need to plot reconstructed pedigrees, you can install repare directly with `pip install repare`. If you need to plot reconstructed pedigrees but have your own Graphviz installation, you can install repare and Pygraphviz (and not Graphviz) with `pip install repare[plot]`.
|
|
36
38
|
|
|
39
|
+
To install PyGraphviz and Graphviz (yourself), see [this page](https://pygraphviz.github.io/documentation/stable/install.html).
|
|
37
40
|
|
|
38
41
|
## Usage
|
|
39
42
|
|
|
@@ -47,7 +50,7 @@ repare -n NODES -r RELATIONS [-o OUTPUT] [-m MAX_CANDIDATE_PEDIGREES] [-e EPSILO
|
|
|
47
50
|
> ```
|
|
48
51
|
> repare -n nodes.csv -r relations.csv
|
|
49
52
|
> ```
|
|
50
|
-
> For example data inputs, see [examples/nodes.csv](examples/nodes.csv) and [examples/relations.csv](examples/relations.csv).
|
|
53
|
+
> For example data inputs, see [examples/nodes.csv](https://github.com/ehuangc/repare/blob/main/examples/nodes.csv) and [examples/relations.csv](https://github.com/ehuangc/repare/blob/main/examples/relations.csv).
|
|
51
54
|
|
|
52
55
|
### Inputs
|
|
53
56
|
**Nodes** (-n) (*required*): Path to a CSV file that contains information about the individuals to be analyzed by repare.
|
|
@@ -99,7 +102,7 @@ repare -n NODES -r RELATIONS [-o OUTPUT] [-m MAX_CANDIDATE_PEDIGREES] [-e EPSILO
|
|
|
99
102
|
**Verbose** (-v) (*flag*): If set, enable verbose output (INFO-level logging).
|
|
100
103
|
|
|
101
104
|
<p align="center">
|
|
102
|
-
<img src="examples/algorithm_diagram.svg" alt="Reconstruction Process Diagram"
|
|
105
|
+
<img src="https://raw.githubusercontent.com/ehuangc/repare/main/examples/algorithm_diagram.svg" alt="Reconstruction Process Diagram" />
|
|
103
106
|
<br>
|
|
104
107
|
<em>Diagram of repare's pedigree reconstruction process</em>
|
|
105
108
|
</p>
|
|
@@ -118,3 +121,20 @@ python benchmarks/published/run_parameter_experiment.py
|
|
|
118
121
|
exit
|
|
119
122
|
```
|
|
120
123
|
To install pixi, see [this page](https://pixi.sh/latest/installation/).
|
|
124
|
+
|
|
125
|
+
## Citation
|
|
126
|
+
If you use repare in your work, please cite our preprint:
|
|
127
|
+
|
|
128
|
+
> Huang, E. C., Li, K. A., & Narasimhan, V. M. (2025). Fault-tolerant pedigree reconstruction from pairwise kinship relations. bioRxiv. [https://doi.org/10.1101/2025.08.21.671608](https://doi.org/10.1101/2025.08.21.671608)
|
|
129
|
+
|
|
130
|
+
```
|
|
131
|
+
@article{repare_preprint2025,
|
|
132
|
+
doi = {10.1101/2025.08.21.671608},
|
|
133
|
+
author = {Huang, Edward C. and Li, Kevin A. and Narasimhan, Vagheesh M.},
|
|
134
|
+
title = {Fault-tolerant pedigree reconstruction from pairwise kinship relations},
|
|
135
|
+
journal = {bioRxiv},
|
|
136
|
+
month = {aug},
|
|
137
|
+
year = {2025},
|
|
138
|
+
url = {https://doi.org/10.1101/2025.08.21.671608},
|
|
139
|
+
}
|
|
140
|
+
```
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{repare-0.1.0 → repare-0.1.2}/benchmarks/published/data/hazleton_north/inferred_relations_coeffs.csv
RENAMED
|
File without changes
|
{repare-0.1.0 → repare-0.1.2}/benchmarks/published/data/hazleton_north/inferred_relations_custom.csv
RENAMED
|
File without changes
|
|
File without changes
|
{repare-0.1.0 → repare-0.1.2}/benchmarks/published/data/hazleton_north/published_exact_relations.csv
RENAMED
|
File without changes
|
|
File without changes
|
{repare-0.1.0 → repare-0.1.2}/benchmarks/published/data/nepluyevsky/inferred_relations_KIN.csv
RENAMED
|
File without changes
|
{repare-0.1.0 → repare-0.1.2}/benchmarks/published/data/nepluyevsky/inferred_relations_custom.csv
RENAMED
|
File without changes
|
|
File without changes
|
{repare-0.1.0 → repare-0.1.2}/benchmarks/published/data/nepluyevsky/published_exact_relations.csv
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{repare-0.1.0 → repare-0.1.2}/benchmarks/published/results/gurgy_comparison/inferred_pedigree.svg
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{repare-0.1.0 → repare-0.1.2}/benchmarks/published/results/gurgy_comparison/published_pedigree.svg
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{repare-0.1.0 → repare-0.1.2}/benchmarks/published/results/gurgy_comparison/relation_differences.csv
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|