Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation update and added a full test #67

Merged
merged 90 commits into from
Jan 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
90 commits
Select commit Hold shift + click to select a range
be1ea6b
added more to README; pushing to GitHub to see how it looks there
RobJY Sep 23, 2024
d3f85c7
fixed README bugs
RobJY Sep 23, 2024
a6d5343
more fixes to README
RobJY Sep 23, 2024
d74397e
another README fix
RobJY Sep 24, 2024
1c1a927
updated usage doc
RobJY Sep 24, 2024
c4cf4ed
just a checkpoint
RobJY Sep 25, 2024
bc1af39
Merge branch 'dev' into documentation
RobJY Sep 25, 2024
47f176d
just saving current state of output.md
RobJY Sep 25, 2024
d552812
added more to usage doc
RobJY Oct 2, 2024
8960f1d
small change to usage doc
RobJY Oct 2, 2024
c82929e
updated and cleaned-up output doc
RobJY Oct 4, 2024
3f205bd
output doc fixes
RobJY Oct 4, 2024
c82de83
lint fixes
RobJY Oct 11, 2024
ae3eb7b
fixed subworkflow publication lint warnings
RobJY Oct 15, 2024
84b0f36
had already fixed last pub related lint message
RobJY Oct 16, 2024
15add0e
added full_test
RobJY Oct 16, 2024
d262c32
updated ci for testing
RobJY Oct 18, 2024
d3b9b4b
ci testing
RobJY Oct 18, 2024
142bfa1
ci testing
RobJY Oct 18, 2024
3903510
ci testing
RobJY Oct 18, 2024
fec00ed
ci testing
RobJY Oct 18, 2024
5fc0b8e
ci testing
RobJY Oct 18, 2024
b808668
ci testing
RobJY Oct 18, 2024
54a4020
ci testing
RobJY Oct 18, 2024
5c52969
ci testing
RobJY Oct 18, 2024
18c1d9b
ci tests
RobJY Oct 18, 2024
88e48b7
ci testing
RobJY Oct 18, 2024
3f78d5b
ci testing
RobJY Oct 18, 2024
b2a0c38
ci testing
RobJY Oct 18, 2024
aea8a73
ci testing
RobJY Oct 18, 2024
2ad8c57
ci testing
RobJY Oct 18, 2024
d66eac0
ci testing
RobJY Oct 18, 2024
6cabaa0
ci testing
RobJY Oct 18, 2024
d747ef0
ci testing
RobJY Oct 18, 2024
3b6a2cb
ci testing
RobJY Oct 18, 2024
52231c6
ci testing
RobJY Oct 18, 2024
e193b84
ci testing
RobJY Oct 18, 2024
c6c7b30
ci testing
RobJY Oct 18, 2024
724f568
ci testing
RobJY Oct 18, 2024
f3be85a
ci testing
RobJY Oct 21, 2024
49c9f30
ci testing
RobJY Oct 21, 2024
e4204ac
ci testing
RobJY Oct 21, 2024
7d70591
ci testing
RobJY Oct 22, 2024
8b6656e
ci testing
RobJY Oct 22, 2024
1d44216
ci testing
RobJY Oct 22, 2024
1057ed0
ci testing
RobJY Oct 22, 2024
ee21082
ci testing
RobJY Oct 22, 2024
b41e58a
ci testing
RobJY Oct 22, 2024
babe7a8
ci testing
RobJY Oct 22, 2024
feed6ae
ci testing
RobJY Oct 22, 2024
dd1fc80
ci testing
RobJY Oct 22, 2024
901fcb3
ci testing
RobJY Oct 23, 2024
e1a3878
ci testing
RobJY Oct 23, 2024
3b35a51
ci testing
RobJY Oct 23, 2024
dbe16ec
ci testing
RobJY Oct 23, 2024
16b06f1
ci testing
RobJY Oct 23, 2024
bbe5439
ci testing
RobJY Oct 23, 2024
9e37b56
ci testing
RobJY Oct 23, 2024
974cfd4
ci testing
RobJY Oct 23, 2024
185e2cf
ci testing
RobJY Oct 23, 2024
3ae2d89
ci testing
RobJY Oct 23, 2024
3de3581
ci testing
RobJY Oct 24, 2024
8e931c6
ci testing - basicpy & ashlar update
RobJY Oct 28, 2024
0edbee8
Revert "added full_test"
RobJY Oct 31, 2024
09d955b
small change to README.md
RobJY Oct 31, 2024
31a28e7
citation update
RobJY Oct 31, 2024
5c65c21
fixed prettier errors
RobJY Nov 7, 2024
e0a3183
prettier fix
RobJY Nov 7, 2024
aec6769
bug fix: typo in ci.yml
RobJY Nov 7, 2024
425ca72
merged in updated dev
RobJY Dec 3, 2024
8dff15e
lint fix
RobJY Dec 3, 2024
1b29e81
lint fix: updated nextflow version
RobJY Dec 3, 2024
6f3ccb3
lint fix: added run ci on dev push
RobJY Dec 3, 2024
e1d66ae
bug fix: removed extra input to pipline initialization
RobJY Dec 3, 2024
111e48e
Update README.md
RobJY Dec 3, 2024
2a7ee6b
removed documentation from ci push and added some README suggestions
RobJY Dec 3, 2024
dbabae8
Update docs/output.md
RobJY Dec 3, 2024
06cffc9
Update docs/output.md
RobJY Dec 3, 2024
f28e414
Update docs/output.md
RobJY Dec 3, 2024
1cf6d02
Update docs/output.md
RobJY Dec 3, 2024
8431d1d
Update docs/usage.md
RobJY Dec 3, 2024
1f35b8a
Update docs/usage.md
RobJY Dec 3, 2024
37be4cf
Update docs/usage.md
RobJY Dec 3, 2024
0b231b4
a bunch of simple fixes from PR suggestions
RobJY Dec 3, 2024
ea89f60
fixed marker sheet in docs
RobJY Dec 3, 2024
adbec63
added sample sheet cycle_number validation
RobJY Dec 4, 2024
712eb9b
updated citations for pipeline tools
RobJY Dec 10, 2024
5506382
fixed formatting and added MultiQC back to CITATIONS.md
RobJY Dec 10, 2024
e7d62b5
added test data citations
RobJY Dec 17, 2024
03ad364
Update CITATIONS.md
RobJY Jan 6, 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
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,10 @@ jobs:
- name: Check out pipeline code
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4

