Code Monkey home page Code Monkey logo

mcmicro's Introduction

nf-core/mcmicro

GitHub Actions CI Status GitHub Actions Linting StatusAWS CICite with Zenodo nf-test

Nextflow run with conda run with docker run with singularity Launch on Seqera Platform

Get help on SlackFollow on TwitterFollow on MastodonWatch on YouTube

Introduction

Warning

We are currently in the process of porting the original MCMICRO to nf-core. This pipeline is therefore in active development.

nf-core/mcmicro is a nextflow pipeline for processing highly-multiplexed imaging data, as produced by technologies such as Cycif, MIBI, CODEX, SeqIF among others.

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

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.

Contributions and Support

If you would like to contribute to this pipeline, please see the contributing guidelines.

For further information or help, don't hesitate to get in touch on the Slack #mcmicro channel (you can join with this invite).

Citations

If you use nf-core/mcmicro for your analysis, please cite it using the following article: Schapiro et al. 2022 Nat. Methods

An extensive list of references for the tools used by the pipeline can be found in the CITATIONS.md file.

You can cite the nf-core publication as follows:

The nf-core framework for community-curated bioinformatics pipelines.

Philip Ewels, Alexander Peltzer, Sven Fillinger, Harshil Patel, Johannes Alneberg, Andreas Wilm, Maxime Ulysse Garcia, Paolo Di Tommaso & Sven Nahnsen.

Nat Biotechnol. 2020 Feb 13. doi: 10.1038/s41587-020-0439-x.

mcmicro's People

Contributors

adamjtaylor avatar flowuenne avatar heylf avatar jmuhlich avatar nf-core-bot avatar robjy avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mcmicro's Issues

Design a mechanism to pass image pixel size to Mesmer and other tools

Description of the bug

The modules.config entry for Mesmer includes --image-mpp=0.215 in ext.args which is not appropriate. We do need a smart way to pass the pixel size to Mesmer (and other tools that need it), but hard coding it here is definitely wrong. Should this be perhaps extracted from the Ashlar output image and included in the metadata map or in its own separate channel? While we're at it we could extract other useful image metadata too. We could also extract metadata from the raw image data -- this would be particularly useful to cross-check against the samplesheet and markersheet content in the input validation step.

Consider --illumination manual vs. checking for the presence of the dfp/ffp samplesheet columns

Description of feature

I realized that --illumination manual may be semi-redundant with including the ffp and/or dfp columns in the sample sheet. We should either add a check in PIPELINE_INITIALISATION that these two things are aligned, or rethink the interface to this feature (perhaps the presence of user-provided illumination profiles would imply illumination="manual" and the illumination param would only serve to invoke basicpy or another future tool).

Set up test profile

Description of feature

The test profile should run our small tonsil test image data through as much of the pipeline as we have working.

Change outdir subdirectory names to module names

Description of the bug

Subdirectories should be named after the corresponding module name, with possible parallel outputs from different tools under different names or sub-sub-directories therein. E.g. instead of ashlar/ we should have registration/.

Command used and terminal output

No response

Relevant files

No response

System information

No response

Mesmer in MacOS

Description of the bug

Running nfcore/mcmicro test locally on a macOS (m2) runs into an issue with Mesmer.
Probably due to Docker container incompatibility with amd64 processing.

Command used and terminal output

nextflow run main.nf --input ./assets/samplesheet-test.csv --outdir ./output/ -profile docker

N E X T F L O W  ~  version 23.10.1
Launching `main.nf` [nauseous_cantor] DSL2 - revision: 68b73cf768
WARN: Access to undefined parameter `monochromeLogs` -- Initialise it to a default value eg. `params.monochromeLogs = some_value`


