Skip to content

Better defaults for chunks parameters #704

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions malariagen_data/anoph/base_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
single_contig_param_type,
single_region_param_type,
chunks_param_type,
zarr_chunks_type,
dask_chunks_type,
)

contig: TypeAlias = Annotated[
Expand Down Expand Up @@ -256,6 +258,13 @@ def validate_sample_selection_params(
# amounts of data.
native_chunks: chunks = "native"


def call_chunks_func(zarr_chunks: zarr_chunks_type) -> dask_chunks_type:
return tuple([10 * i for i in zarr_chunks])


call_chunks: chunks = call_chunks_func

gff_attributes: TypeAlias = Annotated[
Optional[Union[Sequence[str], str]],
"""
Expand Down
2 changes: 1 addition & 1 deletion malariagen_data/anoph/pca.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def pca(
fit_exclude_samples: Optional[base_params.samples] = None,
random_seed: base_params.random_seed = 42,
inline_array: base_params.inline_array = base_params.inline_array_default,
chunks: base_params.chunks = base_params.native_chunks,
chunks: base_params.chunks = base_params.call_chunks,
) -> Tuple[pca_params.df_pca, pca_params.evr]:
# Change this name if you ever change the behaviour of this function, to
# invalidate any previously cached data.
Expand Down
Loading