Skip to content

Commit

Permalink
docs improvements (mainly proteins tuto)
Browse files Browse the repository at this point in the history
  • Loading branch information
quentinblampey committed Dec 17, 2024
1 parent ce99ce6 commit 1ffda09
Show file tree
Hide file tree
Showing 8 changed files with 436 additions and 16 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@
### Added
- `load_dataset`: add `custom_filter` and `dry_run` arguments
- added `min_prototypes_ratio` argument in `fine_tune` to run `init_slide_queue`
- Added tutorials for proteins data + minor docs improvements

### Fixed
- Ensure reset clustering if multiple zero-shot (#9)

### Changed
- Removed the docs formatting (better for autocompletion)
- Reorder parameters in Novae `__init__` (sorted by importance)

## [0.2.1] - 2024-12-04

Expand Down
4 changes: 0 additions & 4 deletions docs/api/metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,3 @@
::: novae.monitor.fide_score

::: novae.monitor.mean_fide_score

::: novae.monitor.svg_score

::: novae.monitor.mean_svg_score
2 changes: 2 additions & 0 deletions docs/api/utils.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
::: novae.utils.spatial_neighbors

::: novae.utils.quantile_scaling

::: novae.utils.prepare_adatas

::: novae.utils.load_dataset
Expand Down
8 changes: 8 additions & 0 deletions docs/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,14 @@ from novae import Novae
model = Novae.from_pretrained("MICS-Lab/novae-human-0") # or any valid model name
```

### How to avoid overcorrecting?

By default, Novae corrects the batch-effect to get shared spatial domains across slides.
The batch information is used only during training (`fit` or `fine_tune`), which should prevent Novae from overcorrecting in `zero_shot` mode.

If not using the `zero_shot` mode, you can provide the `min_prototypes_ratio` parameter to control batch effect correction: either (i) in the `fine_tune` method itself, or (ii) during the model initialization (if retraining a model from scratch).

For instance, if `min_prototypes_ratio=0.5`, Novae expects each slide to contain at least 50% of the prototypes (each prototype can be interpreted as an "elementary spatial domain"). Therefore, the lower `min_prototypes_ratio`, the lower the batch-effect correction. Conversely, if `min_prototypes_ratio=1`, all prototypes are expected to be found in all slides (this doesn't mean the proportions will be the same overall slides, though).

### How do I save my own model?

Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/multi_tissue.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# Multi-tissue or multi-condition mode\n",
"# Multi-tissue/condition mode\n",
"Coming soon"
]
},
Expand Down
428 changes: 420 additions & 8 deletions docs/tutorials/proteins.ipynb

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# Spot versus single-cell resolution\n",
"# Spot/bin/single-cell resolutions\n",
"Coming soon"
]
},
Expand Down
4 changes: 2 additions & 2 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ nav:
- Tutorials:
- Main usage: tutorials/main_usage.ipynb
- Different input modes: tutorials/input_modes.md
- Spot vs single-cell resolution: tutorials/spot_vs_sc.ipynb
- Multi tissue/condition mode: tutorials/multi_tissue.ipynb
- Usage on proteins: tutorials/proteins.ipynb
- Spot/bin/single-cell resolutions: tutorials/resolutions.ipynb
- Multi tissue/condition mode: tutorials/multi_tissue.ipynb
- API:
- Novae model: api/Novae.md
- Utils: api/utils.md
Expand Down

0 comments on commit 1ffda09

Please sign in to comment.