scib-rapids 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- scib_rapids-0.1.0/.codecov.yaml +17 -0
- scib_rapids-0.1.0/.editorconfig +18 -0
- scib_rapids-0.1.0/.github/ISSUE_TEMPLATE/bug_report.yml +33 -0
- scib_rapids-0.1.0/.github/ISSUE_TEMPLATE/config.yml +5 -0
- scib_rapids-0.1.0/.github/ISSUE_TEMPLATE/feature_request.yml +11 -0
- scib_rapids-0.1.0/.github/workflows/build.yaml +29 -0
- scib_rapids-0.1.0/.github/workflows/release.yaml +29 -0
- scib_rapids-0.1.0/.github/workflows/test.yaml +62 -0
- scib_rapids-0.1.0/.gitignore +34 -0
- scib_rapids-0.1.0/.pre-commit-config.yaml +46 -0
- scib_rapids-0.1.0/.readthedocs.yaml +16 -0
- scib_rapids-0.1.0/CHANGELOG.md +20 -0
- scib_rapids-0.1.0/LICENSE +29 -0
- scib_rapids-0.1.0/PKG-INFO +155 -0
- scib_rapids-0.1.0/README.md +84 -0
- scib_rapids-0.1.0/docs/Makefile +20 -0
- scib_rapids-0.1.0/docs/_static/css/custom.css +4 -0
- scib_rapids-0.1.0/docs/_templates/autosummary/class.rst +61 -0
- scib_rapids-0.1.0/docs/api.md +66 -0
- scib_rapids-0.1.0/docs/changelog.md +3 -0
- scib_rapids-0.1.0/docs/conf.py +201 -0
- scib_rapids-0.1.0/docs/contributing.md +146 -0
- scib_rapids-0.1.0/docs/extensions/typed_returns.py +36 -0
- scib_rapids-0.1.0/docs/index.md +14 -0
- scib_rapids-0.1.0/docs/notebooks/lung_example.ipynb +159 -0
- scib_rapids-0.1.0/docs/notebooks/quickstart.ipynb +201 -0
- scib_rapids-0.1.0/docs/references.bib +48 -0
- scib_rapids-0.1.0/docs/references.md +5 -0
- scib_rapids-0.1.0/docs/tutorials.md +9 -0
- scib_rapids-0.1.0/pyproject.toml +139 -0
- scib_rapids-0.1.0/scripts/benchmark_report.py +301 -0
- scib_rapids-0.1.0/setup.py +5 -0
- scib_rapids-0.1.0/src/scib_rapids/__init__.py +36 -0
- scib_rapids-0.1.0/src/scib_rapids/_types.py +6 -0
- scib_rapids-0.1.0/src/scib_rapids/metrics/__init__.py +23 -0
- scib_rapids-0.1.0/src/scib_rapids/metrics/_graph_connectivity.py +36 -0
- scib_rapids-0.1.0/src/scib_rapids/metrics/_isolated_labels.py +71 -0
- scib_rapids-0.1.0/src/scib_rapids/metrics/_kbet.py +169 -0
- scib_rapids-0.1.0/src/scib_rapids/metrics/_lisi.py +91 -0
- scib_rapids-0.1.0/src/scib_rapids/metrics/_nmi_ari.py +117 -0
- scib_rapids-0.1.0/src/scib_rapids/metrics/_pcr_comparison.py +52 -0
- scib_rapids-0.1.0/src/scib_rapids/metrics/_silhouette.py +141 -0
- scib_rapids-0.1.0/src/scib_rapids/nearest_neighbors/__init__.py +7 -0
- scib_rapids-0.1.0/src/scib_rapids/nearest_neighbors/_dataclass.py +63 -0
- scib_rapids-0.1.0/src/scib_rapids/nearest_neighbors/_pynndescent.py +23 -0
- scib_rapids-0.1.0/src/scib_rapids/utils/__init__.py +23 -0
- scib_rapids-0.1.0/src/scib_rapids/utils/_diffusion_nn.py +84 -0
- scib_rapids-0.1.0/src/scib_rapids/utils/_dist.py +68 -0
- scib_rapids-0.1.0/src/scib_rapids/utils/_kmeans.py +143 -0
- scib_rapids-0.1.0/src/scib_rapids/utils/_lisi.py +174 -0
- scib_rapids-0.1.0/src/scib_rapids/utils/_pca.py +88 -0
- scib_rapids-0.1.0/src/scib_rapids/utils/_pcr.py +62 -0
- scib_rapids-0.1.0/src/scib_rapids/utils/_silhouette.py +122 -0
- scib_rapids-0.1.0/src/scib_rapids/utils/_utils.py +59 -0
- scib_rapids-0.1.0/tests/__init__.py +0 -0
- scib_rapids-0.1.0/tests/test_benchmark.py +254 -0
- scib_rapids-0.1.0/tests/test_cross_validate.py +315 -0
- scib_rapids-0.1.0/tests/test_metrics.py +172 -0
- scib_rapids-0.1.0/tests/utils/__init__.py +0 -0
- scib_rapids-0.1.0/tests/utils/data.py +27 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Based on pydata/xarray
|
|
2
|
+
codecov:
|
|
3
|
+
require_ci_to_pass: no
|
|
4
|
+
|
|
5
|
+
coverage:
|
|
6
|
+
status:
|
|
7
|
+
project:
|
|
8
|
+
default:
|
|
9
|
+
# Require 1% coverage, i.e., always succeed
|
|
10
|
+
target: 1
|
|
11
|
+
patch: false
|
|
12
|
+
changes: false
|
|
13
|
+
|
|
14
|
+
comment:
|
|
15
|
+
layout: diff, flags, files
|
|
16
|
+
behavior: once
|
|
17
|
+
require_base: no
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
root = true
|
|
2
|
+
|
|
3
|
+
[*]
|
|
4
|
+
indent_style = space
|
|
5
|
+
indent_size = 4
|
|
6
|
+
end_of_line = lf
|
|
7
|
+
charset = utf-8
|
|
8
|
+
trim_trailing_whitespace = true
|
|
9
|
+
insert_final_newline = true
|
|
10
|
+
|
|
11
|
+
[*.{yml,yaml}]
|
|
12
|
+
indent_size = 2
|
|
13
|
+
|
|
14
|
+
[.cruft.json]
|
|
15
|
+
indent_size = 2
|
|
16
|
+
|
|
17
|
+
[Makefile]
|
|
18
|
+
indent_style = tab
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
name: Bug report
|
|
2
|
+
description: Report something that is broken or incorrect
|
|
3
|
+
labels: bug
|
|
4
|
+
body:
|
|
5
|
+
- type: markdown
|
|
6
|
+
attributes:
|
|
7
|
+
value: |
|
|
8
|
+
**Note**: Please read [this guide](https://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports)
|
|
9
|
+
detailing how to provide the necessary information for us to reproduce your bug. In brief:
|
|
10
|
+
* Please provide exact steps how to reproduce the bug in a clean Python environment.
|
|
11
|
+
* In case it's not clear what's causing this bug, please provide the data or the data generation procedure.
|
|
12
|
+
* Sometimes it is not possible to share the data, but usually it is possible to replicate problems on publicly
|
|
13
|
+
available datasets or to share a subset of your data.
|
|
14
|
+
|
|
15
|
+
- type: textarea
|
|
16
|
+
id: report
|
|
17
|
+
attributes:
|
|
18
|
+
label: Report
|
|
19
|
+
description: A clear and concise description of what the bug is.
|
|
20
|
+
validations:
|
|
21
|
+
required: true
|
|
22
|
+
|
|
23
|
+
- type: textarea
|
|
24
|
+
id: versions
|
|
25
|
+
attributes:
|
|
26
|
+
label: Version information
|
|
27
|
+
description: |
|
|
28
|
+
Please paste below the output of
|
|
29
|
+
|
|
30
|
+
```python
|
|
31
|
+
import session_info
|
|
32
|
+
session_info.show(html=False, dependencies=True)
|
|
33
|
+
```
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
name: Feature request
|
|
2
|
+
description: Propose a new feature for scib-rapids
|
|
3
|
+
labels: enhancement
|
|
4
|
+
body:
|
|
5
|
+
- type: textarea
|
|
6
|
+
id: description
|
|
7
|
+
attributes:
|
|
8
|
+
label: Description of feature
|
|
9
|
+
description: Please describe your suggestion for a new feature. It might help to describe a problem or use case, plus any alternatives that you have considered.
|
|
10
|
+
validations:
|
|
11
|
+
required: true
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
name: Build
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
|
|
9
|
+
concurrency:
|
|
10
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
11
|
+
cancel-in-progress: true
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
package:
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@v4
|
|
18
|
+
- name: Set up Python 3.12
|
|
19
|
+
uses: actions/setup-python@v5
|
|
20
|
+
with:
|
|
21
|
+
python-version: "3.12"
|
|
22
|
+
cache: "pip"
|
|
23
|
+
cache-dependency-path: "**/pyproject.toml"
|
|
24
|
+
- name: Install build dependencies
|
|
25
|
+
run: python -m pip install --upgrade pip wheel twine build
|
|
26
|
+
- name: Build package
|
|
27
|
+
run: python -m build
|
|
28
|
+
- name: Check package
|
|
29
|
+
run: twine check --strict dist/*.whl
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [published]
|
|
6
|
+
|
|
7
|
+
# Use "trusted publishing", see https://docs.pypi.org/trusted-publishers/
|
|
8
|
+
jobs:
|
|
9
|
+
release:
|
|
10
|
+
name: Upload release to PyPI
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
environment:
|
|
13
|
+
name: pypi
|
|
14
|
+
url: https://pypi.org/p/scib-rapids
|
|
15
|
+
permissions:
|
|
16
|
+
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@v4
|
|
19
|
+
with:
|
|
20
|
+
filter: blob:none
|
|
21
|
+
fetch-depth: 0
|
|
22
|
+
- uses: actions/setup-python@v4
|
|
23
|
+
with:
|
|
24
|
+
python-version: "3.x"
|
|
25
|
+
cache: "pip"
|
|
26
|
+
- run: pip install build
|
|
27
|
+
- run: python -m build
|
|
28
|
+
- name: Publish package distributions to PyPI
|
|
29
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
name: Test
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
|
|
9
|
+
concurrency:
|
|
10
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
11
|
+
cancel-in-progress: true
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
test:
|
|
15
|
+
runs-on: ${{ matrix.os }}
|
|
16
|
+
defaults:
|
|
17
|
+
run:
|
|
18
|
+
shell: bash -e {0} # -e to fail on error
|
|
19
|
+
|
|
20
|
+
strategy:
|
|
21
|
+
fail-fast: false
|
|
22
|
+
matrix:
|
|
23
|
+
os: [ubuntu-latest]
|
|
24
|
+
python: ["3.11", "3.12", "3.13"]
|
|
25
|
+
|
|
26
|
+
name: Integration
|
|
27
|
+
|
|
28
|
+
env:
|
|
29
|
+
OS: ${{ matrix.os }}
|
|
30
|
+
PYTHON: ${{ matrix.python }}
|
|
31
|
+
|
|
32
|
+
steps:
|
|
33
|
+
- uses: actions/checkout@v4
|
|
34
|
+
- name: Set up Python ${{ matrix.python }}
|
|
35
|
+
uses: actions/setup-python@v5
|
|
36
|
+
with:
|
|
37
|
+
python-version: ${{ matrix.python }}
|
|
38
|
+
cache: "pip"
|
|
39
|
+
cache-dependency-path: "**/pyproject.toml"
|
|
40
|
+
|
|
41
|
+
- name: Install test dependencies
|
|
42
|
+
run: |
|
|
43
|
+
python -m pip install --upgrade pip wheel
|
|
44
|
+
|
|
45
|
+
- name: Install dependencies
|
|
46
|
+
run: |
|
|
47
|
+
pip install ".[dev,test]"
|
|
48
|
+
|
|
49
|
+
- name: Test
|
|
50
|
+
env:
|
|
51
|
+
MPLBACKEND: agg
|
|
52
|
+
PLATFORM: ${{ matrix.os }}
|
|
53
|
+
DISPLAY: :42
|
|
54
|
+
run: |
|
|
55
|
+
coverage run -m pytest -v --color=yes
|
|
56
|
+
- name: Report coverage
|
|
57
|
+
run: |
|
|
58
|
+
coverage report
|
|
59
|
+
- name: Upload coverage
|
|
60
|
+
uses: codecov/codecov-action@v4
|
|
61
|
+
with:
|
|
62
|
+
token: ${{ secrets.CODECOV_TOKEN }}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Temp files
|
|
2
|
+
.DS_Store
|
|
3
|
+
*~
|
|
4
|
+
buck-out/
|
|
5
|
+
|
|
6
|
+
# Compiled files
|
|
7
|
+
.venv/
|
|
8
|
+
.venv-*/
|
|
9
|
+
__pycache__/
|
|
10
|
+
.mypy_cache/
|
|
11
|
+
.ruff_cache/
|
|
12
|
+
|
|
13
|
+
# Distribution / packaging
|
|
14
|
+
/build/
|
|
15
|
+
/dist/
|
|
16
|
+
/*.egg-info/
|
|
17
|
+
|
|
18
|
+
# Tests and coverage
|
|
19
|
+
/.pytest_cache/
|
|
20
|
+
/.cache/
|
|
21
|
+
/data/
|
|
22
|
+
|
|
23
|
+
# docs
|
|
24
|
+
/docs/generated/
|
|
25
|
+
/docs/_build/
|
|
26
|
+
|
|
27
|
+
# IDEs
|
|
28
|
+
/.idea/
|
|
29
|
+
/.vscode/
|
|
30
|
+
|
|
31
|
+
# node
|
|
32
|
+
/node_modules/
|
|
33
|
+
|
|
34
|
+
docs/notebooks/data/
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
fail_fast: false
|
|
2
|
+
default_language_version:
|
|
3
|
+
python: python3
|
|
4
|
+
default_stages:
|
|
5
|
+
- pre-commit
|
|
6
|
+
- pre-push
|
|
7
|
+
minimum_pre_commit_version: 2.16.0
|
|
8
|
+
repos:
|
|
9
|
+
- repo: https://github.com/pre-commit/mirrors-prettier
|
|
10
|
+
rev: v4.0.0-alpha.8
|
|
11
|
+
hooks:
|
|
12
|
+
- id: prettier
|
|
13
|
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
14
|
+
rev: v0.15.6
|
|
15
|
+
hooks:
|
|
16
|
+
- id: ruff
|
|
17
|
+
types_or: [python, pyi, jupyter]
|
|
18
|
+
args: [--fix, --exit-non-zero-on-fix]
|
|
19
|
+
- id: ruff-format
|
|
20
|
+
types_or: [python, pyi, jupyter]
|
|
21
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
22
|
+
rev: v6.0.0
|
|
23
|
+
hooks:
|
|
24
|
+
- id: detect-private-key
|
|
25
|
+
- id: check-ast
|
|
26
|
+
- id: end-of-file-fixer
|
|
27
|
+
- id: mixed-line-ending
|
|
28
|
+
args: [--fix=lf]
|
|
29
|
+
- id: trailing-whitespace
|
|
30
|
+
- id: check-case-conflict
|
|
31
|
+
# Check that there are no merge conflicts (could be generated by template sync)
|
|
32
|
+
- id: check-merge-conflict
|
|
33
|
+
args: [--assume-in-merge]
|
|
34
|
+
- repo: local
|
|
35
|
+
hooks:
|
|
36
|
+
- id: forbid-to-commit
|
|
37
|
+
name: Don't commit rej files
|
|
38
|
+
entry: |
|
|
39
|
+
Cannot commit .rej files. These indicate merge conflicts that arise during automated template updates.
|
|
40
|
+
Fix the merge conflicts manually and remove the .rej files.
|
|
41
|
+
language: fail
|
|
42
|
+
files: '.*\.rej$'
|
|
43
|
+
- repo: https://github.com/kynan/nbstripout
|
|
44
|
+
rev: 0.9.1
|
|
45
|
+
hooks:
|
|
46
|
+
- id: nbstripout
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# https://docs.readthedocs.io/en/stable/config-file/v2.html
|
|
2
|
+
version: 2
|
|
3
|
+
build:
|
|
4
|
+
os: ubuntu-20.04
|
|
5
|
+
tools:
|
|
6
|
+
python: "3.11"
|
|
7
|
+
sphinx:
|
|
8
|
+
configuration: docs/conf.py
|
|
9
|
+
# disable this for more lenient docs builds
|
|
10
|
+
fail_on_warning: false
|
|
11
|
+
python:
|
|
12
|
+
install:
|
|
13
|
+
- method: pip
|
|
14
|
+
path: .
|
|
15
|
+
extra_requirements:
|
|
16
|
+
- doc
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog][],
|
|
6
|
+
and this project adheres to [Semantic Versioning][].
|
|
7
|
+
|
|
8
|
+
[keep a changelog]: https://keepachangelog.com/en/1.0.0/
|
|
9
|
+
[semantic versioning]: https://semver.org/spec/v2.0.0.html
|
|
10
|
+
|
|
11
|
+
## 0.1.0 (unreleased)
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
|
|
15
|
+
- Initial release with GPU-accelerated metrics using CuPy/RAPIDS.
|
|
16
|
+
- All metrics from scib-metrics ported: silhouette, LISI, kBET, NMI/ARI, graph connectivity, isolated labels, PCR comparison, BRAS.
|
|
17
|
+
- CuPy-based utility functions: cdist, pdist_squareform, PCA, KMeans, silhouette_samples, Simpson index.
|
|
18
|
+
- NeighborsResults dataclass with sparse graph properties.
|
|
19
|
+
- Unit tests validating correctness against scikit-learn.
|
|
20
|
+
- Benchmark test suite comparing runtime against scib-metrics.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
BSD 3-Clause License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026, Maarten de Vries
|
|
4
|
+
All rights reserved.
|
|
5
|
+
|
|
6
|
+
Redistribution and use in source and binary forms, with or without
|
|
7
|
+
modification, are permitted provided that the following conditions are met:
|
|
8
|
+
|
|
9
|
+
1. Redistributions of source code must retain the above copyright notice, this
|
|
10
|
+
list of conditions and the following disclaimer.
|
|
11
|
+
|
|
12
|
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
13
|
+
this list of conditions and the following disclaimer in the documentation
|
|
14
|
+
and/or other materials provided with the distribution.
|
|
15
|
+
|
|
16
|
+
3. Neither the name of the copyright holder nor the names of its
|
|
17
|
+
contributors may be used to endorse or promote products derived from
|
|
18
|
+
this software without specific prior written permission.
|
|
19
|
+
|
|
20
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
21
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
22
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
23
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
24
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
25
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
26
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
27
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
28
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
29
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: scib-rapids
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: GPU-accelerated single-cell integration benchmarking metrics using RAPIDS (cuML, CuPy)
|
|
5
|
+
Project-URL: Documentation, https://scib-rapids.readthedocs.io/
|
|
6
|
+
Project-URL: Source, https://github.com/maarten-devries/scib-rapids
|
|
7
|
+
Project-URL: Home-page, https://github.com/maarten-devries/scib-rapids
|
|
8
|
+
Author: Maarten de Vries
|
|
9
|
+
Maintainer: Maarten de Vries
|
|
10
|
+
License: BSD 3-Clause License
|
|
11
|
+
|
|
12
|
+
Copyright (c) 2026, Maarten de Vries
|
|
13
|
+
All rights reserved.
|
|
14
|
+
|
|
15
|
+
Redistribution and use in source and binary forms, with or without
|
|
16
|
+
modification, are permitted provided that the following conditions are met:
|
|
17
|
+
|
|
18
|
+
1. Redistributions of source code must retain the above copyright notice, this
|
|
19
|
+
list of conditions and the following disclaimer.
|
|
20
|
+
|
|
21
|
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
22
|
+
this list of conditions and the following disclaimer in the documentation
|
|
23
|
+
and/or other materials provided with the distribution.
|
|
24
|
+
|
|
25
|
+
3. Neither the name of the copyright holder nor the names of its
|
|
26
|
+
contributors may be used to endorse or promote products derived from
|
|
27
|
+
this software without specific prior written permission.
|
|
28
|
+
|
|
29
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
30
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
31
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
32
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
33
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
34
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
35
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
36
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
37
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
38
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
39
|
+
License-File: LICENSE
|
|
40
|
+
Requires-Python: >=3.11
|
|
41
|
+
Requires-Dist: anndata
|
|
42
|
+
Requires-Dist: cupy-cuda12x>=13.0
|
|
43
|
+
Requires-Dist: igraph>0.9.0
|
|
44
|
+
Requires-Dist: numpy
|
|
45
|
+
Requires-Dist: pandas
|
|
46
|
+
Requires-Dist: pynndescent
|
|
47
|
+
Requires-Dist: scikit-learn
|
|
48
|
+
Requires-Dist: scipy
|
|
49
|
+
Requires-Dist: umap-learn>=0.5.0
|
|
50
|
+
Provides-Extra: dev
|
|
51
|
+
Requires-Dist: pre-commit; extra == 'dev'
|
|
52
|
+
Requires-Dist: twine>=4.0.2; extra == 'dev'
|
|
53
|
+
Provides-Extra: doc
|
|
54
|
+
Requires-Dist: ipykernel; extra == 'doc'
|
|
55
|
+
Requires-Dist: ipython; extra == 'doc'
|
|
56
|
+
Requires-Dist: myst-nb; extra == 'doc'
|
|
57
|
+
Requires-Dist: pybtex-docutils>=1.0.0; extra == 'doc'
|
|
58
|
+
Requires-Dist: scanpydoc[typehints]>=0.7.4; extra == 'doc'
|
|
59
|
+
Requires-Dist: sphinx-book-theme>=1.0; extra == 'doc'
|
|
60
|
+
Requires-Dist: sphinx-copybutton; extra == 'doc'
|
|
61
|
+
Requires-Dist: sphinx>=4; extra == 'doc'
|
|
62
|
+
Requires-Dist: sphinxcontrib-bibtex>=2.6; extra == 'doc'
|
|
63
|
+
Requires-Dist: sphinxext-opengraph; extra == 'doc'
|
|
64
|
+
Provides-Extra: test
|
|
65
|
+
Requires-Dist: coverage; extra == 'test'
|
|
66
|
+
Requires-Dist: harmonypy; extra == 'test'
|
|
67
|
+
Requires-Dist: joblib; extra == 'test'
|
|
68
|
+
Requires-Dist: pytest; extra == 'test'
|
|
69
|
+
Requires-Dist: scib-metrics>=0.5; extra == 'test'
|
|
70
|
+
Description-Content-Type: text/markdown
|
|
71
|
+
|
|
72
|
+
# scib-rapids
|
|
73
|
+
|
|
74
|
+
[![PyPI][badge-pypi]][link-pypi]
|
|
75
|
+
[![Docs][badge-docs]][link-docs]
|
|
76
|
+
[![Build][badge-build]][link-build]
|
|
77
|
+
[![Coverage][badge-cov]][link-cov]
|
|
78
|
+
[![Discourse][badge-discourse]][link-discourse]
|
|
79
|
+
[![Chat][badge-zulip]][link-zulip]
|
|
80
|
+
|
|
81
|
+
[badge-pypi]: https://img.shields.io/pypi/v/scib-rapids.svg
|
|
82
|
+
[link-pypi]: https://pypi.org/project/scib-rapids
|
|
83
|
+
[badge-docs]: https://readthedocs.org/projects/scib-rapids/badge/?version=latest
|
|
84
|
+
[link-docs]: https://scib-rapids.readthedocs.io/en/latest/?badge=latest
|
|
85
|
+
[badge-build]: https://github.com/maarten-devries/scib-rapids/actions/workflows/test.yaml/badge.svg
|
|
86
|
+
[link-build]: https://github.com/maarten-devries/scib-rapids/actions/workflows/test.yaml/
|
|
87
|
+
[badge-cov]: https://codecov.io/gh/maarten-devries/scib-rapids/branch/main/graph/badge.svg
|
|
88
|
+
[link-cov]: https://codecov.io/gh/maarten-devries/scib-rapids
|
|
89
|
+
[badge-discourse]: https://img.shields.io/discourse/posts?color=yellow&logo=discourse&server=https%3A%2F%2Fdiscourse.scverse.org
|
|
90
|
+
[link-discourse]: https://discourse.scverse.org/
|
|
91
|
+
[badge-zulip]: https://img.shields.io/badge/zulip-join_chat-brightgreen.svg
|
|
92
|
+
[link-zulip]: https://scverse.zulipchat.com/
|
|
93
|
+
|
|
94
|
+
GPU-accelerated metrics for benchmarking single-cell integration outputs using RAPIDS (cuML, CuPy).
|
|
95
|
+
|
|
96
|
+
This package provides the same metrics as [scib-metrics](https://github.com/YosefLab/scib-metrics) but replaces JAX with [RAPIDS](https://rapids.ai/) (CuPy, cuML) for GPU acceleration. All implementations leverage CuPy for device-level computation on NVIDIA GPUs.
|
|
97
|
+
|
|
98
|
+
## Metrics
|
|
99
|
+
|
|
100
|
+
- **Silhouette**: `silhouette_label`, `silhouette_batch`, `bras`
|
|
101
|
+
- **LISI**: `lisi_knn`, `ilisi_knn`, `clisi_knn`
|
|
102
|
+
- **kBET**: `kbet`, `kbet_per_label`
|
|
103
|
+
- **Clustering**: `nmi_ari_cluster_labels_kmeans`, `nmi_ari_cluster_labels_leiden`
|
|
104
|
+
- **Graph connectivity**: `graph_connectivity`
|
|
105
|
+
- **Isolated labels**: `isolated_labels`
|
|
106
|
+
- **PCR comparison**: `pcr_comparison`
|
|
107
|
+
|
|
108
|
+
## Getting started
|
|
109
|
+
|
|
110
|
+
Please refer to the [documentation][link-docs].
|
|
111
|
+
|
|
112
|
+
## Installation
|
|
113
|
+
|
|
114
|
+
You need to have Python 3.11 or newer and a CUDA-capable GPU. We recommend installing in a [conda](https://docs.conda.io/en/latest/miniconda.html) environment with RAPIDS pre-installed.
|
|
115
|
+
|
|
116
|
+
1. Install the latest release on PyPI:
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
pip install scib-rapids
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
2. Install the latest development version:
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
pip install git+https://github.com/maarten-devries/scib-rapids.git@main
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
## Release notes
|
|
129
|
+
|
|
130
|
+
See the [changelog][changelog].
|
|
131
|
+
|
|
132
|
+
## Contact
|
|
133
|
+
|
|
134
|
+
For questions and help requests, you can reach out in the [scverse Discourse][link-discourse].
|
|
135
|
+
If you found a bug, please use the [issue tracker][issue-tracker].
|
|
136
|
+
|
|
137
|
+
## Citation
|
|
138
|
+
|
|
139
|
+
If you use `scib-rapids`, please cite the original single-cell integration benchmarking work:
|
|
140
|
+
|
|
141
|
+
```bibtex
|
|
142
|
+
@article{luecken2022benchmarking,
|
|
143
|
+
title={Benchmarking atlas-level data integration in single-cell genomics},
|
|
144
|
+
author={Luecken, Malte D and B{\"u}ttner, Maren and Chaichoompu, Kridsadakorn and Danese, Anna and Interlandi, Marta and M{\"u}ller, Michaela F and Strobl, Daniel C and Zappia, Luke and Dugas, Martin and Colom{\'e}-Tatch{\'e}, Maria and others},
|
|
145
|
+
journal={Nature methods},
|
|
146
|
+
volume={19},
|
|
147
|
+
number={1},
|
|
148
|
+
pages={41--50},
|
|
149
|
+
year={2022},
|
|
150
|
+
publisher={Nature Publishing Group}
|
|
151
|
+
}
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
[issue-tracker]: https://github.com/maarten-devries/scib-rapids/issues
|
|
155
|
+
[changelog]: https://scib-rapids.readthedocs.io/en/latest/changelog.html
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# scib-rapids
|
|
2
|
+
|
|
3
|
+
[![PyPI][badge-pypi]][link-pypi]
|
|
4
|
+
[![Docs][badge-docs]][link-docs]
|
|
5
|
+
[![Build][badge-build]][link-build]
|
|
6
|
+
[![Coverage][badge-cov]][link-cov]
|
|
7
|
+
[![Discourse][badge-discourse]][link-discourse]
|
|
8
|
+
[![Chat][badge-zulip]][link-zulip]
|
|
9
|
+
|
|
10
|
+
[badge-pypi]: https://img.shields.io/pypi/v/scib-rapids.svg
|
|
11
|
+
[link-pypi]: https://pypi.org/project/scib-rapids
|
|
12
|
+
[badge-docs]: https://readthedocs.org/projects/scib-rapids/badge/?version=latest
|
|
13
|
+
[link-docs]: https://scib-rapids.readthedocs.io/en/latest/?badge=latest
|
|
14
|
+
[badge-build]: https://github.com/maarten-devries/scib-rapids/actions/workflows/test.yaml/badge.svg
|
|
15
|
+
[link-build]: https://github.com/maarten-devries/scib-rapids/actions/workflows/test.yaml/
|
|
16
|
+
[badge-cov]: https://codecov.io/gh/maarten-devries/scib-rapids/branch/main/graph/badge.svg
|
|
17
|
+
[link-cov]: https://codecov.io/gh/maarten-devries/scib-rapids
|
|
18
|
+
[badge-discourse]: https://img.shields.io/discourse/posts?color=yellow&logo=discourse&server=https%3A%2F%2Fdiscourse.scverse.org
|
|
19
|
+
[link-discourse]: https://discourse.scverse.org/
|
|
20
|
+
[badge-zulip]: https://img.shields.io/badge/zulip-join_chat-brightgreen.svg
|
|
21
|
+
[link-zulip]: https://scverse.zulipchat.com/
|
|
22
|
+
|
|
23
|
+
GPU-accelerated metrics for benchmarking single-cell integration outputs using RAPIDS (cuML, CuPy).
|
|
24
|
+
|
|
25
|
+
This package provides the same metrics as [scib-metrics](https://github.com/YosefLab/scib-metrics) but replaces JAX with [RAPIDS](https://rapids.ai/) (CuPy, cuML) for GPU acceleration. All implementations leverage CuPy for device-level computation on NVIDIA GPUs.
|
|
26
|
+
|
|
27
|
+
## Metrics
|
|
28
|
+
|
|
29
|
+
- **Silhouette**: `silhouette_label`, `silhouette_batch`, `bras`
|
|
30
|
+
- **LISI**: `lisi_knn`, `ilisi_knn`, `clisi_knn`
|
|
31
|
+
- **kBET**: `kbet`, `kbet_per_label`
|
|
32
|
+
- **Clustering**: `nmi_ari_cluster_labels_kmeans`, `nmi_ari_cluster_labels_leiden`
|
|
33
|
+
- **Graph connectivity**: `graph_connectivity`
|
|
34
|
+
- **Isolated labels**: `isolated_labels`
|
|
35
|
+
- **PCR comparison**: `pcr_comparison`
|
|
36
|
+
|
|
37
|
+
## Getting started
|
|
38
|
+
|
|
39
|
+
Please refer to the [documentation][link-docs].
|
|
40
|
+
|
|
41
|
+
## Installation
|
|
42
|
+
|
|
43
|
+
You need to have Python 3.11 or newer and a CUDA-capable GPU. We recommend installing in a [conda](https://docs.conda.io/en/latest/miniconda.html) environment with RAPIDS pre-installed.
|
|
44
|
+
|
|
45
|
+
1. Install the latest release on PyPI:
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
pip install scib-rapids
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
2. Install the latest development version:
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
pip install git+https://github.com/maarten-devries/scib-rapids.git@main
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Release notes
|
|
58
|
+
|
|
59
|
+
See the [changelog][changelog].
|
|
60
|
+
|
|
61
|
+
## Contact
|
|
62
|
+
|
|
63
|
+
For questions and help requests, you can reach out in the [scverse Discourse][link-discourse].
|
|
64
|
+
If you found a bug, please use the [issue tracker][issue-tracker].
|
|
65
|
+
|
|
66
|
+
## Citation
|
|
67
|
+
|
|
68
|
+
If you use `scib-rapids`, please cite the original single-cell integration benchmarking work:
|
|
69
|
+
|
|
70
|
+
```bibtex
|
|
71
|
+
@article{luecken2022benchmarking,
|
|
72
|
+
title={Benchmarking atlas-level data integration in single-cell genomics},
|
|
73
|
+
author={Luecken, Malte D and B{\"u}ttner, Maren and Chaichoompu, Kridsadakorn and Danese, Anna and Interlandi, Marta and M{\"u}ller, Michaela F and Strobl, Daniel C and Zappia, Luke and Dugas, Martin and Colom{\'e}-Tatch{\'e}, Maria and others},
|
|
74
|
+
journal={Nature methods},
|
|
75
|
+
volume={19},
|
|
76
|
+
number={1},
|
|
77
|
+
pages={41--50},
|
|
78
|
+
year={2022},
|
|
79
|
+
publisher={Nature Publishing Group}
|
|
80
|
+
}
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
[issue-tracker]: https://github.com/maarten-devries/scib-rapids/issues
|
|
84
|
+
[changelog]: https://scib-rapids.readthedocs.io/en/latest/changelog.html
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Minimal makefile for Sphinx documentation
|
|
2
|
+
#
|
|
3
|
+
|
|
4
|
+
# You can set these variables from the command line, and also
|
|
5
|
+
# from the environment for the first two.
|
|
6
|
+
SPHINXOPTS ?=
|
|
7
|
+
SPHINXBUILD ?= sphinx-build
|
|
8
|
+
SOURCEDIR = .
|
|
9
|
+
BUILDDIR = _build
|
|
10
|
+
|
|
11
|
+
# Put it first so that "make" without argument is like "make help".
|
|
12
|
+
help:
|
|
13
|
+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
|
14
|
+
|
|
15
|
+
.PHONY: help Makefile
|
|
16
|
+
|
|
17
|
+
# Catch-all target: route all unknown targets to Sphinx using the new
|
|
18
|
+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
|
|
19
|
+
%: Makefile
|
|
20
|
+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|