diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 1062d146d..1ac972fcf 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -1,10 +1,8 @@ name: Nightly Run -on: [push] - -#on: -# schedule: -# - cron: '0 0 * * *' # Runs every day at midnight +on: + schedule: + - cron: '0 0 * * *' # Runs every day at midnight jobs: check-for-new-commits: diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 46321056f..aaabff08f 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -19,7 +19,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, macos-11] - python_version: ["cp39-*", "cp310-*", "cp311-*", "cp312-*"] + python_version: ["cp39-*", "cp310-*", "cp311-*"] env: CIBW_BUILD_VERBOSITY: 1 CIBW_BEFORE_ALL_LINUX: > diff --git a/docs/install.md b/docs/install.md index 0732d28bd..5ff328286 100644 --- a/docs/install.md +++ b/docs/install.md @@ -35,11 +35,15 @@ The nightly build is the build from the latest source codes, which includes the latest features, enhancements, and bug fixes that haven't been released. The nightly build can be unstable and include some untested features. -You can download the wheel files of the latest Nightly build from this -[link](https://nightly.link/kaizhang/SnapATAC2/workflows/wheels/main/artifact.zip). +After downloading the +{download}`[Nightly Build](https://nightly.link/kaizhang/SnapATAC2/workflows/wheels/main/artifact.zip).`, +unzip it and then select the appropriate wheel file for your platform and use `pip install` to install it. +For example, if you are using a Linux system with Python 3.8, you can use the following command to install it: -After downloading the file, unzip it and then select the appropriate wheel file -for your platform and use `pip install` to install it. +``` +unzip artifact.zip +pip install snapatac2-x.x.x-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl +``` Build from the latest source code --------------------------------- diff --git a/docs/tutorials/diff.ipynb b/docs/tutorials/diff.ipynb index 1cd65efc8..0c835d728 100644 --- a/docs/tutorials/diff.ipynb +++ b/docs/tutorials/diff.ipynb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:68310f1f3f26258d83b3c3aa5f21868847013715014baa4fe0c5a5109716ae35 -size 489067 +oid sha256:84cb76660722aad6632a652196e373c622c892f7f61d9033fadf1cca8d594604 +size 479337 diff --git a/snapatac2-python/setup.py b/snapatac2-python/setup.py index d17c0566f..d32e44f2f 100644 --- a/snapatac2-python/setup.py +++ b/snapatac2-python/setup.py @@ -32,7 +32,7 @@ "snapatac2.export", ], zip_safe=False, - python_requires=">=3.9", + python_requires=">=3.7", install_requires=[ "anndata>=0.8.0, <0.10.0", "kaleido", @@ -44,7 +44,7 @@ "plotly>=5.6.0", "polars>=0.18.15, <0.20.0", "pooch>=1.6.0", - "igraph>=0.10.0", + "igraph>=0.10.3", "pynndescent", "pyarrow", "pyfaidx", diff --git a/snapatac2-python/snapatac2/_version.py b/snapatac2-python/snapatac2/_version.py index b695a5567..1a3f58cea 100644 --- a/snapatac2-python/snapatac2/_version.py +++ b/snapatac2-python/snapatac2/_version.py @@ -1 +1 @@ -__version__ = "2.5.0dev2" \ No newline at end of file +__version__ = "2.5.0dev3" \ No newline at end of file diff --git a/snapatac2-python/snapatac2/plotting/__init__.py b/snapatac2-python/snapatac2/plotting/__init__.py index d439ae7c0..c79c68edd 100644 --- a/snapatac2-python/snapatac2/plotting/__init__.py +++ b/snapatac2-python/snapatac2/plotting/__init__.py @@ -191,6 +191,13 @@ def regions( import plotly.graph_objects as go peaks = np.concatenate([[x for x in p] for p in peaks.values()]) + n = len(peaks) + if n > 50000: + logging.warning(f"Input contains {n} peaks, only 50000 peaks will be plotted.") + np.random.seed(0) + indices = np.random.choice(n, 50000, replace=False) + peaks = peaks[sorted(indices)] + count = aggregate_X(adata, groupby=groupby, normalize="RPKM") names = count.obs_names count = pl.DataFrame(count.X.T) diff --git a/snapatac2-python/snapatac2/tools/_clustering.py b/snapatac2-python/snapatac2/tools/_clustering.py index fc00f26d0..abb8b5c96 100644 --- a/snapatac2-python/snapatac2/tools/_clustering.py +++ b/snapatac2-python/snapatac2/tools/_clustering.py @@ -108,7 +108,7 @@ def leiden( partition = gr.community_leiden( objective_function=objective_function, weights=weights, - resolution_parameter=resolution, + resolution=resolution, beta=0.01, initial_membership=None, n_iterations=n_iterations, diff --git a/snapatac2-python/snapatac2/tools/_embedding.py b/snapatac2-python/snapatac2/tools/_embedding.py index 083e499f8..822d50a57 100644 --- a/snapatac2-python/snapatac2/tools/_embedding.py +++ b/snapatac2-python/snapatac2/tools/_embedding.py @@ -52,7 +52,7 @@ def umap2( adjacency = adata gr = get_igraph_from_adjacency(adjacency) dist = np.array(gr.es["weight"]) - umap = gr.layout_umap(dist=dist, dim=n_comps, min_dist=0.01, epochs=500) + umap = gr.layout_umap(dist=dist, dim=n_comps, min_dist=0.1, epochs=500) umap = np.array(umap.coords) if inplace: