Skip to content

Resume not working from modules where markersheet is collected #80

Open

Description

@kbestak

Description of the bug

For modules where the marker sheet is collected to a file prior to execution, resume does not work.
Applies to Backsub and MCQUANT.

    ch_mcquant_markers = ch_markersheet
        .flatMap{
            ['marker_name'] +
            it.collect{ _1, _2, marker_name, _4, _5, _6, _7, _8, _9 -> '"' + marker_name + '"' }
        }
        .dump(tag: "MARKERS")
        .collectFile(name: 'markers.csv', sort: false, newLine: true)

Command used and terminal output

Backsub issue (notice lack of 'cached'):

nextflow run nf_mcmicro -profile test,docker --outdir ./tmp -resume --marker_sheet ./nf_mcmicro/assets/markers-test_backsub.csv --backsub



executor >  local (4)
[17/5d07cb] NFCORE_MCMICRO:MCMICRO:ASHLAR (TEST1)          | 1 of 1, cached: 1 ✔
[e2/65270b] NFCORE_MCMICRO:MCMICRO:BACKSUB (TEST1)         | 1 of 1 ✔
[15/041dfc] NFCORE_MCMICRO:MCMICRO:DEEPCELL_MESMER (TEST1) | 1 of 1 ✔
[-        ] NFCORE_MCMICRO:MCMICRO:CELLPOSE                -
[7c/b87c54] NFCORE_MCMICRO:MCMICRO:MCQUANT (TEST1)         | 1 of 1 ✔
[7a/a1502f] NFCORE_MCMICRO:MCMICRO:MULTIQC                 | 1 of 1 ✔
-[nf-core/mcmicro] Pipeline completed successfully-


MCQUANT issue:

nextflow run nf_mcmicro -profile test,docker --outdir ./tmp -resume --marker_sheet ./nf_mcmicro/assets/markers-test.csv


executor >  local (2)
[17/5d07cb] NFCORE_MCMICRO:MCMICRO:ASHLAR (TEST1)          | 1 of 1, cached: 1 ✔
[22/e1725b] NFCORE_MCMICRO:MCMICRO:DEEPCELL_MESMER (TEST1) | 1 of 1, cached: 1 ✔
[-        ] NFCORE_MCMICRO:MCMICRO:CELLPOSE                -
[1b/0bd06b] NFCORE_MCMICRO:MCMICRO:MCQUANT (TEST1)         | 1 of 1 ✔
[bf/c83787] NFCORE_MCMICRO:MCMICRO:MULTIQC                 | 1 of 1 ✔
-[nf-core/mcmicro] Pipeline completed successfully-

Relevant files

No response

System information

No response

Activity

  1. added
    bug
    on Mar 24, 2025
  2. jmuhlich commented on Mar 27, 2025

    @jmuhlich
    Member

    Good catch. I wonder if there's a way to inject that generated csv file into the dataflow graph such that Nextflow recognizes it as a formal input to the module and therefore includes it in the cache key.

  3. jmuhlich commented on Mar 27, 2025

    @jmuhlich
    Member

    On investigating further, it looks like the problem is that each time collectFile is called without an explicit storeDir argument, the unique ${workDir}/tmp/... subdirectory that's created for it is different on each run even with -resume. We need to figure out how to control that path (but still keep the file in a place that workDir cleanup will manage it) so it's reproducible, or maybe put the CSV processing in an actual process which I think will make it more unambiguously cacheable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions