Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
125 commits
Select commit Hold shift + click to select a range
f540d55
Update source with black code formatter.
newmana Jun 2, 2025
9752610
Fix some quality issues.
newmana Jun 3, 2025
2df8559
Update project configuration.
newmana Jun 3, 2025
34af76b
Improve list of files to ignore.
newmana Jun 3, 2025
7b762c4
Small reformat.
newmana Jun 3, 2025
c301830
More style issues.
newmana Jun 3, 2025
b4cfc6b
Fix style issues.
newmana Jun 3, 2025
27e081d
More style issues.
newmana Jun 3, 2025
cc5a738
Fix types.
newmana Jun 3, 2025
03fb048
Fix names.
newmana Jun 4, 2025
7ae4580
Fix types.
newmana Jun 4, 2025
13f0074
Use float instead of int for reading in pxl coordinates.
newmana Jun 4, 2025
d9f7d8d
Fix more types.
newmana Jun 4, 2025
353a668
Fixing small mistakes in formatting and doco.
newmana Jun 4, 2025
b68174c
Misc fixes to typing and documentation.
newmana Jun 4, 2025
7be6dd6
Update numpy, tensorflow and numba.
newmana Jun 4, 2025
9736e34
More fixes.
newmana Jun 5, 2025
d8fff79
Ignore site packages.
newmana Jun 5, 2025
0f32bfa
Fixing types - especially in logging.
newmana Jun 5, 2025
eb94410
Fixing types.
newmana Jun 5, 2025
5b835de
Fixing types.
newmana Jun 5, 2025
7e1407a
Fix up missing exports.
newmana Jun 5, 2025
127d022
Fix up types.
newmana Jun 5, 2025
f3d70d6
Fixing types.
newmana Jun 6, 2025
74e656c
Remove Literal shim.
newmana Jun 6, 2025
b3e5b78
Reformat.
newmana Jun 6, 2025
f2ed7fd
Fix style checks.
newmana Jun 6, 2025
eb12b69
Reformat.
newmana Jun 6, 2025
6e4a45c
Reformat.
newmana Jun 6, 2025
34e636e
Upgrade numba and numpy.
newmana Jun 8, 2025
67c999d
WIP.
newmana Jun 9, 2025
3ed0539
Add tests and fix bug.
newmana Jun 9, 2025
38829f6
Fixup type checking.
newmana Jun 10, 2025
70381ca
Fix warnings and deprecated call of legendHandles.
newmana Jun 10, 2025
ae7f4bb
Remove deprecated np warnings.
newmana Jun 10, 2025
e7c8324
Add tests for feature extraction.
newmana Jun 10, 2025
9e5f8b8
Oops.
newmana Jun 10, 2025
242a7de
Oops.
newmana Jun 10, 2025
3d96012
Refactor.
newmana Jun 10, 2025
3b04b30
Fix.
newmana Jun 10, 2025
86a8232
Fix.
newmana Jun 10, 2025
7a7f9ed
Fix.
newmana Jun 10, 2025
a159053
Fix.
newmana Jun 10, 2025
e3e9bfc
Fix.
newmana Jun 10, 2025
c9b0e42
Don't have plot fail if already called before.
newmana Jun 11, 2025
4200d2b
Fix up copy semantics.
newmana Jun 11, 2025
21f7e94
Only support 3.10 for now.
newmana Jun 11, 2025
1f5e329
Only support 3.10 for now.
newmana Jun 11, 2025
db8b19d
Make similar to previous code.
newmana Jun 11, 2025
7885722
Make similar to previous code.
newmana Jun 12, 2025
e1d9db5
Don't need to check if copy is on - just return.
newmana Jun 12, 2025
e82fd28
Small fixes to types and name.
newmana Jun 12, 2025
fda0ca5
Add old one back again.
newmana Jun 12, 2025
9c9e1e8
Add old one back again.
newmana Jun 12, 2025
63b4d74
Add old tiling back.
newmana Jun 12, 2025
2c996a5
Fix style, remove old methods.
newmana Jun 12, 2025
cdc37a0
Fix documentation.
newmana Jun 12, 2025
d980bda
Update.
newmana Jun 12, 2025
49aa9c6
Add more quality control steps.
newmana Jun 13, 2025
45cb689
Add some checks and refactor into methods.
newmana Jun 14, 2025
a07552f
Small fixes.
newmana Jun 23, 2025
50e7fb3
Merge remote-tracking branch 'origin/newmana/upgrade' into newmana/up…
newmana Jun 23, 2025
e705862
Add filter_cells wrapper.
newmana Jun 23, 2025
abad4f5
Fix default parameters and add documentation.
newmana Jun 23, 2025
472e3c7
Renamed keys by mistake.
newmana Jul 1, 2025
ffaa7bb
Rename release to 0.5.0 and add to history.
newmana Jul 1, 2025
2533fc4
Add check for available clusters and improve documentation.
newmana Jul 1, 2025
2842609
If list_clusters is empty just use all clusters.
newmana Jul 1, 2025
cc3cf66
Set boto3 version.
newmana Jul 1, 2025
7065054
Remove.
newmana Jul 1, 2025
c6ae6b3
Remove double check of quants being np.array
newmana Jul 2, 2025
3297fd6
Fix type check.
newmana Jul 2, 2025
f455039
Fixed up more type checks and created external types.
newmana Jul 2, 2025
c0f3074
Weird renaming issue.
newmana Jul 2, 2025
d899a56
Assume .uns[split_node] is string to list of strings.
newmana Jul 2, 2025
3d4b6d1
Fix some typing and use ~ instead of not inside selector.
newmana Jul 2, 2025
39e4d3c
Oops.
newmana Jul 2, 2025
5196a3e
Update copyright.
newmana Jul 2, 2025
697a12a
Update versions.
newmana Jul 2, 2025
3ce4684
Add downloading xenium artifacts. Reformat.
newmana Jul 3, 2025
cf7cd05
Expose.
newmana Jul 3, 2025
615febd
Fix documentation.
newmana Jul 3, 2025
f432132
Fix types, read experiment file and apply coordinate translation.
newmana Jul 3, 2025
86806cc
Fix.
newmana Jul 3, 2025
8873c26
Fix.
newmana Jul 3, 2025
99e820e
Fix logic and filename.
newmana Jul 3, 2025
c5b0160
Add to docs.
newmana Jul 3, 2025
c6413a5
Update changes.
newmana Jul 3, 2025
37f4823
Fix formatting
newmana Jul 3, 2025
b95aa12
Fix parameter.
newmana Jul 3, 2025
d6a3cfa
Set location of colorbar to be center left rather than best.
newmana Jul 4, 2025
5a30d31
Use scanpy to get data instead of one bc sample in dropbox.
newmana Jul 5, 2025
73eb7ba
Use scanpy to get data instead of one bc sample in dropbox.
newmana Jul 5, 2025
c815d24
Use scanpy to get data instead of one bc sample in dropbox.
newmana Jul 5, 2025
ab3bd6f
Use scanpy to get data instead of one bc sample in dropbox.
newmana Jul 5, 2025
7c572a6
Fix datasetdir.
newmana Jul 5, 2025
5f4f3a2
No loc in colorbar.
newmana Jul 5, 2025
1f9424e
Fix error message.
newmana Jul 5, 2025
3fc4f60
Fix calling to centroidpython.
newmana Jul 5, 2025
24c402f
Fix bug.
newmana Jul 5, 2025
afb8a9f
Fixup use of categories from cluster names in plotting and make consi…
newmana Jul 5, 2025
e6f4109
Change format of lrfeatures (so that it persists) and cleanup.
newmana Jul 6, 2025
cae052e
Fix formatting.
newmana Jul 6, 2025
e27cf0a
Fixup documentation.
newmana Jul 6, 2025
4e9453b
Fixup documentation.
newmana Jul 6, 2025
9ad8672
Custom.
newmana Jul 6, 2025
48f84b9
All tutorials.
newmana Jul 6, 2025
d7e8dc8
Add downloading the tutorial from google drive.
newmana Jul 6, 2025
8d940e8
Upgrade.
newmana Jul 6, 2025
f046d88
Fix import issues.
newmana Jul 6, 2025
203c9e5
Fix import issues.
newmana Jul 6, 2025
07fd196
Try.
newmana Jul 6, 2025
9f6c048
Forgot.
newmana Jul 6, 2025
f7a2dcc
Forgot.
newmana Jul 6, 2025
3fa76e4
Forgot.
newmana Jul 6, 2025
6b0d249
Try.
newmana Jul 6, 2025
84b0123
Try.
newmana Jul 6, 2025
b3f77ad
Try.
newmana Jul 6, 2025
2888c06
Just rely on project installation.
newmana Jul 6, 2025
df82f78
Sphinx gets confused with renaming package imports. Making more consi…
newmana Jul 7, 2025
1f2b433
Update.
newmana Jul 7, 2025
a53551c
Merge branch 'master' into newmana/upgrade
newmana Jul 7, 2025
a0f8239
Install dev and test dependencies.
newmana Jul 7, 2025
d38e1dc
Fix formatting
newmana Jul 7, 2025
2fc7343
Remvoe todo.
newmana Jul 7, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,14 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
pip install -e .[dev,test]
- name: Check style
run: |
black stlearn tests
ruff check stlearn tests
- name: Check types
run: |
mypy stlearn tests
- name: Test with pytest
run: |
pytest
pytest
68 changes: 59 additions & 9 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,21 +1,71 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
*.pyc
.ipynb_checkpoints
*/.ipynb_checkpoints/*

# C extensions
*.so

# Distribution / packaging
.Python
build/
docs/api/
docs/_build/
docs/generated/
data/samples
develop-eggs/
dist/
*.egg-info
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# Unit tests / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# Jupyter Notebook
.ipynb_checkpoints
*/.ipynb_checkpoints/*
/*.ipynb

# Data files
/*.csv
output/

# MacOS caching
.DS_Store
*/.DS_Store

