Skip to content

Commit

Permalink
update tutorial
Browse files Browse the repository at this point in the history
  • Loading branch information
kaizhang committed Oct 9, 2023
1 parent 8e3feb6 commit 260de50
Show file tree
Hide file tree
Showing 9 changed files with 26 additions and 17 deletions.
8 changes: 3 additions & 5 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: >
Expand Down
12 changes: 8 additions & 4 deletions docs/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
---------------------------------
Expand Down
4 changes: 2 additions & 2 deletions docs/tutorials/diff.ipynb
Git LFS file not shown
4 changes: 2 additions & 2 deletions snapatac2-python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion snapatac2-python/snapatac2/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "2.5.0dev2"
__version__ = "2.5.0dev3"
7 changes: 7 additions & 0 deletions snapatac2-python/snapatac2/plotting/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion snapatac2-python/snapatac2/tools/_clustering.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion snapatac2-python/snapatac2/tools/_embedding.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 260de50

Please sign in to comment.