Skip to content

Commit d4a6f73

Browse files
authored
Merge pull request #66 from eric-czech/regenie_wgr
REGENIE Implementation
2 parents f4d3087 + 53352af commit d4a6f73

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+5275
-36
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ dmypy.json
131131
# IDE
132132
.vscode
133133
.idea
134+
.DS_Store
134135

135136
# sgkit
136137
docs/generated

requirements-dev.txt

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ codecov
22
pre-commit
33
pytest
44
pytest-cov
5+
pytest-datadir
56
hypothesis
7+
statsmodels
8+
zarr
69
sphinx
710
sphinx_rtd_theme
8-
statsmodels

requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
numpy
22
xarray
33
dask[array]
4-
scipy
4+
scipy

setup.cfg

+10-2
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ python_requires = >=3.6
2727
install_requires =
2828
numpy
2929
xarray
30+
dask[array]
31+
scipy
3032
setuptools >= 41.2 # For pkg_resources
3133
setup_requires =
3234
setuptools >= 41.2
@@ -36,7 +38,7 @@ setup_requires =
3638
fail_under = 100
3739

3840
[tool:pytest]
39-
addopts = --doctest-modules
41+
addopts = --doctest-modules --ignore=validation
4042
norecursedirs = .eggs docs
4143

4244
[flake8]
@@ -55,7 +57,7 @@ ignore =
5557
profile = black
5658
default_section = THIRDPARTY
5759
known_first_party = sgkit
58-
known_third_party = dask,hypothesis,numpy,pandas,pytest,setuptools,xarray
60+
known_third_party = dask,fire,glow,hail,hypothesis,invoke,numpy,pandas,pkg_resources,pyspark,pytest,setuptools,sgkit_plink,xarray,yaml,zarr
5961
multi_line_output = 3
6062
include_trailing_comma = True
6163
force_grid_wrap = 0
@@ -74,7 +76,13 @@ ignore_missing_imports = True
7476
ignore_missing_imports = True
7577
[mypy-hypothesis.*]
7678
ignore_missing_imports = True
79+
[mypy-zarr.*]
80+
ignore_missing_imports = True
7781
[mypy-setuptools]
7882
ignore_missing_imports = True
83+
[mypy-sgkit.*]
84+
allow_redefinition = True
7985
[mypy-sgkit.tests.*]
8086
disallow_untyped_defs = False
87+
[mypy-validation.*]
88+
ignore_errors = True

sgkit/__init__.py

+2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
from .display import display_genotypes
1010
from .stats.aggregation import count_alleles
1111
from .stats.association import gwas_linear_regression
12+
from .stats.regenie import regenie
1213

1314
__all__ = [
1415
"DIM_ALLELE",
@@ -20,4 +21,5 @@
2021
"create_genotype_dosage_dataset",
2122
"display_genotypes",
2223
"gwas_linear_regression",
24+
"regenie",
2325
]

sgkit/stats/aggregation.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def count_alleles(ds: Dataset) -> DataArray:
5555
CT = da.map_blocks(
5656
lambda x: np.apply_along_axis(np.bincount, 1, x, minlength=max_allele),
5757
G,
58-
chunks=(G.chunks[0], max_allele), # type: ignore[index]
58+
chunks=(G.chunks[0], max_allele),
5959
)
6060
assert CT.shape == (n_variant, G.numblocks[1] * max_allele)
6161

0 commit comments

Comments
 (0)