------------------------------------------------------
                                        ,--./,-.
        ___     __   __   __   ___     /,-._.--~'
  |\ | |__  __ /  ` /  \ |__) |__         }  {
  | \| |       \__, \__/ |  \ |___     \`-._,-`-,
                                        `._,._,'
  nf-core/mcmicro v2.0.0
------------------------------------------------------
Core Nextflow options
  runName        : nauseous_cantor
  containerEngine: docker
  launchDir      : /Users/jnimoca/Jose_BI/MCMICRO/mcmicro
  workDir        : /Users/jnimoca/Jose_BI/MCMICRO/mcmicro/work
  projectDir     : /Users/jnimoca/Jose_BI/MCMICRO/mcmicro
  userName       : jnimoca
  profile        : docker
  configFiles    : 

Input/output options
  input          : ./assets/samplesheet-test.csv
  outdir         : ./output/

!! Only displaying parameters that differ from the pipeline defaults !!
------------------------------------------------------
If you use nf-core/mcmicro for your analysis please cite:

* The pipeline
  

* The nf-core framework
  https://doi.org/10.1038/s41587-020-0439-x

* Software dependencies
  https://github.com/nf-core/mcmicro/blob/master/CITATIONS.md
------------------------------------------------------
executor >  local (2)
executor >  local (2)
executor >  local (2)
[56/3e9311] process > NFCORE_MCMICRO:MCMICRO:ASHLAR (TEST1)          [100%] 1 of 1 ✔
[23/f99a61] process > NFCORE_MCMICRO:MCMICRO:DEEPCELL_MESMER (TEST1) [100%] 1 of 1, failed: 1 ✘
[-        ] process > NFCORE_MCMICRO:MCMICRO:MCQUANT                 -
[-        ] process > NFCORE_MCMICRO:MCMICRO:MULTIQC                 -
Execution cancelled -- Finishing pending tasks before exit
-[nf-core/mcmicro] Pipeline completed with errors-
ERROR ~ Error executing process > 'NFCORE_MCMICRO:MCMICRO:DEEPCELL_MESMER (TEST1)'

Caused by:
  Process `NFCORE_MCMICRO:MCMICRO:DEEPCELL_MESMER (TEST1)` terminated with an error exit status (125)

Command executed:

  python /usr/src/app/run_app.py mesmer         --squeeze         --nuclear-image TEST1.ome.tif         --output-directory .         --output-name mask.tif                  --image-mpp=0.215 --nuclear-channel 0 --compartment nuclear
  
  cat <<-END_VERSIONS > versions.yml
  "NFCORE_MCMICRO:MCMICRO:DEEPCELL_MESMER":
      deepcell_mesmer:: 0.4.0
  END_VERSIONS

Command exit status:
  125

Command output:
  (empty)

Command error:
  Unable to find image 'vanvalenlab/deepcell-applications:0.4.1' locally
  0.4.1: Pulling from vanvalenlab/deepcell-applications
  docker: no matching manifest for linux/arm64/v8 in the manifest list entries.
  See 'docker run --help'.

Work dir:
  /Users/jnimoca/Jose_BI/MCMICRO/mcmicro/work/23/f99a614e8a4663dda3090b8e713ba2

Tip: you can try to figure out what's wrong by changing to the process work dir and showing the script file named `.command.sh`

 -- Check '.nextflow.log' file for details

Relevant files

nextflow.log

System information

Nextflow version 23.10.1
Hardware: MacBook Pro Apple M2 Pro 16Gb Memory
Executor: Local
Container Engine: Docker
OS: Sonoma 14.0 (23A344)
nfcore/mcmicro version: https://github.com/jmuhlich/mcmicro/tree/sample_sheet_mod

Add a staging module for macsima data.

Description of feature

create a local module to stage the macsima .tif files for usage with ashlar. Macsima produces .tif files per channel, per tile, per exposure time, etc. The staging module should stack all this .tif files into an ome.tif per cycle as ashlar requires.

Params that are paths aren't coerced to File objects by nf-validation if the value is a bare filename without a path component

Description of the bug

Specifying a param value like --input_cycle as a bare filename does not work -- nextflow doesn't seem to "see" the file.
Prefixing the filename with its full absolute path works around this. This is probably something about nf-validation handling of the params.

Command used and terminal output

# samplesheet.csv DOES exist here!
$ nextflow run nf-core/mcmicro --input_cycle samplesheet.csv ...

...
ERROR ~ Error executing process > 'NFCORE_MCMICRO:MCMICRO:INPUT_CHECK:SAMPLE_AND_MARKER_SHEET_CHECK'

Caused by:
  Not a valid path value: 'samplesheet.csv'
...

Relevant files

No response

System information

No response

SampleFileAggregation: Concatenating quantifications into a single csv

Description of feature

Hey all,

I will create a local module to aggregate all single csv files from mcquant, to a single csv file.
An extra column will be created with "sample_id" as the labelling column.

Why? In the hackathon we want to create some simple modules that produce simple spatial analysis outputs.
Phenotyping with gates, and spatialLDA outputs.
@migueLib @chiarasch <-- working on SpatialLDA

I am aware that there is a step somewhere in vanilla mcmicro that does this, but we wanted a single module as a intermediate step.

Add MAPS as phenotyping module

Description of feature
Adding a phenotyping module for automated phenotyping using MAPS. In the first version, this module takes a user-pretrained model and the quantification table as input. The output will be the modified quantification table with an additional column for cell phenotypes.

An associated issue already exists in nf-core/modules to create it not only as a local module

Expanding MCQuant nf-core module

Description of feature

Currently MCQuant has the option to pass additional skimage regionprops using the CLI, which is very nice. We would like to extend that by including specific glcm features in the MCQuant script.
Further, we would like McQuant to accept all available bioformats (e.g. also qptiff)
Other adjustments might have to be implemented if SpatialData is included (again depending on where - from start, after ASHLAR or after quant?)

Tasks

basicpy output should be split up by sample ID

Description of the bug

basicpy output file paths/names are based only on the input filenames. If a run has multiple samples with the same filenames then their basicpy outputs will clash and overwrite each other.

Command used and terminal output

No response

Relevant files

No response

System information

No response

Issues running Exemplar001

Description of the bug

I am running Exemplar001.
I created a samplesheet (1 row per cycle)
Running defaults

It gets stuck at ASHLAR creating a too large image.. is it just an ashlar bug? or something else going wrong?
Will try to change some parameters and report back

Command used and terminal output

nextflow run nf-core/mcmicro -r dev 
--outdir /Users/jnimoca/Jose_BI/P12E19_nfcore_mcmicro/output/ 
--marker_sheet 
/Users/jnimoca/Jose_BI/P12E19_nfcore_mcmicro/markers.csv 
-profile 
docker 
--input_cycle 
/Users/jnimoca/Jose_BI/P12E19_nfcore_mcmicro/samplesheet.csv

Output:

N E X T F L O W  ~  version 23.10.1
Launching `https://github.com/nf-core/mcmicro` [silly_newton] DSL2 - revision: b8d46de48e [dev]
WARN: Access to undefined parameter `monochromeLogs` -- Initialise it to a default value eg. `params.monochromeLogs = some_value`


