argile 0.0.1__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.
- argile-0.0.1/.gitignore +22 -0
- argile-0.0.1/CHANGELOG.rst +5 -0
- argile-0.0.1/LICENSE +21 -0
- argile-0.0.1/PKG-INFO +67 -0
- argile-0.0.1/README.md +32 -0
- argile-0.0.1/argile/__init__.py +4 -0
- argile-0.0.1/argile/likelihood.py +596 -0
- argile-0.0.1/argile/locate.py +265 -0
- argile-0.0.1/argile/main.py +310 -0
- argile-0.0.1/argile/migration_matrix.py +55 -0
- argile-0.0.1/argile/world_map.py +233 -0
- argile-0.0.1/argile.egg-info/PKG-INFO +67 -0
- argile-0.0.1/argile.egg-info/SOURCES.txt +18 -0
- argile-0.0.1/argile.egg-info/dependency_links.txt +1 -0
- argile-0.0.1/argile.egg-info/requires.txt +5 -0
- argile-0.0.1/argile.egg-info/top_level.txt +1 -0
- argile-0.0.1/pyproject.toml +56 -0
- argile-0.0.1/requirements.txt +5 -0
- argile-0.0.1/setup.cfg +4 -0
- argile-0.0.1/setup.py +8 -0
argile-0.0.1/.gitignore
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
.DS_Store
|
|
2
|
+
.ipynb_checkpoints/
|
|
3
|
+
datasets/
|
|
4
|
+
meeting_figures/
|
|
5
|
+
scripts_to_remove/
|
|
6
|
+
__pycache__/
|
|
7
|
+
terracotta/to_delete.py
|
|
8
|
+
devlog/overview.md
|
|
9
|
+
devlog/threads.md
|
|
10
|
+
slim/
|
|
11
|
+
papers/
|
|
12
|
+
.vscode/
|
|
13
|
+
devlog/20250501/assets/hexagonal_world_map/world_elevation.tif
|
|
14
|
+
devlog/20250501/assets/hexagonal_world_map/ETOPO2v2c_f4.nc
|
|
15
|
+
devlog/20250630/assets/maize_from_regina/
|
|
16
|
+
devlog/20250801/assets/chimps
|
|
17
|
+
devlog/20250801/assets/gis_tooling/gis/elevation
|
|
18
|
+
devlog/20250801/assets/redoing_evolution_example/dataset/starting_files/elevation
|
|
19
|
+
devlog/20250929/assets/low_coverage/dataset/arg.trees
|
|
20
|
+
old/
|
|
21
|
+
dist/
|
|
22
|
+
argile.egg-info/
|
argile-0.0.1/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 James Kitchens
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
argile-0.0.1/PKG-INFO
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: argile
|
|
3
|
+
Version: 0.0.1
|
|
4
|
+
Summary: Estimating migration surfaces and the locations of genetic ancestors from gene trees
|
|
5
|
+
Author-email: James Kitchens <kitchensjn@gmail.com>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/kitchensjn/argile
|
|
8
|
+
Project-URL: Changelog, https://github.com/kitchensjn/argile/blob/main/CHANGELOG.rst
|
|
9
|
+
Project-URL: Bug Tracker, https://github.com/kitchensjn/argile/issues
|
|
10
|
+
Keywords: population genetics,tree sequence,ancestral recombination graph,gene tree,spatial analysis,migration,location
|
|
11
|
+
Classifier: Programming Language :: Python
|
|
12
|
+
Classifier: Programming Language :: Python :: 3
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.7
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
17
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
18
|
+
Classifier: Development Status :: 3 - Alpha
|
|
19
|
+
Classifier: Environment :: Other Environment
|
|
20
|
+
Classifier: Intended Audience :: Science/Research
|
|
21
|
+
Classifier: Operating System :: POSIX
|
|
22
|
+
Classifier: Operating System :: MacOS :: MacOS X
|
|
23
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
24
|
+
Classifier: Topic :: Scientific/Engineering
|
|
25
|
+
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
|
|
26
|
+
Requires-Python: >=3.7
|
|
27
|
+
Description-Content-Type: text/markdown
|
|
28
|
+
License-File: LICENSE
|
|
29
|
+
Requires-Dist: numpy
|
|
30
|
+
Requires-Dist: numba
|
|
31
|
+
Requires-Dist: scipy
|
|
32
|
+
Requires-Dist: pandas
|
|
33
|
+
Requires-Dist: tskit
|
|
34
|
+
Dynamic: license-file
|
|
35
|
+
|
|
36
|
+
# `argile`
|
|
37
|
+
|
|
38
|
+
`argile` (formerly `terracotta`) is a Python package for estimating migration surfaces and the locations of genetic ancestors from gene trees. The latest release is available either here on GitHub or through [PyPI](https://pypi.org/project/argile/). See [example_dataset/](https://github.com/kitchensjn/argile/tree/main/example_dataset) for details about file formats.
|
|
39
|
+
|
|
40
|
+
#### Estimate the most likely migration surface
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
import argile
|
|
44
|
+
|
|
45
|
+
result, loglikelihood = argile.run(
|
|
46
|
+
demes_path="example_dataset/demes.tsv",
|
|
47
|
+
connections_path="example_dataset/connections.tsv",
|
|
48
|
+
samples_path="example_dataset/samples.tsv",
|
|
49
|
+
trees_dir_path="example_dataset/trees",
|
|
50
|
+
output_file="output.tsv"
|
|
51
|
+
)
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
`argile.run()` estimates the most likely migration surface using the `L-BFGS-B` algorithm. It estimates values for the `coefficient` (the default migration rate) and any migration rate modifier variables (here `r0`, `r1`, and `r2`). These variables will be automatically included in this search if present in `connections.tsv`. This fucntion takes the paths to the files as input rather than loading the world map prior.
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
#### Loading the world map
|
|
58
|
+
|
|
59
|
+
```
|
|
60
|
+
import pandas as pd
|
|
61
|
+
import argile
|
|
62
|
+
|
|
63
|
+
demes = pd.read_csv("example_dataset/demes.tsv", sep="\t")
|
|
64
|
+
connections = pd.read_csv("example_dataset/connections.tsv", sep="\t")
|
|
65
|
+
samples = pd.read_csv("example_dataset/samples.tsv", sep="\t")
|
|
66
|
+
world_map = argile.WorldMap(demes, connections, samples)
|
|
67
|
+
```
|
argile-0.0.1/README.md
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# `argile`
|
|
2
|
+
|
|
3
|
+
`argile` (formerly `terracotta`) is a Python package for estimating migration surfaces and the locations of genetic ancestors from gene trees. The latest release is available either here on GitHub or through [PyPI](https://pypi.org/project/argile/). See [example_dataset/](https://github.com/kitchensjn/argile/tree/main/example_dataset) for details about file formats.
|
|
4
|
+
|
|
5
|
+
#### Estimate the most likely migration surface
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
import argile
|
|
9
|
+
|
|
10
|
+
result, loglikelihood = argile.run(
|
|
11
|
+
demes_path="example_dataset/demes.tsv",
|
|
12
|
+
connections_path="example_dataset/connections.tsv",
|
|
13
|
+
samples_path="example_dataset/samples.tsv",
|
|
14
|
+
trees_dir_path="example_dataset/trees",
|
|
15
|
+
output_file="output.tsv"
|
|
16
|
+
)
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
`argile.run()` estimates the most likely migration surface using the `L-BFGS-B` algorithm. It estimates values for the `coefficient` (the default migration rate) and any migration rate modifier variables (here `r0`, `r1`, and `r2`). These variables will be automatically included in this search if present in `connections.tsv`. This fucntion takes the paths to the files as input rather than loading the world map prior.
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
#### Loading the world map
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
import pandas as pd
|
|
26
|
+
import argile
|
|
27
|
+
|
|
28
|
+
demes = pd.read_csv("example_dataset/demes.tsv", sep="\t")
|
|
29
|
+
connections = pd.read_csv("example_dataset/connections.tsv", sep="\t")
|
|
30
|
+
samples = pd.read_csv("example_dataset/samples.tsv", sep="\t")
|
|
31
|
+
world_map = argile.WorldMap(demes, connections, samples)
|
|
32
|
+
```
|