Skip to content
Open
Show file tree
Hide file tree
Changes from 179 commits
Commits
Show all changes
201 commits
Select commit Hold shift + click to select a range
96e7091
template repo
quentinblampey Feb 27, 2025
cf67583
update schema
quentinblampey Feb 27, 2025
2299ee5
try running toy dataset
quentinblampey Feb 27, 2025
528435d
wip
quentinblampey Feb 27, 2025
8d2cb5e
cellpose is running
quentinblampey Mar 3, 2025
754e2ec
minor cleanup / test
quentinblampey Mar 3, 2025
68fa9df
start using meta
quentinblampey Mar 3, 2025
8fbf215
working v0
quentinblampey Mar 4, 2025
64280a4
move cellpose to a subworkflow
quentinblampey Mar 7, 2025
6a1bcb8
add baysor
quentinblampey Mar 7, 2025
43c7954
make logic between cellpose and baysor
quentinblampey Mar 7, 2025
111c9a7
can use --config and remove hardcoded publishdir
quentinblampey Mar 7, 2025
fc592eb
use label process
quentinblampey Mar 7, 2025
7e63060
minor readme update
quentinblampey Mar 7, 2025
9d8db7f
add conda env files
quentinblampey Mar 10, 2025
f4cf634
fix conda env for cellpose
quentinblampey Mar 10, 2025
7bd5177
fix inputs validation (configfile)
quentinblampey Mar 10, 2025
330b2de
clean versions + right explorer outputs
quentinblampey Mar 10, 2025
d8166c5
add jeffquinnmsk/sopa container
quentinblampey Mar 10, 2025
a4b9075
remove image for baysor
quentinblampey Mar 10, 2025
e2cab8c
try c51 config
quentinblampey Mar 10, 2025
a9c9918
add slurm profile
quentinblampey Mar 10, 2025
8b1a841
try validation path
quentinblampey Mar 10, 2025
4dcaa63
try symlink
quentinblampey Mar 11, 2025
0965bc7
use symlink
quentinblampey Mar 11, 2025
8aa086d
publish at the end
quentinblampey Mar 11, 2025
26c2a82
use publish dir mode copy
quentinblampey Mar 11, 2025
99c18de
re-run baysor with process_high
quentinblampey Mar 12, 2025
a286369
terminate config
quentinblampey Mar 12, 2025
a00cca6
try errorStrategy = 'ignore'
quentinblampey Mar 12, 2025
dad5e7d
docker containers + use process_long for baysor
quentinblampey Mar 12, 2025
5a63baf
add back conda env
quentinblampey Mar 12, 2025
00035b9
add proseg
quentinblampey Mar 13, 2025
ff7f580
use sopa>=2.0.3
quentinblampey Mar 13, 2025
8b62d59
rename ArgsCLI
quentinblampey Mar 13, 2025
1aa98e3
add stardist
quentinblampey Mar 14, 2025
ae38881
minor slurm config update
quentinblampey Mar 19, 2025
2b97d79
update only time
quentinblampey Mar 19, 2025
563ffa3
higher walltime
quentinblampey Mar 24, 2025
69e41de
use official sopa docker images
quentinblampey Mar 26, 2025
99326a2
try wrong name for debugging
quentinblampey Mar 26, 2025
d773e41
reuse the right name
quentinblampey Mar 26, 2025
b10738c
use label process_medium
quentinblampey Mar 26, 2025
d2a2845
use process_high
quentinblampey Mar 26, 2025
def5580
use all the new docker images
quentinblampey Mar 26, 2025
a53a317
rename processes + update config for proseg
quentinblampey Mar 26, 2025
5e5a279
can output any raw file for the explorer
quentinblampey Mar 26, 2025
188d939
add spaceranger/count
quentinblampey Mar 26, 2025
f35ca38
add support for visium hd WIP
quentinblampey Mar 27, 2025
a8de313
add default Spaceranger options
quentinblampey Mar 27, 2025
2458913
use .name to detect tar.gz
quentinblampey Mar 27, 2025
f002542
avoid id null
quentinblampey Mar 27, 2025
aa705d8
debug vhd
quentinblampey Mar 27, 2025
3e35eb1
re-use online data for test
quentinblampey Mar 27, 2025
8e4e451
add config create bam
quentinblampey Mar 27, 2025
72c9bf7
--create-bam="false"
quentinblampey Mar 27, 2025
dfb0ea0
cleanup create bam
quentinblampey Mar 27, 2025
24fc4f2
cleanup spaceranger
quentinblampey Mar 28, 2025
4202263
rename untar
quentinblampey Mar 28, 2025
5064f53
cleanup vhd and pass kwargs to reader
quentinblampey Mar 28, 2025
60f1148
update time limit proseg
quentinblampey Mar 28, 2025
59dae3a
make transcripts optional
quentinblampey Mar 31, 2025
49268bd
try to use space ranger
quentinblampey Apr 1, 2025
a13eaad
add again docker.runOptions
quentinblampey Apr 1, 2025
9d9d77a
use input files
quentinblampey Apr 1, 2025
f6ec7b6
use process_low
quentinblampey Apr 1, 2025
45d0ffb
back to process_high
quentinblampey Apr 1, 2025
982ebff
minor cleanup
quentinblampey Apr 1, 2025
ac00cbc
try using outs instead of outs/**
quentinblampey Apr 1, 2025
efde657
add back test_vhd
quentinblampey Apr 1, 2025
1cdb669
try temp process low
quentinblampey Apr 1, 2025
15676b8
fixes vhd
quentinblampey Apr 1, 2025
85a77da
add missing inputs
quentinblampey Apr 1, 2025
605ee4f
fix stringifyValueForCli
quentinblampey Apr 2, 2025
fdba687
keep image in meta
quentinblampey Apr 2, 2025
2d952a9
back to process_high in spaceranger count
quentinblampey Apr 2, 2025
abc91fa
add vhd image as input to Spatialdata process
quentinblampey Apr 14, 2025
575bc75
use recent docker images
quentinblampey Apr 22, 2025
0c25deb
move to sopa_config
quentinblampey Apr 23, 2025
7c46989
use docker images sopa:2.0.6
quentinblampey Apr 24, 2025
92904c1
gitignore samplesheets
quentinblampey Apr 24, 2025
765a83b
cleanup to move to nf-core org
quentinblampey May 15, 2025
2fb6b31
remove no space pattern
quentinblampey Jun 19, 2025
854fcbf
revert remove spaces
quentinblampey Jun 19, 2025
2ffeb72
rename cure51 config - to be removed
quentinblampey Jun 23, 2025
c7940f4
update patchSegmentationProseg config
quentinblampey Jun 25, 2025
a56e4f6
configfile can read from existing github files
quentinblampey Jul 2, 2025
5c2ee63
update sopa version
quentinblampey Jul 7, 2025
415358d
go back to image with ps command for nextflow
quentinblampey Jul 8, 2025
553c670
remove organization-specific config
quentinblampey Jul 9, 2025
97afb61
fix pre-commit
quentinblampey Jul 9, 2025
fac972f
fill TODO sections - wip
quentinblampey Jul 9, 2025
48f866f
update readme and citations
quentinblampey Jul 9, 2025
7805e06
fix linting ci
quentinblampey Jul 9, 2025
6350429
consistent publish_dir_mode
quentinblampey Jul 9, 2025
ff5eb5b
Merge branch 'dev' into nf-core-template-merge-3.3.2
quentinblampey Jul 10, 2025
6c7af89
Merge pull request #1 from nf-core/nf-core-template-merge-3.3.2
quentinblampey Jul 10, 2025
dd924cd
visium hd wip
quentinblampey Jul 10, 2025
a3eafba
run nf-core lint
quentinblampey Jul 10, 2025
7c8d84b
update spaceranger count
quentinblampey Jul 10, 2025
f61c7fd
use relative path for tests
quentinblampey Jul 10, 2025
6c95fea
less lint warnings
quentinblampey Jul 10, 2025
6ee7ce5
test with proseg
quentinblampey Jul 10, 2025
cc8b74e
remove unused configs and add citations
quentinblampey Jul 10, 2025
8c298bf
use mqc version output and try fix vhd
quentinblampey Jul 11, 2025
fb9dbaa
add test snap file
quentinblampey Jul 11, 2025
ff51f0d
local test snap
quentinblampey Jul 11, 2025
2b24f1c
update proseg version
quentinblampey Jul 11, 2025
595e348
add config validation + test with baysor
quentinblampey Jul 11, 2025
e683181
remove sopa cache
quentinblampey Jul 11, 2025
11c80fb
try ignoring files
quentinblampey Jul 11, 2025
a115927
try again with nfignore
quentinblampey Jul 11, 2025
ffc4594
Merge pull request #2 from nf-core/fix_ci
quentinblampey Jul 11, 2025
2e23857
improve doc
quentinblampey Jul 11, 2025
933bcde
fix ro-crate
quentinblampey Jul 11, 2025
adca8bd
fix vhd usage
quentinblampey Jul 11, 2025
4bd39bd
fix spaceranger output
quentinblampey Jul 15, 2025
528dd34
remove useless println
quentinblampey Jul 15, 2025
215d6d8
remove TODO and readme update
quentinblampey Jul 15, 2025
4dfd7ef
update patchSegmentationCellpose containerOptions
quentinblampey Jul 15, 2025
07c45e4
add more configs for nf-test
quentinblampey Jul 16, 2025
cfecff2
try sopa latest
quentinblampey Jul 16, 2025
3dda9a6
update ro crate and run tests
quentinblampey Jul 16, 2025
ce73246
update snapshots
quentinblampey Jul 16, 2025
f4eda3b
Merge pull request #3 from nf-core/more_configs_tested
quentinblampey Jul 16, 2025
456c21f
cleanup sopa cache only if possible
quentinblampey Jul 16, 2025
526fd79
minor cleanup
quentinblampey Jul 22, 2025
2edd854
Merge pull request #4 from nf-core/prepare_release
quentinblampey Jul 22, 2025
f296997
bump version 1.0.0
quentinblampey Jul 22, 2025
3972c4c
minor update to trigger PR
quentinblampey Jul 22, 2025
05ea1f6
changelog update for v1.0.0
quentinblampey Jul 22, 2025
9edadd2
ensure the data_path exists
quentinblampey Jul 22, 2025
0d82d57
move subworkflows to modules
quentinblampey Jul 22, 2025
331846e
fix sample name in tests snapshots
quentinblampey Jul 22, 2025
993b7af
adding packages versions
quentinblampey Jul 23, 2025
ffe9aae
remove package versions from snapshot - as use latest
quentinblampey Jul 23, 2025
712ea9f
back to versions in snapshot
quentinblampey Jul 23, 2025
2ba409c
Merge pull request #6 from nf-core/move_modules
quentinblampey Jul 23, 2025
cca237f
use -params-file instead -f --configfile
quentinblampey Jul 23, 2025
c020f2a
add sopa_config in allOf
quentinblampey Jul 23, 2025
dfb21d0
fix ro-crate file
quentinblampey Jul 23, 2025
3e225a6
update nextflow schema
quentinblampey Jul 23, 2025
6e749e9
add test full config back
quentinblampey Jul 24, 2025
bcb62aa
update config profiles
quentinblampey Jul 24, 2025
779cfe6
improve docs usage clarity
quentinblampey Jul 24, 2025
94bc82b
tests three profiles
quentinblampey Jul 24, 2025
fade57e
update ro-crate
quentinblampey Jul 24, 2025
77f991e
cellpose: use docker.runOptions = ''
quentinblampey Jul 24, 2025
11057c0
use containerOptions and remove sopa_cache from snapshots
quentinblampey Jul 24, 2025
d89eea4
fix cellpose snapshot
quentinblampey Jul 24, 2025
d272f7b
fix cellpose snapshot again
quentinblampey Jul 24, 2025
efe0c63
add cellpose version in snapshot
quentinblampey Jul 24, 2025
5a02c7f
Merge pull request #7 from nf-core/no_configfile
quentinblampey Jul 24, 2025
6430dcf
add yaml file for processes
quentinblampey Jul 24, 2025
0fb195a
rename meta -> environment
quentinblampey Jul 24, 2025
09e3376
rename yaml -> yml
quentinblampey Jul 24, 2025
3c3bf33
add optional cell type annotation
quentinblampey Jul 28, 2025
4759bc8
baysor threads + allow symlink for xenium raw files
quentinblampey Aug 1, 2025
98511fc
fix ro-crate
quentinblampey Aug 1, 2025
6ea2d56
re-run snapshots with fluo annotation
quentinblampey Aug 1, 2025
b943312
add tangram to the tests
quentinblampey Aug 20, 2025
cf60411
update snapshots
quentinblampey Aug 20, 2025
02e1d7e
minor snapshot fix
quentinblampey Aug 20, 2025
1b2d166
add comseg support
quentinblampey Aug 26, 2025
e0a0084
singularity on disk large, and disable conda
quentinblampey Sep 30, 2025
a380894
update snapshots and minor fixes
quentinblampey Sep 30, 2025
5d052ee
update regarding mashehu review
quentinblampey Sep 30, 2025
bcd298c
Update conf/test.config
quentinblampey Sep 30, 2025
931a75b
Update conf/base.config
quentinblampey Sep 30, 2025
e50c405
Update conf/test_baysor.config
quentinblampey Sep 30, 2025
59f8b51
minor cleanup: comment in test configs
quentinblampey Sep 30, 2025
a4d1204
revert docker options
quentinblampey Sep 30, 2025
c805c80
try containerOptions only for docker
quentinblampey Sep 30, 2025
e42156e
try make singularity writable
quentinblampey Sep 30, 2025
147b35e
try to specify the cellpose cache location
quentinblampey Oct 1, 2025
e4ded39
try setting cellpose cache in cwd and give more precise proseg inputs
quentinblampey Oct 1, 2025
06dbdc3
try using TMPDIR
quentinblampey Oct 1, 2025
044bf8f
try containall option for singularity
quentinblampey Oct 1, 2025
ed0659b
try export celpose cache loc in process
quentinblampey Oct 1, 2025
d83d49c
split modules and start answer to the review
quentinblampey Oct 2, 2025
3e39d97
point to another dummy input for the tests as dataset is created on t…
quentinblampey Oct 2, 2025
ff0a365
set sopa version 2.1.5 and add scanpy_preprocess + remove publish
quentinblampey Oct 14, 2025
6059ba1
fix linting
quentinblampey Oct 14, 2025
411a566
update snapshots
quentinblampey Oct 14, 2025
c530413
update credits
quentinblampey Oct 14, 2025
95bce91
fix ro-crate and update usage docs
quentinblampey Oct 14, 2025
228ba34
fixes for visium hd data
quentinblampey Oct 14, 2025
2009639
allow .btf for visium hd data
quentinblampey Oct 14, 2025
d4e4823
provide data_dir in explorer_raw only for xenium
quentinblampey Oct 14, 2025
fe77190
pass raw xenium data to explorer_raw
quentinblampey Oct 15, 2025
e2aa87f
move to 2.1.6 and add tests for scanpy_preprocess
quentinblampey Oct 15, 2025
a3d1ef6
update snapshots
quentinblampey Oct 15, 2025
a7bbf8d
fix cellpose snapshot
quentinblampey Oct 15, 2025
aa37eb7
use process_low for PATCH_SEGMENTATION_STARDIST
quentinblampey Oct 15, 2025
ec92fc7
can use a visium hd ID different than the sample name
quentinblampey Oct 15, 2025
0be8e06
Merge branch 'dev' into nf-core-template-merge-3.4.1
quentinblampey Oct 17, 2025
a14a2e8
fix ci
quentinblampey Oct 17, 2025
a622a04
Merge pull request #12 from nf-core/nf-core-template-merge-3.4.1
quentinblampey Oct 17, 2025
b6ef232
Merge branch 'vhd' into dev
quentinblampey Oct 30, 2025
39c8881
Update to new runner size syntax
mashehu Nov 3, 2025
193f9c6
Merge pull request #13 from nf-core/mashehu-patch-1
quentinblampey Nov 3, 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
3 changes: 2 additions & 1 deletion .github/workflows/nf-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,12 @@ jobs:
runs-on: # use self-hosted runners
- runs-on=${{ github.run_id }}-nf-test
- runner=4cpu-linux-x64
- disk=large
strategy:
fail-fast: false
matrix:
shard: ${{ fromJson(needs.nf-test-changes.outputs.shard) }}
profile: [conda, docker, singularity]
profile: [docker, singularity] # TODO: add conda back, but only for cellpose
isMain:
- ${{ github.base_ref == 'master' || github.base_ref == 'main' }}
# Exclude conda and singularity on dev
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,7 @@ testing/
testing*
*.pyc
null/
sandbox
samplesheets
lint_*
.nf-test*
7 changes: 4 additions & 3 deletions .nf-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ lint:
files_unchanged:
- .github/CONTRIBUTING.md
- assets/sendmail_template.txt
- .github/CONTRIBUTING.md
- assets/sendmail_template.txt
- assets/nf-core-sopa_logo_light.png
- docs/images/nf-core-sopa_logo_light.png
- docs/images/nf-core-sopa_logo_dark.png
multiqc_config: false
nf_core_version: 3.3.2
repository_type: pipeline
Expand All @@ -27,4 +28,4 @@ template:
- igenomes
- multiqc
- fastqc
version: 1.0.0dev
version: 1.0.0
8 changes: 2 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,10 @@
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## v1.0.0dev - [date]
## v1.0.0 - [2025-07-22]

Initial release of nf-core/sopa, created with the [nf-core](https://nf-co.re/) template.

### `Added`

### `Fixed`

### `Dependencies`

### `Deprecated`
Sopa can be run with all the technologies currently supported - including Visium HD.
20 changes: 20 additions & 0 deletions CITATIONS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# nf-core/sopa: Citations

## [sopa](https://www.nature.com/articles/s41467-024-48981-z)

> Blampey, Q., Mulder, K., Gardet, M. et al. Sopa: a technology-invariant pipeline for analyses of image-based spatial omics. Nat Commun 15, 4981 (2024). https://doi.org/10.1038/s41467-024-48981-z

## [nf-core](https://pubmed.ncbi.nlm.nih.gov/32055031/)

> Ewels PA, Peltzer A, Fillinger S, Patel H, Alneberg J, Wilm A, Garcia MU, Di Tommaso P, Nahnsen S. The nf-core framework for community-curated bioinformatics pipelines. Nat Biotechnol. 2020 Mar;38(3):276-278. doi: 10.1038/s41587-020-0439-x. PubMed PMID: 32055031.
Expand All @@ -10,6 +14,22 @@

## Pipeline tools

- [AnnData](https://github.com/scverse/anndata)

> Virshup I, Rybakov S, Theis FJ, Angerer P, Wolf FA. bioRxiv 2021.12.16.473007; doi: https://doi.org/10.1101/2021.12.16.473007

- [Scanpy](https://github.com/theislab/scanpy)

> Wolf F, Angerer P, Theis F. SCANPY: large-scale single-cell gene expression data analysis. Genome Biol 19, 15 (2018). doi: https://doi.org/10.1186/s13059-017-1382-0

- [Space Ranger](https://www.10xgenomics.com/support/software/space-ranger)

> 10x Genomics Space Ranger 2.1.0 [Online]

- [SpatialData](https://www.biorxiv.org/content/10.1101/2023.05.05.539647v1)

> Marconato L, Palla G, Yamauchi K, Virshup I, Heidari E, Treis T, Toth M, Shrestha R, Vöhringer H, Huber W, Gerstung M, Moore J, Theis F, Stegle O. SpatialData: an open and universal data framework for spatial omics. bioRxiv 2023.05.05.539647; doi: https://doi.org/10.1101/2023.05.05.539647

## Software packaging/containerisation tools

- [Anaconda](https://anaconda.com)
Expand Down
55 changes: 33 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,47 +20,52 @@

## Introduction

**nf-core/sopa** is a bioinformatics pipeline that ...
**nf-core/sopa** is the Nextflow version of [Sopa](https://github.com/gustaveroussy/sopa). Built on top of [SpatialData](https://github.com/scverse/spatialdata), Sopa enables processing and analyses of spatial omics data with single-cell resolution (spatial transcriptomics or multiplex imaging data) using a standard data structure and output. We currently support the following technologies: Xenium, Visium HD, MERSCOPE, CosMX, PhenoCycler, MACSima, Molecural Cartography, and others. It outputs a `.zarr` directory containing a processed [SpatialData](https://github.com/scverse/spatialdata) object, and a `.explorer` directory for visualization.

<!-- TODO nf-core:
Complete this sentence with a 2-3 sentence summary of what types of data the pipeline ingests, a brief overview of the
major pipeline sections and the types of output it produces. You're giving an overview to someone new
to nf-core here, in 15-20 seconds. For an example, see https://github.com/nf-core/rnaseq/blob/master/README.md#introduction
-->
> [!WARNING]
> If you are interested in the main Sopa python package, refer to [this Sopa repository](https://github.com/gustaveroussy/sopa). Else, if you want to use Nextflow, you are in the good place.

<p align="center">
<img src="https://raw.githubusercontent.com/gustaveroussy/sopa/main/docs/assets/overview_white.png" alt="sopa_overview" width="100%"/>
</p>

1. (Visium HD only) Raw data processing with Space Ranger
2. (Optional) Tissue segmentation
3. Cell segmentation with Cellpose, Baysor, Proseg, Comseg, Stardist, ...
4. Aggregation, i.e. counting the transcripts inside the cells and/or averaging the channel intensities inside cells
5. (Optional) Cell-type annotation
6. User-friendly output creation for visualization and quick analysis
7. Full [SpatialData](https://github.com/scverse/spatialdata) object export as a `.zarr` directory

<!-- TODO nf-core: Include a figure that guides the user through the major workflow steps. Many nf-core
workflows use the "tube map" design for that. See https://nf-co.re/docs/guidelines/graphic_design/workflow_diagrams#examples for examples. -->
<!-- TODO nf-core: Fill in short bullet-pointed list of the default steps in the pipeline -->
After running `nf-core/sopa`, you can continue analyzing your `SpatialData` object with [`sopa` as a Python package](https://github.com/gustaveroussy/sopa).

## Usage

> [!NOTE]
> If you are new to Nextflow and nf-core, please refer to [this page](https://nf-co.re/docs/usage/installation) on how to set-up Nextflow. Make sure to [test your setup](https://nf-co.re/docs/usage/introduction#how-to-run-a-pipeline) with `-profile test` before running the workflow on actual data.

<!-- TODO nf-core: Describe the minimum required steps to execute the pipeline, e.g. how to prepare samplesheets.
Explain what rows and columns represent. For instance (please edit as appropriate):

First, prepare a samplesheet with your input data that looks as follows:
First, prepare a samplesheet that lists the `data_path` to each sample data directory (typically, the per-sample output of the Xenium/MERSCOPE/etc, see more info [here](https://gustaveroussy.github.io/sopa/faq/#what-are-the-inputs-of-sopa)). You can optionally add `sample` to provide a name to your output directory, else it will be named based on `data_path`. Here is a samplesheet example:

`samplesheet.csv`:

```csv
sample,fastq_1,fastq_2
CONTROL_REP1,AEG588A1_S1_L002_R1_001.fastq.gz,AEG588A1_S1_L002_R2_001.fastq.gz
sample,data_path
SAMPLE1,/path/to/one/merscope_directory
SAMPLE2,/path/to/one/merscope_directory
```

Each row represents a fastq file (single-end) or a pair of fastq files (paired end).
> [!WARNING]
> If you have Visium HD data, the samplesheet will have a different format than the one above. Directly refer to the [usage documentation](https://nf-co.re/sopa/usage) and the [parameter documentation](https://nf-co.re/sopa/parameters).

-->
Then, choose the Sopa parameters. You can find existing Sopa params files [here](https://github.com/gustaveroussy/sopa/tree/main/workflow/config), and follow the [corresponding README instructions](https://github.com/gustaveroussy/sopa/blob/main/workflow/config/README.md) of to get your `-params-file` argument.

Now, you can run the pipeline using:

<!-- TODO nf-core: update the following command to include all required parameters for a minimal example -->

```bash
nextflow run nf-core/sopa \
-profile <docker/singularity/.../institute> \
--input samplesheet.csv \
-params-file <PARAMS_FILE> \
--outdir <OUTDIR>
```

Expand All @@ -77,7 +82,7 @@ For more details about the output files and reports, please refer to the

## Credits

nf-core/sopa was originally written by Quentin Blampey.
nf-core/sopa was originally written by Quentin Blampey during his work at the following institutions: CentraleSupélec, Gustave Roussy Institute, and Université Paris-Saclay.

We thank the following people for their extensive assistance in the development of this pipeline:

Expand All @@ -94,10 +99,16 @@ For further information or help, don't hesitate to get in touch on the [Slack `#
<!-- TODO nf-core: Add citation for pipeline after first release. Uncomment lines below and update Zenodo doi and badge at the top of this file. -->
<!-- If you use nf-core/sopa for your analysis, please cite it using the following doi: [10.5281/zenodo.XXXXXX](https://doi.org/10.5281/zenodo.XXXXXX) -->

<!-- TODO nf-core: Add bibliography of tools and data used in your pipeline -->

An extensive list of references for the tools used by the pipeline can be found in the [`CITATIONS.md`](CITATIONS.md) file.

You can cite the `sopa` publication as follows:

> Sopa: a technology-invariant pipeline for analyses of image-based spatial omics.
>
> Quentin Blampey, Kevin Mulder, Margaux Gardet, Stergios Christodoulidis, Charles-Antoine Dutertre, Fabrice André, Florent Ginhoux & Paul-Henry Cournède.
>
> _Nat Commun._ 2024 June 11. doi: [10.1038/s41467-024-48981-z](https://doi.org/10.1038/s41467-024-48981-z)

You can cite the `nf-core` publication as follows:

> **The nf-core framework for community-curated bioinformatics pipelines.**
Expand Down
82 changes: 71 additions & 11 deletions assets/schema_input.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,84 @@
"sample": {
"type": "string",
"pattern": "^\\S+$",
"errorMessage": "Sample name must be provided and cannot contain spaces",
"errorMessage": "Sample name cannot contain spaces",
"meta": ["id"]
},
"fastq_1": {
"data_path": {
"type": "string",
"format": "file-path",
"pattern": "^\\S+$",
"format": "path",
"exists": true,
"errorMessage": "Data path must exist and not contain spaces"
},
"fastq_dir": {
"type": "string",
"pattern": "^\\S+$",
"format": "path",
"exists": true,
"errorMessage": "Path to the fastq directory must exist and not contain spaces",
"meta": ["fastq_dir"]
},
"cytaimage": {
"type": "string",
"pattern": "^\\S+(tif|tiff)$",
"format": "path",
"exists": true,
"errorMessage": "Path to the cytaimage file must exist, not contain spaces, and be a .tif or .tiff file",
"meta": ["cytaimage"]
},
"colorizedimage": {
"type": "string",
"pattern": "^\\S+(tif|tiff|jpg|jpeg)$",
"format": "path",
"exists": true,
"errorMessage": "Path to the colorizedimage file must exist, not contain spaces, and be a .tif, .tiff, .jpg or .jpeg file",
"meta": ["colorizedimage"]
},
"darkimage": {
"type": "string",
"pattern": "^\\S+(tif|tiff|jpg|jpeg)$",
"format": "path",
"exists": true,
"errorMessage": "Path to the darkimage file must exist, not contain spaces, and be a .tif, .tiff, .jpg or .jpeg file",
"meta": ["darkimage"]
},
"image": {
"type": "string",
"pattern": "^\\S+(tif|tiff|jpg|jpeg)$",
"format": "path",
"exists": true,
"errorMessage": "Path to the image must exist, not contain spaces, and be a .tif, .tiff, .jpg or .jpeg file",
"meta": ["image"]
},
"slide": {
"type": "string",
"pattern": "^\\S+$",
"errorMessage": "Slide name cannot contain spaces",
"meta": ["slide"]
},
"area": {
"type": "string",
"pattern": "^\\S+$",
"errorMessage": "Area name cannot contain spaces",
"meta": ["area"]
},
"manual_alignment": {
"type": "string",
"pattern": "^\\S+json$",
"format": "path",
"exists": true,
"pattern": "^([\\S\\s]*\\/)?[^\\s\\/]+\\.f(ast)?q\\.gz$",
"errorMessage": "FastQ file for reads 1 must be provided, cannot contain spaces and must have extension '.fq.gz' or '.fastq.gz'"
"errorMessage": "Path to the manual_alignment must exist, not contain spaces, and be a .json file",
"meta": ["manual_alignment"]
},
"fastq_2": {
"slidefile": {
"type": "string",
"format": "file-path",
"pattern": "^\\S+json$",
"format": "path",
"exists": true,
"pattern": "^([\\S\\s]*\\/)?[^\\s\\/]+\\.f(ast)?q\\.gz$",
"errorMessage": "FastQ file for reads 2 cannot contain spaces and must have extension '.fq.gz' or '.fastq.gz'"
"errorMessage": "Path to the slidefile must exist, not contain spaces, and be a .json file",
"meta": ["slidefile"]
}
},
"required": ["sample", "fastq_1"]
}
}
}
14 changes: 5 additions & 9 deletions conf/base.config
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
*/