------------------------------------------------------
                                        ,--./,-.
        ___     __   __   __   ___     /,-._.--~'
  |\ | |__  __ /  ` /  \ |__) |__         }  {
  | \| |       \__, \__/ |  \ |___     \`-._,-`-,
                                        `._,._,'
  nf-core/mcmicro v2.0.0-gb8d46de
------------------------------------------------------
Core Nextflow options
  revision       : dev
  runName        : silly_newton
  containerEngine: docker
  launchDir      : /Users/jnimoca/Jose_BI/P12E19_nfcore_mcmicro
  workDir        : /Users/jnimoca/Jose_BI/P12E19_nfcore_mcmicro/work
  projectDir     : /Users/jnimoca/.nextflow/assets/nf-core/mcmicro
  userName       : jnimoca
  profile        : docker
  configFiles    :

Input/output options
  input_cycle    : /Users/jnimoca/Jose_BI/P12E19_nfcore_mcmicro/samplesheet.csv
  outdir         : /Users/jnimoca/Jose_BI/P12E19_nfcore_mcmicro/output/
  marker_sheet   : /Users/jnimoca/Jose_BI/P12E19_nfcore_mcmicro/markers.csv

!! Only displaying parameters that differ from the pipeline defaults !!
------------------------------------------------------
If you use nf-core/mcmicro for your analysis please cite:

* The pipeline


* The nf-core framework
  https://doi.org/10.1038/s41587-020-0439-x

* Software dependencies
  https://github.com/nf-core/mcmicro/blob/master/CITATIONS.md
------------------------------------------------------
WARN: Samplesheet warnings:
	The samplesheet contains following unchecked field(s): [Filter]
executor >  local (3)
[ca/23253c] process > NFCORE_MCMICRO:MCMICRO:INPUT_CHECK:SAMPLE_AND_MARKER_SHEET_CHECK (markers.csv) [100%] 1 of 1 ✔
[a3/b43fba] process > NFCORE_MCMICRO:MCMICRO:INPUT_CHECK:MARKER_SHEET_CHECK (markers.csv)            [100%] 1 of 1 ✔
executor >  local (3)
[ca/23253c] process > NFCORE_MCMICRO:MCMICRO:INPUT_CHECK:SAMPLE_AND_MARKER_SHEET_CHECK (markers.csv) [100%] 1 of 1 ✔
[a3/b43fba] process > NFCORE_MCMICRO:MCMICRO:INPUT_CHECK:MARKER_SHEET_CHECK (markers.csv)            [100%] 1 of 1 ✔
[62/73bd10] process > NFCORE_MCMICRO:MCMICRO:ASHLAR (Exemplar001)                                    [  0%] 0 of 1
[-        ] process > NFCORE_MCMICRO:MCMICRO:DEEPCELL_MESMER                                         -
[-        ] process > NFCORE_MCMICRO:MCMICRO:MCQUANT                                                 -
[-        ] process > NFCORE_MCMICRO:MCMICRO:MULTIQC                                                 -

Relevant files

ASHLAR output from work folder:
Screenshot 2024-05-13 at 13 02 57

WorkFolder.zip

System information

Nextflow: version 23.10.1
M2 Macbook pro
executor: local
Container engine: Docker
OS: MacOS
nf-core/mcmicro v2.0.0-gb8d46de

Borrow ideas for how to design "restart" feature from sarek

Description of feature

Sarek has some nice logic to restart a previous run from a specific step in the pipeline. At each restart point in the pipeline, they emit a samplesheet into outdir that represents the state of the pipeline, potentially referencing other files in outdir. When a later run specifies the step param, the relevant samplesheet is automatically pulled out of outdir. This seems like a good way to implement the old mcmicro start-at feature while still retaining the separation of inputs and outdir.

Module parameters

Description of feature

For a simple way to specify module parameters, for example change ashlar's max_shift to 20.. or change sigma?
I believe they should be added to nextflow.config.

Change sample sheet format to 1 row per cycle per channel

sample sheet format:
sample, cycle_number, channel_count, image_tiles

the marker sheet (markesrs.csv) will be input via a pipeline parameter

To Do:

  • change input_check.nf:create_fastq_channel():meta.id to sample_name + cycle
  • modify sample sheet schema for the new format (validation handled by nf-validation)
  • image_tiles file(s) currently hard-coded in workflow. Need to use the file(s) in the sample sheet.
    • working with one image, but will require change for multiple images
  • add marker sheet pipeline parameter
  • in validation function check:
    • simple validation that required entries exist and that files have required suffix and that integers are actually integers
    • that channel_count in sample sheet matches the number of channels in the marker sheet
    • uniqueness of marker name in marker sheet
    • uniqueness of (cycle, channel) tuple in marker sheet
  • add test(s)

Add Palom as a registration option

Add Palom as a registration option for users that have prestitched whole-slide data with a disclaimer that for ensuring proper result quality, tiles with overlaps would be preferred.

TODO:

  • Docker image
  • CLI
  • initially a local module
  • parameter for registration option
  • Documentation

Add staging module for PhenoImager data

Description of feature

Create a module to stage the PhenoImager .tif files for usage with Ashlar. PhenoImager produces float32 .tif files per tile per cycle. The staging module would transform float32 to uint16, extract metadata information and stack all .tif files into an ome.tif per cycle as Ashlar requires.

input_sample code path does not explicitly sort input image filenames

Description of the bug

When using input_sample, the image directory files are collected via Groovy's File.eachFileRecurse which does not yield the results in any sorted order. The results must be collected and then sorted explicitly by filename. In addition it's probably better not to recurse and require all files are provided at the top level, as user expectations will vary on how files in subdirectories should be sorted relative to each other. This is as simple as replacing eachFileRecurse with eachFile. Or eachFileMatch could be used to perform the .ome.tif filename match as well.

Command used and terminal output

No response

Relevant files

No response

System information

No response

workflow runs when outdir parameter is missing

Description of the bug

Even though the outdir parameter is defined as required in the schema file the workflow runs when it is missing.

Command used and terminal output

'''
nextflow run ~/github/mcmicro-nf-core/main.nf --input_cycle ~/github/mcmicro-nf-core/assets/samplesheet_1_row_sample_cycle_multi_2.csv --marker_sheet ~/github/mcmicro-nf-core/assets/markers_multi_8.csv -profile test_work -params-file ~/github/mcmicro-nf-core/conf/workflow.json
'''
It runs to completion, but output is stored in a directory named 'null'.

Relevant files

No response

System information

No response

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.