# PyCharm etc
.idea/
docs/_build

# Sphinx documentation
docs.bk/_build

# Distribution/package/temporary files
data/
tiling/
.pytest_cache
figures/
*.h5ad
inferCNV/
stlearn/tools/microenv/cci/junk_code.py
stlearn/tools/microenv/cci/.Rhistory
25 changes: 23 additions & 2 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,25 @@
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Set the OS, Python version, and other tools you might need
build:
image: latest
os: ubuntu-24.04
tools:
python: "3.10"

# Build documentation in the "docs/" directory with Sphinx
sphinx:
configuration: docs/conf.py

# Optionally, but recommended,
# declare the Python requirements required to build your documentation
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
python:
version: 3.8
install:
- method: pip
path: .
extra_requirements:
- dev
7 changes: 5 additions & 2 deletions AUTHORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@ Credits
Development Lead
----------------

* Genomics and Machine Learning lab
* Genomics and Machine Learning Lab

Contributors
------------

None yet. Why not be the first?
* Brad Balderson
* Andrew Newman
* Duy Pham
* Xiao Tan
28 changes: 19 additions & 9 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -64,26 +64,36 @@ Ready to contribute? Here's how to set up `stlearn` for local development.

$ git clone git@github.com:your_name_here/stlearn.git

