A graphical interface for interactively exploring clusterings of high-dimensional connectomic data
Project description
BigClust 2.0
[!NOTE] This project is under active development but that shouldn't stop you from using it to explore your clustering datasets. If you have any feedback or questions, please open an issue here on GitHub.
bigclust2 is a re-design of bigclust, a graphical interface for interactively exploring clusterings of high-dimensional connectomic data.
Typically this means morphological or connectivity-based embeddings but it can be used for any kind of distances or features.
Highlights:
- Interactive 2D scatter plots: Explore large clusterings interactively with zoom, pan, and selection.
- Neuroglancer-like 3D viewer: Visualize neuron morphology in a 3D viewer.
- Widgets for days: All the tools you need to explore and cluster your data: cluster methods, dimensionality reduction, fidelity metrics, feature selection, connectivity explorer, etc.
- Annotations: Push annotation straight to supported backends (e.g. Clio or SeaTable) or export them as CSV/Parquet files.
Version 2.0 Notes
A totally reworked GUI aside, this new version also fundamentally changes how data is represented: previously, data artifacts (distances, features, etc.) had to be manually loaded and passed to BigClust widgets. For this new version, we have switched to a Neuroglancer-like approach where data sources are whole directories (local or remote) containing both the data itself as well as metadata files describing the setup. Here is a simple example structure:
/my_clustering/
info <- JSON-formatted settings for the dataset
meta.parquet <- per-neuron metadata in Parquet (recommended) or Apache Arrow Feather format
distances.parquet <- pairwise distances in Parquet (recommended) or Apache Arrow Feather format (optional)
embeddings.parquet <- low-dimensional embeddings in Parquet (recommended) or Apache Arrow Feather format (optional)
features.parquet <- high-dimensional features in Parquet (recommended) or Apache Arrow Feather format (optional)
See the Data Format documentation for details on the expected files and how to set up your project.
Usage
First make sure you have the Python package manager uv installed. Then run:
uvx bigclust2@latest
To work with the latest development version of bigclust2, you can run it directly from this repository:
uvx --from git+https://github.com/flyconnectome/bigclust2@main bigclust2
[!TIP] Note the
@mainin above command? This is askinguvxto always use the latest version ofbigclust2. Because of howuvxworks, this can lead to slow start-up times when there are new releases. You can avoid this by pinning to a specific version (e.g.@0.1.0) or a specific commit (e.g.@02ea911).
Controls
Most UI elements are hopefully self-explanatory - when in doubt look for the tooltip.
Scatterplot
-
left click to move the view
-
shift + left click to draw a selection box (add + cmd to add to selection)
-
shift + control + left click to draw a lasso selection (add + cmd to add to selection)
-
ESCto deselect all points -
Cto toggle the control panel -
Lto toggle labels -
left/right arrows increase/decrease font size of labels
-
up/down arrows increase/decrease marker size
-
double-click on a label to highlight points with the same label
-
shift + double-click on a label to select points with the same label
-
CMD/control + shift + double-click on a label to add points with the same label to the current selection
3D Viewer
- left click + hold to rotate the view
- middle button + hold to pan
- scroll to zoom in and out
Cto toggle the legend- to align the view:
1(front),2(side),3(top)
Troubleshooting
| Error | Solution |
|---|---|
Running uvx ... fails with an error containing realpath: command not found |
If you're on Mac, make sure your OS version is at least 13.x |
Development
- Clone this repository
cd bigclust2to change into this directoryuv run run.py --debugto start the GUI
Data Format
Data sources are whole directories (local or remote) containing the data itself plus metadata files describing the setup. The full specification — the info file, the meta/distances/embeddings/features files, KNN graphs, multiple embeddings, multiple datasets, and best practices for Parquet formatting — lives in DATA_FORMAT.md.
Ideas / TODOs
- Enable multiple embeddings per dataset (with a dropdown to select embedding)
- Allow selecting sets of features (e.g. upstream vs downstream or isomorphic vs dimorphic connections; this could simply use the multi-columns)
- Support pushing updated annotations back to annotation backends (e.g. Clio/FlyTable)
- Add support for Graph Exploration
- Allow users to change project settings (e.g. neuroglancer sources) before or after loading
- Support loading up-to-date annotations when opening a project (e.g. from Clio or Neuprint)
- Add more detailed documentation about data formats and structure
- Caching system for remote data sources for faster start-up times
- this turns out to not really be a problem from the client side; could still implement to reduce traffic on the server side
- Support sharing figure state (e.g.
uvx bigclust --state <state_id>) - Fine-control over hover info
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bigclust2-0.1.1.tar.gz.
File metadata
- Download URL: bigclust2-0.1.1.tar.gz
- Upload date:
- Size: 301.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e434021a4ac1bb239d46ce936eb4772ba45ec004cd048a3d2b78b78d844ff496
|
|
| MD5 |
dec2e6f370cbb4a9bb268f09a9799bf2
|
|
| BLAKE2b-256 |
97bd0105ff79c0cc1953d59960b693068187dcef990f053d541f06c781180702
|
Provenance
The following attestation bundles were made for bigclust2-0.1.1.tar.gz:
Publisher:
publish.yml on flyconnectome/bigclust2
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
bigclust2-0.1.1.tar.gz -
Subject digest:
e434021a4ac1bb239d46ce936eb4772ba45ec004cd048a3d2b78b78d844ff496 - Sigstore transparency entry: 2190489867
- Sigstore integration time:
-
Permalink:
flyconnectome/bigclust2@fe851183a11894ee205310d8dc8a9e40ccd7e31e -
Branch / Tag:
refs/heads/main - Owner: https://github.com/flyconnectome
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@fe851183a11894ee205310d8dc8a9e40ccd7e31e -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file bigclust2-0.1.1-py3-none-any.whl.
File metadata
- Download URL: bigclust2-0.1.1-py3-none-any.whl
- Upload date:
- Size: 314.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3a5793293cadc41c9d11afe95b6086addb859ba5eb557d17aab4b7a13a89857d
|
|
| MD5 |
27c78fab00d85f456f7bff24f1dff19e
|
|
| BLAKE2b-256 |
907836a0c4e0a9091d32756d3f95985200a77ab62bed666bf19f76a993206861
|
Provenance
The following attestation bundles were made for bigclust2-0.1.1-py3-none-any.whl:
Publisher:
publish.yml on flyconnectome/bigclust2
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
bigclust2-0.1.1-py3-none-any.whl -
Subject digest:
3a5793293cadc41c9d11afe95b6086addb859ba5eb557d17aab4b7a13a89857d - Sigstore transparency entry: 2190489877
- Sigstore integration time:
-
Permalink:
flyconnectome/bigclust2@fe851183a11894ee205310d8dc8a9e40ccd7e31e -
Branch / Tag:
refs/heads/main - Owner: https://github.com/flyconnectome
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@fe851183a11894ee205310d8dc8a9e40ccd7e31e -
Trigger Event:
workflow_dispatch
-
Statement type: