Skip to content

Commit 05fa77d

Browse files
committed
PCA implementation #95
1 parent b83ca1b commit 05fa77d

11 files changed

+878
-4
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@ repos:
2626
hooks:
2727
- id: mypy
2828
args: ["--strict", "--show-error-codes"]
29-
additional_dependencies: ["numpy", "xarray", "dask[array]", "scipy", "typing-extensions", "zarr", "numba"]
29+
additional_dependencies: ["numpy", "xarray", "dask[array]", "scipy", "typing-extensions", "zarr", "numba", "dask-ml"]

requirements-dev.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ pytest-cov
66
pytest-datadir
77
pytest-mock
88
hypothesis
9+
scikit-allel
910
statsmodels
1011
zarr
1112
msprime
@@ -18,3 +19,4 @@ git+https://github.com/pangeo-data/rechunker.git
1819
cbgen
1920
cyvcf2; platform_system != "Windows"
2021
yarl
22+
matplotlib

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
numpy
22
xarray
33
dask[array]
4+
dask-ml
45
scipy
56
typing-extensions
67
numba

setup.cfg

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ install_requires =
2828
numpy
2929
xarray
3030
dask[array]
31+
dask-ml
3132
scipy
3233
zarr
3334
numba
@@ -87,15 +88,14 @@ ignore =
8788
profile = black
8889
default_section = THIRDPARTY
8990
known_first_party = sgkit
90-
known_third_party = dask,fire,glow,hail,hypothesis,invoke,msprime,numba,numpy,pandas,pkg_resources,pyspark,pytest,setuptools,sgkit_plink,sklearn,sphinx,typing_extensions,xarray,yaml,zarr
91+
known_third_party = allel,dask,fire,glow,hail,hypothesis,invoke,msprime,numba,numpy,pandas,pkg_resources,pyspark,pytest,setuptools,sgkit_plink,sklearn,sphinx,typing_extensions,xarray,yaml,zarr
9192
multi_line_output = 3
9293
include_trailing_comma = True
9394
force_grid_wrap = 0
9495
use_parentheses = True
9596
line_length = 88
9697

97-
[mypy-allel.*]
98-
ignore_missing_imports = True
98+
9999
[mypy-callee.*]
100100
ignore_missing_imports = True
101101
[mypy-cyvcf2.*]
@@ -104,6 +104,8 @@ ignore_missing_imports = True
104104
ignore_missing_imports = True
105105
[mypy-fsspec.*]
106106
ignore_missing_imports = True
107+
[mypy-dask_ml.*]
108+
ignore_missing_imports = True
107109
[mypy-numpy.*]
108110
ignore_missing_imports = True
109111
[mypy-pandas.*]
@@ -132,6 +134,8 @@ ignore_missing_imports = True
132134
ignore_missing_imports = True
133135
[mypy-yarl.*]
134136
ignore_missing_imports = True
137+
[mypy-allel.*]
138+
ignore_missing_imports = True
135139
[mypy-sgkit.*]
136140
allow_redefinition = True
137141
[mypy-sgkit.*.tests.*]

sgkit/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
from .stats.association import gwas_linear_regression
1313
from .stats.hwe import hardy_weinberg_test
1414
from .stats.pc_relate import pc_relate
15+
from .stats.pca import pca
1516
from .stats.popgen import Fst, Tajimas_D, divergence, diversity
1617
from .stats.regenie import regenie
1718
from .testing import simulate_genotype_call_dataset
@@ -38,4 +39,5 @@
3839
"pc_relate",
3940
"simulate_genotype_call_dataset",
4041
"variables",
42+
"pca",
4143
]

0 commit comments

Comments
 (0)