Skip to content

Commit aaf48d1

Browse files
committed
PCA implementation #95
1 parent cc7aa7f commit aaf48d1

10 files changed

+839
-3
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: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@ pytest
44
pytest-cov
55
pytest-datadir
66
hypothesis
7+
scikit-allel
78
statsmodels
89
zarr
910
msprime
1011
scikit-learn
1112
partd
1213
fsspec
13-
bed-reader
14+
bed-reader
15+
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: 6 additions & 1 deletion
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
@@ -80,7 +81,7 @@ ignore =
8081
profile = black
8182
default_section = THIRDPARTY
8283
known_first_party = sgkit
83-
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
84+
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
8485
multi_line_output = 3
8586
include_trailing_comma = True
8687
force_grid_wrap = 0
@@ -89,6 +90,8 @@ line_length = 88
8990

9091
[mypy-dask.*]
9192
ignore_missing_imports = True
93+
[mypy-dask_ml.*]
94+
ignore_missing_imports = True
9295
[mypy-numpy.*]
9396
ignore_missing_imports = True
9497
[mypy-pandas.*]
@@ -111,6 +114,8 @@ ignore_missing_imports = True
111114
ignore_missing_imports = True
112115
[mypy-bed_reader.*]
113116
ignore_missing_imports = True
117+
[mypy-allel.*]
118+
ignore_missing_imports = True
114119
[mypy-sgkit.*]
115120
allow_redefinition = True
116121
[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

@@ -35,4 +36,5 @@
3536
"Fst",
3637
"Tajimas_D",
3738
"pc_relate",
39+
"pca",
3840
]

0 commit comments

Comments
 (0)