- name: Set up Nextflow
- name: Install Nextflow
uses: nf-core/setup-nextflow@v2
with:
version: "${{ matrix.NXF_VER }}"
version: "${{ matrix.NXT_VER }}"

- name: Set up Apptainer
if: matrix.profile == 'singularity'
Expand Down
38 changes: 35 additions & 3 deletions CITATIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,41 @@

## Pipeline tools

- [FastQC](https://www.bioinformatics.babraham.ac.uk/projects/fastqc/)
- [BaSiCPy](https://basicpy.readthedocs.io/en/stable/)

> Andrews, S. (2010). FastQC: A Quality Control Tool for High Throughput Sequence Data [Online].
> Peng, T., Thorn, K., Schroeder, T., Wang, L., Theis, F. J., Marr, C., Navab, N. A BaSiC Tool for Background and Shading Correction of Optical Microscopy Images. Nature Communication 2017 June 08; 8(1):14836. doi: [10.1038/ncomms14836](http://doi.org/10.1038/ncomms14836).

- [ASHLAR](https://labsyspharm.github.io/ashlar/)

> Muhlich, J. L., Chen, Y., Yapp, C., Russell, D., Santagata, S., Sorger, P. K. Stitching and registering highly multiplexed whole-slide images of tissues and tumors using ASHLAR. Bioinformatics 2022 October; 38(19):4613–4621. doi: [10.1093/bioinformatics/btac544](https://doi.org/10.1093/bioinformatics/btac544).

- [Backsub](https://github.com/SchapiroLabor/Background_subtraction)

> Schapiro, D., Sokolov, A., Yapp, C. et al. MCMICRO: a scalable, modular image-processing pipeline for multiplexed tissue imaging. Nat Methods 2022; 19:311–315. doi: [10.1038/s41592-021-01308-y](https://doi.org/10.1038/s41592-021-01308-y)

- [Coreograph](https://github.com/HMS-IDAC/UNetCoreograph)

> Schapiro, D., Sokolov, A., Yapp, C. et al. MCMICRO: a scalable, modular image-processing pipeline for multiplexed tissue imaging. Nat Methods 2022; 19:311–315. doi: [10.1038/s41592-021-01308-y](https://doi.org/10.1038/s41592-021-01308-y)

- [Cellpose](https://cellpose.readthedocs.io/en/latest/index.html)

> Pachitariu, M., Stringer, C. Cellpose 2.0: how to train your own model. Nat Methods 2022; 19:1634–1641. doi: [10.1038/s41592-022-01663-4](https://doi.org/10.1038/s41592-022-01663-4)

- [Mesmer](https://deepcell.readthedocs.io/en/master/)

> Greenwald, N.F., Miller, G., Moen, E. et al. Whole-cell segmentation of tissue images with human-level performance using large-scale data annotation and deep learning. Nat Biotechnol 2022; 40:555–565. doi: [10.1038/s41587-021-01094-0](https://doi.org/10.1038/s41587-021-01094-0)

- [MCQuant](https://github.com/labsyspharm/quantification)

> Schapiro, D., Sokolov, A., Yapp, C. et al. MCMICRO: a scalable, modular image-processing pipeline for multiplexed tissue imaging. Nat Methods 2022; 19:311–315. doi: [10.1038/s41592-021-01308-y](https://doi.org/10.1038/s41592-021-01308-y)

- [SciMap](https://scimap.xyz/)

> Nirmal et al. SCIMAP: A Python Toolkit for Integrated Spatial Analysis of Multiplexed Imaging Data. Journal of Open Source Software 2024; 9(97):6604, doi: [10.21105/joss.06604](https://doi.org/10.21105/joss.06604)

- [MultiQC](https://pubmed.ncbi.nlm.nih.gov/27312411/)

> Ewels P, Magnusson M, Lundin S, Käller M. MultiQC: summarize analysis results for multiple tools and samples in a single report. Bioinformatics. 2016 Oct 1;32(19):3047-8. doi: 10.1093/bioinformatics/btw354. Epub 2016 Jun 16. PubMed PMID: 27312411; PubMed Central PMCID: PMC5039924.
> Ewels P, Magnusson M, Lundin S, Käller M. MultiQC: summarize analysis results for multiple tools and samples in a single report. Bioinformatics. 2016 Oct 1;32(19):3047-8. doi: 10.1093/bioinformatics/btw354. Epub 2016 Jun 16. PubMed PMID: 27312411; PubMed Central PMCID: PMC5039924.

## Software packaging/containerisation tools

Expand All @@ -39,3 +67,7 @@
- [Singularity](https://pubmed.ncbi.nlm.nih.gov/28494014/)

> Kurtzer GM, Sochat V, Bauer MW. Singularity: Scientific containers for mobility of compute. PLoS One. 2017 May 11;12(5):e0177459. doi: 10.1371/journal.pone.0177459. eCollection 2017. PubMed PMID: 28494014; PubMed Central PMCID: PMC5426675.

## Test Data

> Schapiro, D., Sokolov, A., Yapp, C. et al. MCMICRO: a scalable, modular image-processing pipeline for multiplexed tissue imaging. Nat Methods 2022; 19:311–315. doi: [10.1038/s41592-021-01308-y](https://doi.org/10.1038/s41592-021-01308-y)
76 changes: 42 additions & 34 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,66 +26,76 @@

If you want to run the original MCMICRO pipeline outside of nf-core, please see <https://mcmicro.org/>.

<!-- 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
-->
The nf-core/mcmicro pipeline is an end-to-end processing pipeline that transforms multi-channel whole-slide images into single-cell data. It takes samplesheet and markersheet files as input and perfoms registration, segmentation and quantification. Multiple segmentation modules are available and can be run in parallel. The pipeline can also optionally perform background and shading correction, background subtraction, and supports tissue microarrays. It returns a pre-segmentation image file, a segmentation mask image, and a cell x feature array spreadsheet.

<!-- 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/contributing/design_guidelines#examples for examples. -->
<!-- TODO nf-core: Fill in short bullet-pointed list of the default steps in the pipeline -->
![nf-core/mcmicro metro diagram](assets/mcmicro_metro.png)

<!-- ## Usage
The MC in MCMICRO stands for 'Multiple Choice' and that refers to the fact that there will be multiple module options available for many steps in the pipeline. The currently supported options are provided in parentheses for required steps.

1. Registration ([Ashlar](https://nf-co.re/modules/ashlar/))
2. Segmentation ([Cellpose](https://nf-co.re/modules/cellpose/), [Mesmer](https://nf-co.re/modules/deepcell_mesmer/))
3. Quantification ([MCQuant](https://nf-co.re/modules/mcquant/))

## 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 and markersheet with your input data that looks as follows:

`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,cycle_number,channel_count,image_tiles
TEST1,1,4,https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/imaging/ome-tiff/cycif-tonsil-cycle1.ome.tif

```

Each row represents a fastq file (single-end) or a pair of fastq files (paired end).
Each row of the samplesheet represents a single cycle `ome.tiff` microscopy image file. The first column `sample` is the sample identifier. It can be repeated in multiple rows for samples with multiple cycles. The second column `cycle_number` is a number corresponding to the cycle number of the image. The third column `channel_count` is a count of the number of channels in the image. The fourth column `image_tiles` is a path or URL to the input image file.

-->
`markersheet.csv`:

<!-- Now, you can run the pipeline using: -->
```csv
channel_number,cycle_number,marker_name
1,1,DNA 1
2,1,Na/K ATPase
3,1,CD3
4,1,CD45RO
```

<!-- TODO nf-core: update the following command to include all required parameters for a minimal example -->
Each row of the markersheet represents a single channel in the associated sample image. The first column `channel_number` is an identifier for the respective channel. The second column `cycle_number` corresponds to the cycle number of the image and it must match the `cycle_number` in the supplied samplesheet. The third column `marker_name` is the name of the marker for the given channel and cycle.

<!-- ```bash
> [!WARNING]
> Please provide pipeline parameters via the CLI or Nextflow `-params-file` option. Custom config files including those provided by the `-c` Nextflow option can be used to provide any configuration _**except for parameters**_; see [docs](https://nf-co.re/docs/usage/getting_started/configuration#custom-configuration-files).

Now, you can run the pipeline using:

```bash
nextflow run nf-core/mcmicro \
-profile <docker/singularity/.../institute> \
--input samplesheet.csv \
--input_cycle samplesheet.csv \
--marker_sheet markers.csv \
--outdir <OUTDIR>
``` -->

> [!WARNING]
> Please provide pipeline parameters via the CLI or Nextflow `-params-file` option. Custom config files including those provided by the `-c` Nextflow option can be used to provide any configuration _**except for parameters**_; see [docs](https://nf-co.re/docs/usage/getting_started/configuration#custom-configuration-files).
```

<!-- For more details and further functionality, please refer to the [usage documentation](https://nf-co.re/mcmicro/usage) and the [parameter documentation](https://nf-co.re/mcmicro/parameters). -->
For more details and further functionality, please refer to the [usage documentation](https://nf-co.re/mcmicro/usage) and the [parameter documentation](https://nf-co.re/mcmicro/parameters).

<!-- ## Pipeline output
## Pipeline output

To see the results of an example test run with a full size dataset refer to the [results](https://nf-co.re/mcmicro/results) tab on the nf-core website pipeline page.
For more details about the output files and reports, please refer to the
[output documentation](https://nf-co.re/mcmicro/output). -->
[output documentation](https://nf-co.re/mcmicro/output).

<!-- ## Credits
## Credits

nf-core/mcmicro was originally written by TBD.
nf-core/mcmicro was written by Rob Young and Jeremy Muhlich from the Laboratory of Systems Pharmacology at Harvard Medical School. It is based on version 1.0 of mcmicro (labsyspharm/mcmicro) which was also developed there.

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

<!-- TODO nf-core: If applicable, make list of people who have also contributed -->
- [heylf](https://github.com/heylf)
- [Florian Wuennemann](https://github.com/FloWuenne)
- [Phil Ewels](https://github.com/ewels)
- [Adam Taylor](https://github.com/adamjtaylor)

## Contributions and Support

Expand All @@ -98,8 +108,6 @@ 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/mcmicro 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 -->

If you use nf-core/mcmicro for your analysis, please cite it using the following article: [Schapiro et al. 2022 Nat. Methods](https://www.nature.com/articles/s41592-021-01308-y)

An extensive list of references for the tools used by the pipeline can be found in the [`CITATIONS.md`](CITATIONS.md) file.
Expand Down
9 changes: 9 additions & 0 deletions assets/markers-test_full.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
channel_number,cycle_number,marker_name
1,1,DNA_6
2,1,ELANE
3,1,CD57
4,1,CD45
5,2,DNA_7
6,2,ELANE7
7,2,CD577
8,2,CD457
Binary file added assets/mcmicro_metro.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 0 additions & 2 deletions assets/methods_description_template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ description: "Suggested text and references to use when describing pipeline usag
section_name: "nf-core/mcmicro Methods Description"
section_href: "https://github.com/nf-core/mcmicro"
plot_type: "html"
## TODO nf-core: Update the HTML below to your preferred methods description, e.g. add publication citation for this pipeline
## You inject any metadata in the Nextflow '${workflow}' object
data: |
<h4>Methods</h4>
<p>Data was processed using nf-core/mcmicro v${workflow.manifest.version} ${doi_text} of the nf-core collection of workflows (<a href="https://doi.org/10.1038/s41587-020-0439-x">Ewels <em>et al.</em>, 2020</a>), utilising reproducible software environments from the Bioconda (<a href="https://doi.org/10.1038/s41592-018-0046-7">Grüning <em>et al.</em>, 2018</a>) and Biocontainers (<a href="https://doi.org/10.1093/bioinformatics/btx192">da Veiga Leprevost <em>et al.</em>, 2017</a>) projects.</p>
Expand Down
5 changes: 5 additions & 0 deletions assets/samplesheet-test_full.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
sample,cycle_number,channel_count,image_tiles
TEST1,1,4,https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/imaging/ome-tiff/cycif-tonsil-cycle1.ome.tif
TEST1,2,4,https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/imaging/ome-tiff/cycif-tonsil-cycle2.ome.tif
TEST2,1,4,https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/imaging/ome-tiff/cycif-tonsil-cycle2.ome.tif
TEST2,2,4,https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/imaging/ome-tiff/cycif-tonsil-cycle3.ome.tif
4 changes: 4 additions & 0 deletions conf/test.config
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,8 @@ process {
memory = "6.GB"
cpus = 2
}
withName: ".*:CELLPOSE"{
memory = "12.GB"
cpus = 4
}
}
27 changes: 24 additions & 3 deletions conf/test_full.config
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,29 @@ params {
// Input data for full size test
// TODO nf-core: Specify the paths to your full test data ( on nf-core/test-datasets or directly in repositories, e.g. SRA)
// 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_full_illumina_amplicon.csv'

// Genome references
genome = 'R64-1-1'
max_cpus = 2
max_memory = '6.GB'
max_time = '6.h'

// Input data
input_cycle = "${projectDir}/assets/samplesheet-test_full.csv"
marker_sheet = "${projectDir}/assets/markers-test_full.csv"

// TODO: Add samplesheet and markersheet to testdata repo then switch to this format:
//input_cycle = params.pipelines_testdata_base_path + 'mcmicro/samplesheet/???.csv'

illumination = "basicpy"
segmentation = "mesmer,cellpose"
}

process {
withName: ".*:DEEPCELL_MESMER" {
memory = "6.GB"
cpus = 2
}
withName: 'CELLPOSE'{
memory = "12.GB"
cpus = 4
}
}
Loading
Loading