3. Install your local copy into a virtualenv. Assuming you have virtualenvwrapper installed, this is how you set up your fork for local development::
3. Install your local copy into a virtualenv. This is how you set up your fork for local development::

$ mkvirtualenv stlearn
$ conda create -n stlearn-dev python=3.10 --y
$ conda activate stlearn-dev
$ cd stlearn/
$ python setup.py develop
$ pip install -e .[dev,test]

Or if you prefer pip/virtualenv::

$ python -m venv stlearn-env
$ source stlearn-env/bin/activate # On Windows: stlearn-env\Scripts\activate
$ cd stlearn/
$ pip install -e .[dev,test]

4. Create a branch for local development::

$ git checkout -b name-of-your-bugfix-or-feature

Now you can make your changes locally.

5. When you're done making changes, check that your changes pass flake8 and the
tests, including testing other Python versions with tox::
5. When you're done making changes, check that your changes pass linters and tests::

$ flake8 stlearn tests
$ python setup.py test or pytest
$ tox
$ black stlearn tests
$ ruff check stlearn tests
$ mypy stlearn tests
$ pytest

Or run everything with tox::

To get flake8 and tox, just pip install them into your virtualenv.
$ tox

6. Commit your changes and push your branch to GitHub::

Expand Down
27 changes: 27 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,51 @@
History
=======

1.1.0 (2025-07-02)
------------------
* Support Python 3.10.x
* Added quality checks black, ruff and mypy and fixed appropriate source code.
* Copy parameters now work with the same semantics as scanpy.
* Library upgrades for leidenalg, louvain, numba, numpy, scanpy, and tensorflow.
* datasets.xenium_sge - loads Xenium data (and caches it) similar to scanpy.visium_sge.

API and Bug Fixes:
* Xenium TIFF and cell positions are now aligned.
* Consistent with type annotations - mainly missing None annotations.
* pl.cluster_plot - Does not keep colours from previous runs when clustering.
* pl.trajectory.pseudotime_plot - Fix typing of cluster values in .uns["split_node"].
* Removed datasets.example_bcba - Replaced with wrapper for scanpy.visium_sge.
* Moved spatials directory to spatial, cleaned up pl and tl packages.

0.4.11 (2022-11-25)
------------------

0.4.10 (2022-11-22)
------------------

0.4.8 (2022-06-15)
------------------

0.4.7 (2022-03-28)
------------------

0.4.6 (2022-03-09)
------------------

0.4.5 (2022-03-02)
------------------

0.4.0 (2022-02-03)
------------------

0.3.2 (2021-03-29)
------------------

0.3.1 (2020-12-24)
------------------

0.2.7 (2020-09-12)
------------------

0.2.6 (2020-08-04)
------------------
4 changes: 1 addition & 3 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@


BSD License

Copyright (c) 2020, Genomics and Machine Learning lab
Copyright (c) 2020-2025, Genomics and Machine Learning lab
All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
Expand Down
8 changes: 4 additions & 4 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = python -msphinx
SPHINXPROJ = stlearn
# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = .
BUILDDIR = _build

Expand Down
5 changes: 5 additions & 0 deletions docs/_static/css/custom.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/* Custom styling for stLearn documentation */

p img {
vertical-align: bottom
}
Loading