multiscoresplot 1.0.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.
@@ -0,0 +1,45 @@
1
+ name: CI
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
+ lint:
15
+ runs-on: ubuntu-latest
16
+ steps:
17
+ - uses: actions/checkout@v4
18
+ - uses: astral-sh/setup-uv@v5
19
+ - run: uv run --group dev ruff check src/ tests/
20
+ - run: uv run --group dev ruff format --check src/ tests/
21
+
22
+ typecheck:
23
+ runs-on: ubuntu-latest
24
+ steps:
25
+ - uses: actions/checkout@v4
26
+ - uses: astral-sh/setup-uv@v5
27
+ - run: uv run --group type mypy src/
28
+
29
+ test:
30
+ runs-on: ${{ matrix.os }}
31
+ strategy:
32
+ fail-fast: false
33
+ matrix:
34
+ os: [ubuntu-latest, macos-latest]
35
+ python-version: ["3.10", "3.11", "3.12", "3.13"]
36
+ steps:
37
+ - uses: actions/checkout@v4
38
+ - uses: astral-sh/setup-uv@v5
39
+ with:
40
+ python-version: ${{ matrix.python-version }}
41
+ - run: uv run --group test pytest --cov --cov-report=xml
42
+ - if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12'
43
+ uses: codecov/codecov-action@v5
44
+ with:
45
+ files: coverage.xml
@@ -0,0 +1,31 @@
1
+ name: Publish to PyPI
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+
7
+ permissions:
8
+ id-token: write
9
+
10
+ jobs:
11
+ build:
12
+ runs-on: ubuntu-latest
13
+ steps:
14
+ - uses: actions/checkout@v4
15
+ - uses: astral-sh/setup-uv@v5
16
+ - run: uv build
17
+ - uses: actions/upload-artifact@v4
18
+ with:
19
+ name: dist
20
+ path: dist/
21
+
22
+ publish:
23
+ needs: build
24
+ runs-on: ubuntu-latest
25
+ environment: pypi
26
+ steps:
27
+ - uses: actions/download-artifact@v4
28
+ with:
29
+ name: dist
30
+ path: dist/
31
+ - uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,102 @@
1
+ CLAUDE.md
2
+ .claude
3
+
4
+ # Byte-compiled / optimized / DLL files
5
+ __pycache__/
6
+ *.py[cod]
7
+ *$py.class
8
+
9
+ # C extensions
10
+ *.so
11
+
12
+ # Distribution / packaging
13
+ .Python
14
+ build/
15
+ develop-eggs/
16
+ dist/
17
+ downloads/
18
+ eggs/
19
+ .eggs/
20
+ lib/
21
+ lib64/
22
+ parts/
23
+ sdist/
24
+ var/
25
+ wheels/
26
+ pip-wheel-metadata/
27
+ share/python-wheels/
28
+ *.egg-info/
29
+ .installed.cfg
30
+ *.egg
31
+ MANIFEST
32
+
33
+ # PyInstaller
34
+ *.manifest
35
+ *.spec
36
+
37
+ # Installer logs
38
+ pip-log.txt
39
+ pip-delete-this-directory.txt
40
+
41
+ # Unit test / coverage reports
42
+ htmlcov/
43
+ .tox/
44
+ .nox/
45
+ .coverage
46
+ .coverage.*
47
+ .cache
48
+ nosetests.xml
49
+ coverage.xml
50
+ *.cover
51
+ *.py,cover
52
+ .hypothesis/
53
+ .pytest_cache/
54
+
55
+ # Sphinx documentation
56
+ docs/_build/
57
+
58
+ # PyBuilder
59
+ target/
60
+
61
+ # Jupyter Notebook
62
+ .ipynb_checkpoints
63
+
64
+ # IPython
65
+ profile_default/
66
+ ipython_config.py
67
+
68
+ # pyenv
69
+ .python-version
70
+
71
+ # pipenv
72
+ Pipfile.lock
73
+
74
+ # PEP 582
75
+ __pypackages__/
76
+
77
+ # Environments
78
+ .env
79
+ .venv
80
+ env/
81
+ venv/
82
+ ENV/
83
+ env.bak/
84
+ venv.bak/
85
+
86
+ # mkdocs documentation
87
+ /site
88
+
89
+ # mypy
90
+ .mypy_cache/
91
+ .dmypy.json
92
+ dmypy.json
93
+
94
+ # ruff
95
+ .ruff_cache/
96
+
97
+ # IDE
98
+ .vscode/
99
+ *.swp
100
+ *.swo
101
+ *~
102
+ .DS_Store
@@ -0,0 +1,19 @@
1
+ exclude: '\.ipynb$'
2
+
3
+ repos:
4
+ - repo: https://github.com/pre-commit/pre-commit-hooks
5
+ rev: v5.0.0
6
+ hooks:
7
+ - id: trailing-whitespace
8
+ - id: end-of-file-fixer
9
+ - id: check-yaml
10
+ - id: check-toml
11
+ - id: check-added-large-files
12
+ args: ["--maxkb=500"]
13
+
14
+ - repo: https://github.com/astral-sh/ruff-pre-commit
15
+ rev: v0.9.9
16
+ hooks:
17
+ - id: ruff
18
+ args: [--fix]
19
+ - id: ruff-format
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Andre Macedo
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,85 @@
1
+ Metadata-Version: 2.4
2
+ Name: multiscoresplot
3
+ Version: 1.0.0
4
+ Summary: Multi-dimensional gene set scoring and visualization for single-cell transcriptomics
5
+ Project-URL: Homepage, https://github.com/andrecmacedo/multiscoresplot
6
+ Project-URL: Repository, https://github.com/andrecmacedo/multiscoresplot
7
+ Project-URL: Issues, https://github.com/andrecmacedo/multiscoresplot/issues
8
+ Author: Andre Macedo
9
+ License-Expression: MIT
10
+ License-File: LICENSE
11
+ Classifier: Development Status :: 5 - Production/Stable
12
+ Classifier: Intended Audience :: Science/Research
13
+ Classifier: License :: OSI Approved :: MIT License
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3.10
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Programming Language :: Python :: 3.13
19
+ Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
20
+ Classifier: Topic :: Scientific/Engineering :: Visualization
21
+ Classifier: Typing :: Typed
22
+ Requires-Python: >=3.10
23
+ Requires-Dist: anndata>=0.10
24
+ Requires-Dist: matplotlib>=3.7
25
+ Requires-Dist: numpy>=1.24
26
+ Requires-Dist: pyucell>=0.5
27
+ Requires-Dist: scanpy>=1.9
28
+ Requires-Dist: scikit-learn>=1.3
29
+ Provides-Extra: interactive
30
+ Requires-Dist: plotly>=5.0; extra == 'interactive'
31
+ Description-Content-Type: text/markdown
32
+
33
+ # multiscoresplot
34
+
35
+ [![CI](https://github.com/andrecmacedo/multiscoresplot/actions/workflows/ci.yml/badge.svg)](https://github.com/andrecmacedo/multiscoresplot/actions/workflows/ci.yml)
36
+ [![PyPI](https://img.shields.io/pypi/v/multiscoresplot)](https://pypi.org/project/multiscoresplot/)
37
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
38
+
39
+ Multi-dimensional gene set scoring and visualization for single-cell transcriptomics.
40
+
41
+ Color dimensionality reduction plots (UMAP, PCA, etc.) using a multi-dimensional color space derived from gene set scores.
42
+
43
+ ## Installation
44
+
45
+ ```bash
46
+ pip install multiscoresplot
47
+ ```
48
+
49
+ ## Quick Start
50
+
51
+ ```python
52
+ import multiscoresplot # more to come!
53
+ ```
54
+
55
+ ## Pipeline
56
+
57
+ 1. **Score** -- Calculate gene set scores per cell
58
+ 2. **Color space** -- Build a color space where each axis/vertex maps to a gene set
59
+ 3. **Project** -- Map each cell into the color space based on its scores
60
+ 4. **Plot** -- Color dimensionality reduction coordinates using the projected colors
61
+ 5. **Legend** -- Render a simplex/ternary plot as the colorbar
62
+
63
+ ## Development
64
+
65
+ ```bash
66
+ # Install in editable mode with all dev dependencies
67
+ pip install -e ".[dev,test,type]"
68
+
69
+ # Run tests
70
+ pytest
71
+
72
+ # Lint & format
73
+ ruff check src/ tests/
74
+ ruff format src/ tests/
75
+
76
+ # Type check
77
+ mypy src/
78
+
79
+ # Set up pre-commit hooks
80
+ pre-commit install
81
+ ```
82
+
83
+ ## License
84
+
85
+ [MIT](LICENSE)
@@ -0,0 +1,53 @@
1
+ # multiscoresplot
2
+
3
+ [![CI](https://github.com/andrecmacedo/multiscoresplot/actions/workflows/ci.yml/badge.svg)](https://github.com/andrecmacedo/multiscoresplot/actions/workflows/ci.yml)
4
+ [![PyPI](https://img.shields.io/pypi/v/multiscoresplot)](https://pypi.org/project/multiscoresplot/)
5
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
6
+
7
+ Multi-dimensional gene set scoring and visualization for single-cell transcriptomics.
8
+
9
+ Color dimensionality reduction plots (UMAP, PCA, etc.) using a multi-dimensional color space derived from gene set scores.
10
+
11
+ ## Installation
12
+
13
+ ```bash
14
+ pip install multiscoresplot
15
+ ```
16
+
17
+ ## Quick Start
18
+
19
+ ```python
20
+ import multiscoresplot # more to come!
21
+ ```
22
+
23
+ ## Pipeline
24
+
25
+ 1. **Score** -- Calculate gene set scores per cell
26
+ 2. **Color space** -- Build a color space where each axis/vertex maps to a gene set
27
+ 3. **Project** -- Map each cell into the color space based on its scores
28
+ 4. **Plot** -- Color dimensionality reduction coordinates using the projected colors
29
+ 5. **Legend** -- Render a simplex/ternary plot as the colorbar
30
+
31
+ ## Development
32
+
33
+ ```bash
34
+ # Install in editable mode with all dev dependencies
35
+ pip install -e ".[dev,test,type]"
36
+
37
+ # Run tests
38
+ pytest
39
+
40
+ # Lint & format
41
+ ruff check src/ tests/
42
+ ruff format src/ tests/
43
+
44
+ # Type check
45
+ mypy src/
46
+
47
+ # Set up pre-commit hooks
48
+ pre-commit install
49
+ ```
50
+
51
+ ## License
52
+
53
+ [MIT](LICENSE)
@@ -0,0 +1,91 @@
1
+ [build-system]
2
+ requires = ["hatchling"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "multiscoresplot"
7
+ version = "1.0.0"
8
+ description = "Multi-dimensional gene set scoring and visualization for single-cell transcriptomics"
9
+ readme = "README.md"
10
+ license = "MIT"
11
+ requires-python = ">=3.10"
12
+ authors = [{ name = "Andre Macedo" }]
13
+ classifiers = [
14
+ "Development Status :: 5 - Production/Stable",
15
+ "Intended Audience :: Science/Research",
16
+ "License :: OSI Approved :: MIT License",
17
+ "Programming Language :: Python :: 3",
18
+ "Programming Language :: Python :: 3.10",
19
+ "Programming Language :: Python :: 3.11",
20
+ "Programming Language :: Python :: 3.12",
21
+ "Programming Language :: Python :: 3.13",
22
+ "Topic :: Scientific/Engineering :: Bio-Informatics",
23
+ "Topic :: Scientific/Engineering :: Visualization",
24
+ "Typing :: Typed",
25
+ ]
26
+ dependencies = [
27
+ "anndata>=0.10",
28
+ "matplotlib>=3.7",
29
+ "numpy>=1.24",
30
+ "pyucell>=0.5",
31
+ "scanpy>=1.9",
32
+ "scikit-learn>=1.3",
33
+ ]
34
+
35
+ [project.optional-dependencies]
36
+ interactive = ["plotly>=5.0"]
37
+
38
+ [project.urls]
39
+ Homepage = "https://github.com/andrecmacedo/multiscoresplot"
40
+ Repository = "https://github.com/andrecmacedo/multiscoresplot"
41
+ Issues = "https://github.com/andrecmacedo/multiscoresplot/issues"
42
+
43
+ [tool.hatch.build.targets.sdist]
44
+ exclude = ["tests/"]
45
+
46
+ [tool.hatch.build.targets.wheel]
47
+ packages = ["src/multiscoresplot"]
48
+
49
+ [dependency-groups]
50
+ dev = ["pre-commit>=3.6", "ruff>=0.9"]
51
+ test = ["pytest>=8.0", "pytest-cov>=6.0"]
52
+ type = ["mypy>=1.13"]
53
+
54
+ # ---------------------------------------------------------------------------
55
+ # Tool configuration
56
+ # ---------------------------------------------------------------------------
57
+
58
+ [tool.ruff]
59
+ src = ["src"]
60
+ target-version = "py310"
61
+ line-length = 99
62
+ extend-exclude = ["*.ipynb"]
63
+
64
+ [tool.ruff.lint]
65
+ select = ["F", "E", "W", "I", "UP", "B", "SIM", "TCH", "RUF"]
66
+
67
+ [tool.ruff.lint.isort]
68
+ known-first-party = ["multiscoresplot"]
69
+
70
+ [tool.pytest.ini_options]
71
+ testpaths = ["tests"]
72
+ strict = true
73
+ markers = []
74
+
75
+ [tool.mypy]
76
+ python_version = "3.10"
77
+ warn_return_any = true
78
+ warn_unused_configs = true
79
+ disallow_untyped_defs = false
80
+
81
+ [[tool.mypy.overrides]]
82
+ module = ["pyucell", "pyucell.*", "anndata", "anndata.*", "scanpy", "scanpy.*", "pandas", "pandas.*", "sklearn", "sklearn.*", "plotly", "plotly.*"]
83
+ ignore_missing_imports = true
84
+ disable_error_code = ["import-untyped"]
85
+
86
+ [tool.coverage.run]
87
+ source = ["multiscoresplot"]
88
+
89
+ [tool.coverage.report]
90
+ fail_under = 0
91
+ show_missing = true
@@ -0,0 +1,28 @@
1
+ """multiscoresplot -- multi-dimensional gene set scoring visualization."""
2
+
3
+ from multiscoresplot._colorspace import (
4
+ blend_to_rgb,
5
+ get_component_labels,
6
+ project_direct,
7
+ project_pca,
8
+ reduce_to_rgb,
9
+ register_reducer,
10
+ )
11
+ from multiscoresplot._interactive import plot_embedding_interactive
12
+ from multiscoresplot._legend import render_legend
13
+ from multiscoresplot._plotting import plot_embedding
14
+ from multiscoresplot._scoring import score_gene_sets
15
+
16
+ __all__ = [
17
+ "blend_to_rgb",
18
+ "get_component_labels",
19
+ "plot_embedding",
20
+ "plot_embedding_interactive",
21
+ "project_direct",
22
+ "project_pca",
23
+ "reduce_to_rgb",
24
+ "register_reducer",
25
+ "render_legend",
26
+ "score_gene_sets",
27
+ ]
28
+ __version__ = "1.0.0"