Skip to content

Commit

Permalink
Merge pull request #100 from gustaveroussy/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
quentinblampey authored Jul 31, 2024
2 parents 6dc620d + f4e8ad7 commit 3e5ebd7
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ The pipeline outputs contain: (i) Xenium Explorer files for interactive visualiz

# Documentation

The easiest way to start with `sopa` is to check [our documentation](https://gustaveroussy.github.io/sopa). It contains installation explanations, CLI/API details, and tutorials.
Check [Sopa's documentation](https://gustaveroussy.github.io/sopa) to get started. It contains installation explanations, CLI/API details, and tutorials.

# Overview

Expand All @@ -27,6 +27,8 @@ The following illustration describes the main steps of `sopa`:
<img src="https://raw.githubusercontent.com/gustaveroussy/sopa/master/docs/assets/overview_white.png" alt="sopa_overview" width="100%"/>
</p>

> *Xenium Explorer* is a registered trademark of 10x Genomics. The Xenium Explorer is licensed for usage on Xenium data (more details [here](https://www.10xgenomics.com/legal/end-user-software-license-agreement)).
# Installation

### PyPI installation
Expand Down
16 changes: 16 additions & 0 deletions docs/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,22 @@ If using the CLI, `--min-area` can be provided to `sopa segmentation cellpose` o
You can use any existing [Cellpose model](https://cellpose.readthedocs.io/en/latest/models.html) with the `model_type` argument (via the API, CLI, or Snakemake pipeline). For the Snakemake pipeline, see [here](https://github.com/gustaveroussy/sopa/blob/master/workflow/config/example_commented.yaml) how to set this argument.
If you have a custom pretrained model, use the `pretrained_model` argument instead of `model_type`, and give the path to your cellpose model.

## How to provide other arguments to Cellpose?

When using the Snakemake pipeline, you can use `method_kwargs` to provide extra arguments to Cellpose. For instance, we use `resample=False` in the example below, which may significantly speed up the segmentation while not decreasing significantly the segmentation quality:

```yaml
segmentation:
cellpose:
diameter: 60
channels: ["DAPI"]
flow_threshold: 2
cellprob_threshold: -6
min_area: 2000
method_kwargs:
resample: False
```
## How to use a prior cell segmentation?
If you have MERSCOPE or Xenium data, you probably already have a cell segmentation. This can be used as a prior for Baysor, instead of running Cellpose with Sopa. For that, you have an existing config file for the Snakemake pipeline for both [MERSCOPE](https://github.com/gustaveroussy/sopa/blob/master/workflow/config/merscope/baysor_vizgen.yaml) and [Xenium](https://github.com/gustaveroussy/sopa/blob/master/workflow/config/xenium/baysor_multimodal.yaml) data. If using the API/CLI, consider using the `cell_key` and the `unassigned_value` arguments when creating the patches for the transcripts. For MERSCOPE data, `cell_key="cell_id"` and `unassigned_value=-1`. For Xenium data, `cell_key="cell_id"` and `unassigned_value="UNASSIGNED"`.
Expand Down

0 comments on commit 3e5ebd7

Please sign in to comment.