celldega 0.11.1 → 0.13.0-alpha.1

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.
package/README.md CHANGED
@@ -1,68 +1,149 @@
1
- # celldega
1
+ ![Celldega banner](public/assets/banner.svg)
2
2
 
3
- ## Documentation
4
- https://broadinstitute.github.io/celldega/
3
+ [![PyPI version](https://badge.fury.io/py/celldega.svg)](https://badge.fury.io/py/celldega)
4
+ [![Python](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/)
5
+ [![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
6
+ [![Documentation](https://img.shields.io/badge/docs-latest-brightgreen.svg)](https://broadinstitute.github.io/celldega/)
5
7
 
6
- ## Installation
8
+ > **Interactive spatial‑omics analysis & visualisation toolkit for single‑cell and spatial transcriptomics data**
7
9
 
8
- ```sh
10
+ **Celldega** combines scalable computational pipelines with GPU‑accelerated, web‑native visualisations so you can explore **millions of cells and transcripts** directly inside Jupyter Lab, VS Code, or any modern browser. Built for researchers working with Xenium, Visium HD, MERFISH, and other spatial omics technologies.
11
+
12
+ ## 🚀 Quick Start (30 min)
13
+
14
+ ### Installation
15
+
16
+ ```bash
9
17
  pip install celldega
10
18
  ```
11
19
 
12
- ### Note on VIPS Installation
13
- If running on a new Terra.bio workspace you will need to install vips in a startup script (e.g., startup_script.sh) with the following
20
+ ### For Terra.bio Users
14
21
 
15
- ```
16
- #!/bin/bash
17
- apt update
18
- apt install -y libvips
19
- apt install -y libvips-tools
20
- apt install -y libvips-dev
22
+ Add this to your startup script for image processing features ([more info](https://support.terra.bio/hc/en-us/articles/360058193872-Preconfigure-a-Cloud-Environment-with-a-startup-script)):
23
+
24
+ ```bash
25
+ apt update && apt install -y libvips libvips-tools libvips-dev
21
26
  ```
22
27
 
23
- Please see Terra.bio [documentation](https://support.terra.bio/hc/en-us/articles/360058193872-Preconfigure-a-Cloud-Environment-with-a-startup-script) for more information.
28
+ ### Example Usage
24
29
 
25
- ## Development installation
30
+ ```python
31
+ base_url = 'https://raw.githubusercontent.com/broadinstitute/celldega_Xenium_Prime_Human_Skin_FFPE_outs/main/Xenium_Prime_Human_Skin_FFPE_outs'
26
32
 
27
- Create a virtual environment and and install celldega in *editable* mode with the
28
- optional development dependencies:
33
+ landscape_ist = dega.viz.Landscape(
34
+ technology='Xenium',
35
+ ini_zoom = -4.5,
36
+ ini_x=6000,
37
+ ini_y=8000,
38
+ base_url = base_url,
39
+ height = 700,
40
+ width= 600
41
+ )
29
42
 
30
- ```sh
31
- python -m venv .venv
32
- source .venv/bin/activate
33
- pip install -e ".[dev]"
43
+ file_path = 'https://raw.githubusercontent.com/broadinstitute/celldega_Xenium_Prime_Human_Skin_FFPE_outs/main/Xenium_Prime_Human_Skin_FFPE_outs/df_sig.parquet'
44
+ df = pd.read_parquet(file_path)
45
+
46
+ network = dega.clust.hc(df)
47
+ mat = dega.viz.Matrix(network=network, width=500, height=500)
48
+
49
+ dega.viz.landscape_matrix(landscape_ist, mat)
34
50
  ```
35
51
 
36
- You then need to install the JavaScript dependencies and run the development server.
52
+ ![Celldega Demo](public/assets/celldega-demo.png)
53
+
54
+ ## 📖 Documentation & Examples
55
+
56
+ - **[📚 Documentation](https://broadinstitute.github.io/celldega/)** - Complete guides and API reference
57
+ - **[🖼️ Gallery](https://broadinstitute.github.io/celldega/gallery/)** - Interactive visualization demos
58
+ - **[📓 Examples](https://github.com/broadinstitute/celldega/tree/refactor-v0/notebooks)** - Jupyter notebooks you can run locally
59
+ - **[🐍 Python API](https://broadinstitute.github.io/celldega/python/)** - Complete Python API
60
+ - **[🌐 JavaScript API](https://broadinstitute.github.io/celldega/javascript/api/)** - Complete JavaScript API
37
61
 
38
- ```sh
39
- npm install
62
+ ## 🛠️ Development Setup (for Contributors)
63
+
64
+ **Get started contributing in 2 minutes:**
65
+
66
+ ```bash
67
+ git clone https://github.com/broadinstitute/celldega.git
68
+ cd celldega
69
+
70
+ bash ./scripts/setup.sh
71
+
72
+ source dega/bin/activate
40
73
  npm run dev
41
74
  ```
42
75
 
43
- Open `example.ipynb` in JupyterLab, VS Code, or your favorite editor
44
- to start developing. Changes made in `js/` will be reflected
45
- in the notebook.
76
+ See our [Contributing Guide](CONTRIBUTING.md) for detailed instructions.
46
77
 
47
- ### PyPI
48
- Increment version in `project.toml` and
78
+ ## 🏗️ Repository Structure
49
79
 
50
- ```
51
- $ hatch build
52
- $ hatch publish
53
- ```
80
+ | Directory/File | Purpose |
81
+ | --------------- | -------------------------------------- |
82
+ | `src/celldega/` | 🐍 Core Python package |
83
+ | `js/` | 🌐 JavaScript widgets & visualizations |
84
+ | `examples/` | 📓 Jupyter notebook examples |
85
+ | `docs/` | 📚 Documentation source |
86
+ | `js/__tests__/` | 🧪 JS/TS Test suites |
87
+ | `tests/` | 🧪 Python Test suites |
88
+ | `scripts/` | 🔧 Development utilities |
54
89
 
55
- #### Hatch Development
56
- ```
57
- $ hatch env prune # Remove old environments
58
- $ hatch env create # Create a new environment based on pyproject.toml
59
- $ hatch shell # Activate the new environment
60
- ```
90
+ ## 🤝 Contributing
61
91
 
62
- ### NPM
63
- Increment version in `package.json` and
92
+ We welcome contributions from the bio community! Whether you're a:
64
93
 
94
+ - 🧬 **Researcher** - Share datasets, create tutorials, improve documentation
95
+ - 👩‍💻 **Developer** - Add features, fix bugs, optimize performance
96
+ - 📚 **Educator** - Create educational content, examples, workshops
97
+ - 🎨 **Designer** - Improve visualizations, user experience, documentation
98
+
99
+ **Getting started:**
100
+
101
+ 1. Read our [Contributing Guide](CONTRIBUTING.md)
102
+ 2. Check [open issues](https://github.com/broadinstitute/celldega/issues) for ideas
103
+ 3. Join [discussions](https://github.com/broadinstitute/celldega/discussions) to ask questions
104
+
105
+ ## 🆘 Getting Help
106
+
107
+ **Questions about using Celldega?**
108
+
109
+ - 💬 [Discussions](https://github.com/broadinstitute/celldega/discussions) - Ask the community
110
+ - 📖 [Documentation](https://broadinstitute.github.io/celldega/) - Comprehensive guides
111
+ - 📓 [Examples](examples/) - Working code you can adapt
112
+
113
+ **Found a bug or want a feature?**
114
+
115
+ - 🐛 [Report bugs](https://github.com/broadinstitute/celldega/issues/new?template=bug_report.md)
116
+ - ✨ [Request features](https://github.com/broadinstitute/celldega/issues/new?template=feature_request.md)
117
+
118
+ ## 📊 Citation
119
+
120
+ If Celldega helps your research, please cite us:
121
+
122
+ ```bibtex
123
+ @software{celldega,
124
+ title = {Celldega: Interactive spatial‑omics analysis & visualisation toolkit},
125
+ author = {{Broad Institute}},
126
+ url = {https://github.com/broadinstitute/celldega},
127
+ version = {0.12.0},
128
+ year = {2025}
129
+ }
65
130
  ```
66
- $ npm run build
67
- $ npm publish
68
- ```
131
+
132
+ ## 🏛️ About
133
+
134
+ **Celldega** is developed at the [Broad Institute](https://broadinstitute.org/) together with the biology research community. Our mission is to make spatial transcriptomics analysis accessible, interactive, and beautiful.
135
+
136
+ Built on amazing open source tools:
137
+
138
+ - **[deck.gl](https://deck.gl/)** - GPU-accelerated visualizations
139
+ - **[PyArrow](https://arrow.apache.org/docs/python/)** - Fast columnar data processing
140
+ - **[AnnData](https://anndata.readthedocs.io/)** - Annotated data matrices
141
+ - **[SpatialData](https://spatialdata.scverse.org/)** - Spatial omics data structures
142
+
143
+ ---
144
+
145
+ <div align="center" style="padding: 20px;">
146
+
147
+ Made with 🧬 by the [Spatial Technology Platform](https://www.broadinstitute.org/spatial-technology-platform) at the [Broad Institute](https://broadinstitute.org/)
148
+
149
+ </div>
package/package.json CHANGED
@@ -1,38 +1,100 @@
1
1
  {
2
- "name": "celldega",
3
- "version": "0.11.1",
4
- "type": "module",
5
- "scripts": {
6
- "dev": "npm run build -- --sourcemap=inline --watch",
7
- "build": "node build.js",
8
- "watch": "node build.js --watch",
9
- "lint": "eslint js/ --ignore-pattern js/vendor/"
10
- },
11
- "dependencies": {
12
- "@loaders.gl/core": "^4.2.0",
13
- "@luma.gl/core": "^9.0.12",
14
- "@luma.gl/engine": "^9.0.12",
15
- "@luma.gl/shadertools": "^9.0.12",
16
- "@luma.gl/webgl": "^9.0.12",
17
- "apache-arrow": "15.0.2",
18
- "d3": "^7.9.0",
19
- "deck.gl": "^9.0.12",
20
- "@deck.gl-community/editable-layers": "^9.0.3",
21
- "math.gl": "2.3.3"
22
- },
23
- "devDependencies": {
24
- "@eslint/js": "^9.0.0",
25
- "esbuild": "^0.20.0",
26
- "esbuild-plugin-wasm": "^1.1.0",
27
- "eslint": "^9.0.0",
28
- "globals": "^15.0.0"
29
- },
30
- "repository": {
31
- "type": "git",
32
- "url": "https://github.com/broadinstitute/celldega.git"
33
- },
34
- "files": [
35
- "src/celldega/static/*"
36
- ],
37
- "main": "src/celldega/static/widget.js"
2
+ "name": "celldega",
3
+ "version": "0.13.0-alpha.1",
4
+ "type": "module",
5
+ "engines": {
6
+ "node": ">=16",
7
+ "npm": ">=8.0.0"
8
+ },
9
+ "scripts": {
10
+ "dev": "npm run build -- --sourcemap=inline --watch",
11
+ "build": "node build.js",
12
+ "watch": "node build.js --watch",
13
+ "test": "npm run test:js && npm run test:py",
14
+ "test:js": "jest --coverage",
15
+ "test:js:watch": "jest --watch",
16
+ "test:py": "pytest --cov=src/celldega --cov-report=term-missing",
17
+ "test:fast": "npm run test:js:fast && npm run test:py:fast",
18
+ "test:js:fast": "jest",
19
+ "test:py:fast": "pytest",
20
+ "lint": "npm run lint:js && npm run lint:py",
21
+ "lint:js": "eslint js/ --ignore-pattern js/vendor/",
22
+ "lint:js:fix": "eslint js/ --ignore-pattern js/vendor/ --fix",
23
+ "lint:py": "ruff check src/",
24
+ "format": "npm run format:js && npm run format:py",
25
+ "format:js": "prettier --write js/ --ignore-path .prettierignore",
26
+ "format:js:check": "prettier --check js/ --ignore-path .prettierignore",
27
+ "format:py": "ruff format src/",
28
+ "check:js": "npm run lint:js && npm run format:js:check",
29
+ "fix:js": "npm run lint:js:fix && npm run format:js"
30
+ },
31
+ "dependencies": {
32
+ "@deck.gl-community/editable-layers": "^9.0.3",
33
+ "@loaders.gl/core": "^4.2.0",
34
+ "@luma.gl/core": "^9.0.12",
35
+ "@luma.gl/engine": "^9.0.12",
36
+ "@luma.gl/shadertools": "^9.0.12",
37
+ "@luma.gl/webgl": "^9.0.12",
38
+ "apache-arrow": "15.0.2",
39
+ "aws4fetch": "^1.0.20",
40
+ "d3": "^7.9.0",
41
+ "deck.gl": "^9.0.12",
42
+ "math.gl": "2.3.3"
43
+ },
44
+ "devDependencies": {
45
+ "@eslint/js": "^9.0.0",
46
+ "@testing-library/jest-dom": "^6.6.3",
47
+ "esbuild": "^0.20.0",
48
+ "esbuild-plugin-wasm": "^1.1.0",
49
+ "eslint": "^9.27.0",
50
+ "eslint-config-prettier": "^10.1.5",
51
+ "eslint-plugin-import": "^2.31.0",
52
+ "eslint-plugin-prettier": "^5.4.0",
53
+ "globals": "^15.0.0",
54
+ "jest": "^29.7.0",
55
+ "jest-environment-jsdom": "^29.7.0",
56
+ "jsdom": "^26.1.0",
57
+ "prettier": "^3.5.3"
58
+ },
59
+ "repository": {
60
+ "type": "git",
61
+ "url": "https://github.com/broadinstitute/celldega.git"
62
+ },
63
+ "files": [
64
+ "src/celldega/static/*"
65
+ ],
66
+ "main": "src/celldega/static/widget.js",
67
+ "prettier": {
68
+ "semi": true,
69
+ "trailingComma": "es5",
70
+ "singleQuote": true,
71
+ "printWidth": 80,
72
+ "tabWidth": 2,
73
+ "useTabs": false,
74
+ "bracketSpacing": true,
75
+ "arrowParens": "always",
76
+ "endOfLine": "lf"
77
+ },
78
+ "jest": {
79
+ "testEnvironment": "jest-environment-jsdom",
80
+ "testMatch": [
81
+ "**/js/**/*.test.js",
82
+ "**/js/**/*.spec.js"
83
+ ],
84
+ "collectCoverageFrom": [
85
+ "js/**/*.js",
86
+ "!js/vendor/**",
87
+ "!js/**/*.test.js",
88
+ "!js/**/*.spec.js"
89
+ ],
90
+ "coverageDirectory": "coverage",
91
+ "coverageReporters": [
92
+ "text",
93
+ "lcov",
94
+ "html"
95
+ ],
96
+ "setupFilesAfterEnv": [
97
+ "<rootDir>/jest.setup.js"
98
+ ]
99
+ }
38
100
  }