segtraq 0.0.2__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.
- segtraq-0.0.2/CONTRIBUTING.md +119 -0
- segtraq-0.0.2/HISTORY.md +5 -0
- segtraq-0.0.2/LICENSE +21 -0
- segtraq-0.0.2/MANIFEST.in +12 -0
- segtraq-0.0.2/PKG-INFO +55 -0
- segtraq-0.0.2/README.md +11 -0
- segtraq-0.0.2/pyproject.toml +102 -0
- segtraq-0.0.2/setup.cfg +4 -0
- segtraq-0.0.2/src/segtraq/SegTraQ.py +995 -0
- segtraq-0.0.2/src/segtraq/__init__.py +32 -0
- segtraq-0.0.2/src/segtraq/bl/__init__.py +21 -0
- segtraq-0.0.2/src/segtraq/bl/baseline.py +498 -0
- segtraq-0.0.2/src/segtraq/bl/utils.py +10 -0
- segtraq-0.0.2/src/segtraq/cs/__init__.py +15 -0
- segtraq-0.0.2/src/segtraq/cs/clustering_stability.py +366 -0
- segtraq-0.0.2/src/segtraq/cs/utils.py +313 -0
- segtraq-0.0.2/src/segtraq/nc/__init__.py +11 -0
- segtraq-0.0.2/src/segtraq/nc/nuclear_correlation.py +356 -0
- segtraq-0.0.2/src/segtraq/nc/utils.py +125 -0
- segtraq-0.0.2/src/segtraq/pl/__init__.py +17 -0
- segtraq-0.0.2/src/segtraq/pl/plotting_functions.py +562 -0
- segtraq-0.0.2/src/segtraq/ps/__init__.py +6 -0
- segtraq-0.0.2/src/segtraq/ps/point_statistics.py +272 -0
- segtraq-0.0.2/src/segtraq/sp/__init__.py +8 -0
- segtraq-0.0.2/src/segtraq/sp/supervised.py +527 -0
- segtraq-0.0.2/src/segtraq/utils.py +875 -0
- segtraq-0.0.2/src/segtraq/vl/__init__.py +3 -0
- segtraq-0.0.2/src/segtraq/vl/volume.py +115 -0
- segtraq-0.0.2/src/segtraq.egg-info/PKG-INFO +55 -0
- segtraq-0.0.2/src/segtraq.egg-info/SOURCES.txt +32 -0
- segtraq-0.0.2/src/segtraq.egg-info/dependency_links.txt +1 -0
- segtraq-0.0.2/src/segtraq.egg-info/entry_points.txt +2 -0
- segtraq-0.0.2/src/segtraq.egg-info/requires.txt +31 -0
- segtraq-0.0.2/src/segtraq.egg-info/top_level.txt +1 -0
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
Contributions are welcome, and they are greatly appreciated! Every little bit helps, and credit will always be given.
|
|
4
|
+
|
|
5
|
+
You can contribute in many ways:
|
|
6
|
+
|
|
7
|
+
## Types of Contributions
|
|
8
|
+
|
|
9
|
+
### Report Bugs
|
|
10
|
+
|
|
11
|
+
Report bugs at https://github.com/LazDaria/segtraq/issues.
|
|
12
|
+
|
|
13
|
+
If you are reporting a bug, please include:
|
|
14
|
+
|
|
15
|
+
- Your operating system name and version.
|
|
16
|
+
- Any details about your local setup that might be helpful in troubleshooting.
|
|
17
|
+
- Detailed steps to reproduce the bug.
|
|
18
|
+
|
|
19
|
+
### Fix Bugs
|
|
20
|
+
|
|
21
|
+
Look through the GitHub issues for bugs. Anything tagged with "bug" and "help wanted" is open to whoever wants to implement it.
|
|
22
|
+
|
|
23
|
+
### Implement Features
|
|
24
|
+
|
|
25
|
+
Look through the GitHub issues for features. Anything tagged with "enhancement" and "help wanted" is open to whoever wants to implement it.
|
|
26
|
+
|
|
27
|
+
### Write Documentation
|
|
28
|
+
|
|
29
|
+
SegTraQ could always use more documentation, whether as part of the official docs, in docstrings, or even on the web in blog posts, articles, and such.
|
|
30
|
+
|
|
31
|
+
### Submit Feedback
|
|
32
|
+
|
|
33
|
+
The best way to send feedback is to file an issue at https://github.com/LazDaria/segtraq/issues.
|
|
34
|
+
|
|
35
|
+
If you are proposing a feature:
|
|
36
|
+
|
|
37
|
+
- Explain in detail how it would work.
|
|
38
|
+
- Keep the scope as narrow as possible, to make it easier to implement.
|
|
39
|
+
- Remember that this is a volunteer-driven project, and that contributions are welcome :)
|
|
40
|
+
|
|
41
|
+
## Get Started!
|
|
42
|
+
|
|
43
|
+
Ready to contribute? Here's how to set up `segtraq` for local development.
|
|
44
|
+
|
|
45
|
+
1. Fork the `segtraq` repo on GitHub.
|
|
46
|
+
2. Clone your fork locally:
|
|
47
|
+
|
|
48
|
+
```sh
|
|
49
|
+
git clone git@github.com:your_name_here/segtraq.git
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
3. Install your local copy into a virtualenv. Assuming you have virtualenvwrapper installed, this is how you set up your fork for local development:
|
|
53
|
+
|
|
54
|
+
```sh
|
|
55
|
+
mkvirtualenv segtraq
|
|
56
|
+
cd segtraq/
|
|
57
|
+
python setup.py develop
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
4. Create a branch for local development:
|
|
61
|
+
|
|
62
|
+
```sh
|
|
63
|
+
git checkout -b name-of-your-bugfix-or-feature
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Now you can make your changes locally.
|
|
67
|
+
|
|
68
|
+
5. When you're done making changes, check that your changes pass flake8 and the tests, including testing other Python versions with tox:
|
|
69
|
+
|
|
70
|
+
```sh
|
|
71
|
+
make lint
|
|
72
|
+
make test
|
|
73
|
+
# Or
|
|
74
|
+
make test-all
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
To get flake8 and tox, just pip install them into your virtualenv.
|
|
78
|
+
|
|
79
|
+
6. Commit your changes and push your branch to GitHub:
|
|
80
|
+
|
|
81
|
+
```sh
|
|
82
|
+
git add .
|
|
83
|
+
git commit -m "Your detailed description of your changes."
|
|
84
|
+
git push origin name-of-your-bugfix-or-feature
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
7. Submit a pull request through the GitHub website.
|
|
88
|
+
|
|
89
|
+
## Pull Request Guidelines
|
|
90
|
+
|
|
91
|
+
Before you submit a pull request, check that it meets these guidelines:
|
|
92
|
+
|
|
93
|
+
1. The pull request should include tests.
|
|
94
|
+
2. If the pull request adds functionality, the docs should be updated. Put your new functionality into a function with a docstring, and add the feature to the list in README.md.
|
|
95
|
+
3. The pull request should work for Python 3.12 and 3.13. Tests run in GitHub Actions on every pull request to the main branch, make sure that the tests pass for all supported Python versions.
|
|
96
|
+
|
|
97
|
+
## Tips
|
|
98
|
+
|
|
99
|
+
To run a subset of tests:
|
|
100
|
+
|
|
101
|
+
```sh
|
|
102
|
+
pytest tests.test_segtraq
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
## Deploying
|
|
106
|
+
|
|
107
|
+
A reminder for the maintainers on how to deploy. Make sure all your changes are committed (including an entry in HISTORY.md). Then run:
|
|
108
|
+
|
|
109
|
+
```sh
|
|
110
|
+
bump2version patch # possible: major / minor / patch
|
|
111
|
+
git push
|
|
112
|
+
git push --tags
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
You can set up a [GitHub Actions workflow](https://docs.github.com/en/actions/use-cases-and-examples/building-and-testing/building-and-testing-python#publishing-to-pypi) to automatically deploy your package to PyPI when you push a new tag.
|
|
116
|
+
|
|
117
|
+
## Code of Conduct
|
|
118
|
+
|
|
119
|
+
Please note that this project is released with a [Contributor Code of Conduct](CODE_OF_CONDUCT.md). By participating in this project you agree to abide by its terms.
|
segtraq-0.0.2/HISTORY.md
ADDED
segtraq-0.0.2/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025, Daria Lazic, Matthias Meyer-Bender, Martin Emons
|
|
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,12 @@
|
|
|
1
|
+
include README.md
|
|
2
|
+
include LICENSE
|
|
3
|
+
include HISTORY.md
|
|
4
|
+
include CONTRIBUTING.md
|
|
5
|
+
|
|
6
|
+
# Include all Python files and package data
|
|
7
|
+
recursive-include src/segtraq *.py
|
|
8
|
+
recursive-include src/segtraq *.json *.csv *.txt # any necessary package data
|
|
9
|
+
|
|
10
|
+
# Exclude tests, docs, and large files
|
|
11
|
+
recursive-exclude tests *
|
|
12
|
+
recursive-exclude docs *
|
segtraq-0.0.2/PKG-INFO
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: segtraq
|
|
3
|
+
Version: 0.0.2
|
|
4
|
+
Summary: SegTraQ - A Python toolkit for quantitative and visual quality control of segmentation and transcript assignment in spatial omics data.
|
|
5
|
+
Author-email: Daria Lazic <daria.lazic@embl.de>, Matthias Meyer-Bender <matthias.meyerbender@embl.de>, Martin Emons <martin.emons@uzh.ch>
|
|
6
|
+
Maintainer-email: Daria Lazic <daria.lazic@embl.de>, Matthias Meyer-Bender <matthias.meyerbender@embl.de>, Martin Emons <martin.emons@uzh.ch>
|
|
7
|
+
License: MIT
|
|
8
|
+
Project-URL: bugs, https://github.com/LazDaria/segtraq/issues
|
|
9
|
+
Project-URL: changelog, https://github.com/LazDaria/segtraq/blob/master/changelog.md
|
|
10
|
+
Project-URL: homepage, https://github.com/LazDaria/segtraq
|
|
11
|
+
Requires-Python: >=3.11
|
|
12
|
+
Description-Content-Type: text/markdown
|
|
13
|
+
License-File: LICENSE
|
|
14
|
+
Requires-Dist: typer
|
|
15
|
+
Requires-Dist: scanpy
|
|
16
|
+
Requires-Dist: spatialdata
|
|
17
|
+
Requires-Dist: joblib
|
|
18
|
+
Requires-Dist: geopandas
|
|
19
|
+
Requires-Dist: igraph
|
|
20
|
+
Requires-Dist: rtree
|
|
21
|
+
Requires-Dist: rasterio
|
|
22
|
+
Requires-Dist: squidpy>=1.6.2
|
|
23
|
+
Requires-Dist: tqdm
|
|
24
|
+
Requires-Dist: anndata
|
|
25
|
+
Provides-Extra: test
|
|
26
|
+
Requires-Dist: coverage; extra == "test"
|
|
27
|
+
Requires-Dist: pytest; extra == "test"
|
|
28
|
+
Requires-Dist: ruff; extra == "test"
|
|
29
|
+
Requires-Dist: ty; extra == "test"
|
|
30
|
+
Requires-Dist: ipdb; extra == "test"
|
|
31
|
+
Requires-Dist: black[jupyter]; extra == "test"
|
|
32
|
+
Requires-Dist: pytest-cov; extra == "test"
|
|
33
|
+
Provides-Extra: docs
|
|
34
|
+
Requires-Dist: sphinx; extra == "docs"
|
|
35
|
+
Requires-Dist: sphinx-book-theme; extra == "docs"
|
|
36
|
+
Requires-Dist: myst-parser; extra == "docs"
|
|
37
|
+
Requires-Dist: nbsphinx; extra == "docs"
|
|
38
|
+
Requires-Dist: sphinx-autodoc-typehints; extra == "docs"
|
|
39
|
+
Requires-Dist: sphinx-copybutton; extra == "docs"
|
|
40
|
+
Requires-Dist: pandoc; extra == "docs"
|
|
41
|
+
Requires-Dist: pygments; extra == "docs"
|
|
42
|
+
Requires-Dist: ipython; extra == "docs"
|
|
43
|
+
Dynamic: license-file
|
|
44
|
+
|
|
45
|
+
# SegTraQ
|
|
46
|
+
|
|
47
|
+
[](https://badge.fury.io/py/segtraq)
|
|
48
|
+
|
|
49
|
+
SegTraQ - **Seg**mentation and **Tra**nscript Assignment **Q**uality Control - A Python toolkit for quantitative and visual quality control of segmentation and transcript assignment in spatial omics data.
|
|
50
|
+
|
|
51
|
+
* Documentation: https://lazdaria.github.io/SegTraQ
|
|
52
|
+
* PyPI package: https://pypi.org/search/segtraq
|
|
53
|
+
|
|
54
|
+
> ⚠️ Note: SegTraQ is under active development.
|
|
55
|
+
> Features, interfaces, and functionality may change in upcoming releases.
|
segtraq-0.0.2/README.md
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# SegTraQ
|
|
2
|
+
|
|
3
|
+
[](https://badge.fury.io/py/segtraq)
|
|
4
|
+
|
|
5
|
+
SegTraQ - **Seg**mentation and **Tra**nscript Assignment **Q**uality Control - A Python toolkit for quantitative and visual quality control of segmentation and transcript assignment in spatial omics data.
|
|
6
|
+
|
|
7
|
+
* Documentation: https://lazdaria.github.io/SegTraQ
|
|
8
|
+
* PyPI package: https://pypi.org/search/segtraq
|
|
9
|
+
|
|
10
|
+
> ⚠️ Note: SegTraQ is under active development.
|
|
11
|
+
> Features, interfaces, and functionality may change in upcoming releases.
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "segtraq"
|
|
3
|
+
version = "0.0.2"
|
|
4
|
+
description = "SegTraQ - A Python toolkit for quantitative and visual quality control of segmentation and transcript assignment in spatial omics data."
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
authors = [
|
|
7
|
+
{name = "Daria Lazic", email = "daria.lazic@embl.de"},
|
|
8
|
+
{name = "Matthias Meyer-Bender", email = "matthias.meyerbender@embl.de"},
|
|
9
|
+
{name = "Martin Emons", email = "martin.emons@uzh.ch"}
|
|
10
|
+
]
|
|
11
|
+
maintainers = [
|
|
12
|
+
{name = "Daria Lazic", email = "daria.lazic@embl.de"},
|
|
13
|
+
{name = "Matthias Meyer-Bender", email = "matthias.meyerbender@embl.de"},
|
|
14
|
+
{name = "Martin Emons", email = "martin.emons@uzh.ch"}
|
|
15
|
+
]
|
|
16
|
+
classifiers = [
|
|
17
|
+
|
|
18
|
+
]
|
|
19
|
+
license = {text = "MIT"}
|
|
20
|
+
dependencies = [
|
|
21
|
+
"typer",
|
|
22
|
+
"scanpy",
|
|
23
|
+
"spatialdata",
|
|
24
|
+
"joblib",
|
|
25
|
+
"geopandas",
|
|
26
|
+
"igraph",
|
|
27
|
+
"rtree",
|
|
28
|
+
"rasterio",
|
|
29
|
+
"squidpy>=1.6.2",
|
|
30
|
+
"tqdm",
|
|
31
|
+
"anndata",
|
|
32
|
+
]
|
|
33
|
+
requires-python = ">= 3.11"
|
|
34
|
+
|
|
35
|
+
[project.optional-dependencies]
|
|
36
|
+
test = [
|
|
37
|
+
"coverage",
|
|
38
|
+
"pytest",
|
|
39
|
+
"ruff",
|
|
40
|
+
"ty",
|
|
41
|
+
"ipdb",
|
|
42
|
+
"black[jupyter]",
|
|
43
|
+
"pytest-cov",
|
|
44
|
+
]
|
|
45
|
+
|
|
46
|
+
docs = [
|
|
47
|
+
"sphinx",
|
|
48
|
+
"sphinx-book-theme", # or another theme you prefer
|
|
49
|
+
"myst-parser", # if you want to support markdown in Sphinx
|
|
50
|
+
"nbsphinx", # for rendering Jupyter notebooks in Sphinx
|
|
51
|
+
"sphinx-autodoc-typehints", # for better type hint rendering in
|
|
52
|
+
"sphinx-copybutton", # for copy buttons in code blocks
|
|
53
|
+
"pandoc",
|
|
54
|
+
"pygments",
|
|
55
|
+
"ipython",
|
|
56
|
+
]
|
|
57
|
+
|
|
58
|
+
[project.urls]
|
|
59
|
+
|
|
60
|
+
bugs = "https://github.com/LazDaria/segtraq/issues"
|
|
61
|
+
changelog = "https://github.com/LazDaria/segtraq/blob/master/changelog.md"
|
|
62
|
+
homepage = "https://github.com/LazDaria/segtraq"
|
|
63
|
+
|
|
64
|
+
[tool.setuptools]
|
|
65
|
+
package-dir = {"" = "src"}
|
|
66
|
+
|
|
67
|
+
[tool.setuptools.packages.find]
|
|
68
|
+
where = ["src"]
|
|
69
|
+
exclude = ["tests", "tests.*", "docs", "examples", "data", "data.*"]
|
|
70
|
+
|
|
71
|
+
[project.scripts]
|
|
72
|
+
segtraq = "segtraq.cli:app"
|
|
73
|
+
|
|
74
|
+
[tool.ty]
|
|
75
|
+
# All rules are enabled as "error" by default; no need to specify unless overriding.
|
|
76
|
+
# Example override: relax a rule for the entire project (uncomment if needed).
|
|
77
|
+
# rules.TY015 = "warn" # For invalid-argument-type, warn instead of error.
|
|
78
|
+
|
|
79
|
+
# Optional: Per-directory overrides for flexibility in boilerplates with tests or examples.
|
|
80
|
+
[[tool.ty.overrides]]
|
|
81
|
+
match = ["tests/**.py"]
|
|
82
|
+
rules.TY016 = "ignore" # Ignore invalid-assignment in tests, e.g., for dynamic fixtures.
|
|
83
|
+
rules.TY029 = "ignore" # Ignore invalid-return-type in tests.
|
|
84
|
+
|
|
85
|
+
[tool.ruff]
|
|
86
|
+
line-length = 120
|
|
87
|
+
|
|
88
|
+
[tool.black]
|
|
89
|
+
line-length = 120
|
|
90
|
+
|
|
91
|
+
[tool.ruff.lint]
|
|
92
|
+
select = [
|
|
93
|
+
"E", # pycodestyle errors
|
|
94
|
+
"W", # pycodestyle warnings
|
|
95
|
+
"F", # Pyflakes
|
|
96
|
+
"I", # isort
|
|
97
|
+
"B", # flake8-bugbear
|
|
98
|
+
"UP", # pyupgrade
|
|
99
|
+
]
|
|
100
|
+
|
|
101
|
+
[tool.uv]
|
|
102
|
+
package = true
|
segtraq-0.0.2/setup.cfg
ADDED