process {

// TODO nf-core: Check the defaults for all processes
cpus = { 1 * task.attempt }
memory = { 6.GB * task.attempt }
time = { 4.h * task.attempt }
Expand All @@ -19,13 +17,6 @@ process {
maxRetries = 1
maxErrors = '-1'

// Process-specific resource requirements
// NOTE - Please try and reuse the labels below as much as possible.
// These labels are used and recognised by default in DSL2 files hosted on nf-core/modules.
// If possible, it would be nice to keep the same label naming convention when
// adding in your local modules too.
// TODO nf-core: Customise requirements for specific processes.
// See https://www.nextflow.io/docs/latest/config.html#config-process-selectors
withLabel:process_single {
cpus = { 1 }
memory = { 6.GB * task.attempt }
Expand All @@ -52,6 +43,11 @@ process {
withLabel:process_high_memory {
memory = { 200.GB * task.attempt }
}
withName:PATCH_SEGMENTATION_PROSEG {
cpus = { 8 * task.attempt }
memory = { 200.GB * task.attempt }
time = { 10.d * task.attempt }
}
withLabel:error_ignore {
errorStrategy = 'ignore'
}
Expand Down
15 changes: 8 additions & 7 deletions conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,12 @@
*/

process {

publishDir = [
path: { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]

withName: SPACERANGER_COUNT {
ext.args = '--create-bam="false"'
publishDir = [
path: { "${params.outdir}/${meta.id}_spaceranger" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename },
]
}
}
45 changes: 39 additions & 6 deletions conf/test.config
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,49 @@ process {
resourceLimits = [
cpus: 4,
memory: '15.GB',
time: '1.h'
time: '1.h',
]
}

params {
config_profile_name = 'Test profile'
config_profile_description = 'Minimal test dataset to check pipeline function'
config_profile_name = 'Test profile with Proseg'
config_profile_description = 'Minimal test dataset to check pipeline function'

// Input data
// TODO nf-core: Specify the paths to your test data on nf-core/test-datasets
// TODO nf-core: Give any required params for the test so that command line flags are not needed
input = params.pipelines_testdata_base_path + 'viralrecon/samplesheet/samplesheet_test_illumina_amplicon.csv'
input = "${baseDir}/tests/samplesheet.csv"

read = [
technology: "toy_dataset",
kwargs: [
genes: 500
],
]

patchify = [
patch_width_microns: 400,
patch_overlap_microns: 20,
]

segmentation.proseg.prior_shapes_key = "auto"

aggregate = [
aggregate_channels: true,
min_transcripts: 5,
]

annotation = [
method: "fluorescence",
args: [
marker_cell_dict: [
CK: "Tumoral cell",
CD3: "T cell",
CD20: "B cell",
]
],
]

explorer = [
ram_threshold_gb: 4,
pixel_size: 0.1,
]
}
Loading