nf-core / mag

Assembly and binning of metagenomes
https://nf-co.re/mag
MIT License
192 stars 102 forks source link

GTDBTK_SUMMARY: Not a valid path ... #549

Closed muniheart closed 5 months ago

muniheart commented 7 months ago

Description of the bug

[commit e72890089a1fb69d32f2cf0762739c824412bf2b (tag: 2.5.1, origin/master)] From output below it appears that process GTDBTK_SUMMARY is being passed the wrong channel as one of the inputs.

Command used and terminal output

nextflow run nf-core/mag -profile debug,singularity --input samplesheet.csv --max_memory 125.GB --max_cpus 32 --max_time 168h --skip_concoct -resume

Dec-04 19:59:37.833 [Actor Thread 76] DEBUG nextflow.processor.TaskProcessor - Handling unexpected condition for
  task: name=NFCORE_MAG:MAG:GTDBTK:GTDBTK_SUMMARY; work-dir=null
  error [nextflow.exception.ProcessUnrecoverableException]: Not a valid path value type: java.util.LinkedHashMap ([id:sample_063, group:0, single_end:false, assembler:MEGAHIT, binner:MaxBin2, domain:unclassified, refinement:unrefined])
Dec-04 19:59:37.948 [Actor Thread 76] ERROR nextflow.processor.TaskProcessor - Error executing process > 'NFCORE_MAG:MAG:GTDBTK:GTDBTK_SUMMARY'

Caused by:
  Not a valid path value type: java.util.LinkedHashMap ([id:sample_063, group:0, single_end:false, assembler:MEGAHIT, binner:MaxBin2, domain:unclassified, refinement:unrefined])

Relevant files

No response

System information

No response

jfy133 commented 7 months ago

Thank you @muniheart for this and the previous issue.

I have seen them, but currently on parental leave and have some other issues so I'm quite slow in replying.

There is a PR open currently which I believe may address the issues and I'll try to get to asap

muniheart commented 7 months ago

Thanks @jfy133. I logged the 2 channels that are passed to GTDBTK_SUMMARY. In my case they have the same structure, [ [ meta, file ], ... ]. The first channel is modified by '.map{it[1]}' to pull the paths and it seems the 2nd channel should be, too. It works in my case.

Peter-Kille commented 6 months ago

Thanks @jfy133. I logged the 2 channels that are passed to GTDBTK_SUMMARY. In my case they have the same structure, [ [ meta, file ], ... ]. The first channel is modified by '.map{it[1]}' to pull the paths and it seems the 2nd channel should be, too. It works in my case.

Just to clarify the fix that muniheart identified. Under subworkflows/local/gtdbtk.nf Line 88: GTDBTK_CLASSIFYWF.out.summary.collect().ifEmpty([]), replaced by: GTDBTK_CLASSIFYWF.out.summary.map{it[1]}.collect().ifEmpty([]),

This fixed the issue for me.

jfy133 commented 5 months ago

@maxibor has included this here: https://github.com/nf-core/mag/blob/3f3505a0bac1cbfeef0777f123d98e64cc8bf78f/subworkflows/local/gtdbtk.nf#L88

jfy133 commented 5 months ago

Thanks everyone!