Skip to content

Commit

Permalink
update tutorials
Browse files Browse the repository at this point in the history
  • Loading branch information
kaizhang committed Sep 10, 2023
1 parent 1aaac4e commit 7a2c999
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 11 deletions.
3 changes: 2 additions & 1 deletion docs/_static/versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
{
"name": "2.3.1 (stable)",
"version": "2.3.1",
"url": "https://kzhang.org/SnapATAC2/version/2.3.1/"
"url": "https://kzhang.org/SnapATAC2/version/2.3.1/",
"preferred": true
},
{
"name": "2.3.0",
Expand Down
11 changes: 10 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,20 @@
switcher_version = f"{version}"

html_theme_options = {
"logo": {
"text": "SnapATAC2",
"image_dark": "_static/logo-dark.svg",
"alt_text": "SnapATAC2",
},

"github_url": "https://github.com/kaizhang/SnapATAC2",
"external_links": [
{"name": "Learn", "url": "https://kzhang.org/epigenomics-analysis/"}
],
"navbar_end": ["version-switcher", "theme-switcher", "navbar-icon-links"],

"navbar_center": ["version-switcher", "navbar-nav"],
"navbar_end": ["theme-switcher", "navbar-icon-links"],
"show_version_warning_banner": True,

"switcher": {
"version_match": switcher_version,
Expand Down
4 changes: 2 additions & 2 deletions docs/tutorials/integration.ipynb
Git LFS file not shown
4 changes: 2 additions & 2 deletions docs/tutorials/pbmc.ipynb
Git LFS file not shown
2 changes: 1 addition & 1 deletion snapatac2-python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"MACS2>=2.2.7",
"natsort",
"numpy>=1.16.0",
"pandas",
"pandas>=1.0",
"plotly>=5.6.0",
"polars>=0.14.0, <=0.18.0",
"pooch>=1.6.0",
Expand Down
6 changes: 5 additions & 1 deletion snapatac2-python/snapatac2/preprocessing/_knn.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ def knn(
"""
Compute a neighborhood graph of observations.
Computes a neighborhood graph of observations stored in `adata` using
the method specified by `method`. The distance metric used is Euclidean.
Parameters
----------
adata
Expand All @@ -32,7 +35,8 @@ def knn(
use_rep
The key for the matrix
method
'hora', 'pynndescent', or 'exact'
'hora', 'pynndescent', or 'exact'. The default is 'hora', which uses the
HNSW algorithm to approximate the nearest neighbors.
n_jobs
number of CPUs to use
inplace
Expand Down
6 changes: 3 additions & 3 deletions snapatac2-python/tests/test_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ def h5ad(dir=Path("./")):
dir.mkdir(exist_ok=True)
return str(dir / Path(str(uuid.uuid4()) + ".h5ad"))

'''
def test_exclude():
fragment_file = snap.datasets.pbmc500(True)

Expand Down Expand Up @@ -49,8 +48,7 @@ def test_backed(tmp_path):
snap.pp.knn(data)
snap.tl.leiden(data)

snap.pp.make_gene_matrix(data, gene_anno=snap.genome.hg38, file = h5ad(tmp_path))
'''
snap.pp.make_gene_matrix(data, gene_anno=snap.genome.hg38, file=h5ad(tmp_path))

def test_in_memory():
fragment_file = snap.datasets.pbmc500(True)
Expand All @@ -63,6 +61,8 @@ def test_in_memory():
snap.pp.add_tile_matrix(data)

snap.pp.filter_cells(data)
snap.pp.select_features(data, whitelist=snap.datasets.cre_HEA())
snap.pp.select_features(data, blacklist=snap.datasets.cre_HEA())
snap.pp.select_features(data)

snap.tl.spectral(data, sample_size=100)
Expand Down

0 comments on commit 7a2c999

Please sign in to comment.