Hi All, I am running nf-core/mag v 5.4.0 on Nextf...
# mag
d
Hi All, I am running nf-core/mag v 5.4.0 on Nextflow v 25.10.2 to build MAGs using long read PacBio HIFI data. When I use the following input code, sample sheet and custom configuration file,
Copy code
nextflow run nf-core/mag -r 5.4.0 -profile apptainer -c mag-wall-time-increase.yaml -resume 263aef71-55e3-4ffe-a6fe-3a1f39f6574d \
--input 'KB1_long_read_sample_list_20260212.csv' \
--outdir KB1_long_read_MAGs_nf_core \
--min_contig_size 1500 \
--skip_spades \
--refine_bins_dastool \
--postbinning_input refined_bins_only \
--run_checkm2 \
--checkm2_db '/files/home/dgregoire/databases/CheckM2_database/uniref100.KO.1.dmnd' \
--gtdb_db '/datastore/researchdata/gtdbtk/release220'
the pipeline interrupts at the Prodigal and Metabat2 JGI Summarize contig depth steps with the following error message:
Copy code
-[nf-core/mag] Pipeline completed with errors-
WARN: Killing running tasks (1)
ERROR ~ Could not find which method load() to invoke from this list:
  public java.lang.Object org.yaml.snakeyaml.Yaml#load(java.io.InputStream)
  public java.lang.Object org.yaml.snakeyaml.Yaml#load(java.io.Reader)
  public java.lang.Object org.yaml.snakeyaml.Yaml#load(java.lang.String)
  public java.lang.Object org.yaml.snakeyaml.Yaml#load(java.io.File)
  public java.lang.Object org.yaml.snakeyaml.Yaml#load(java.nio.file.Path)

 -- Check script '/files/home/dgregoire/.nextflow/assets/nf-core/mag/subworkflows/nf-core/utils_nfcore_pipeline/main.nf' at line: 82 or see '.nextflow.log' file for more details
After doing some initial research, I suspect the problem may be an incompatibility between my nextflow version creating issues reading my custom config file (which is fine, to the best of my knowledge). This strikes me as strange, given that the run initiated and nextflow is caching the files properly based on my custom config file. I wanted to run it by the community first before I test downgrading to less recent nextflow version. Thanks in advance for any help.
j
For one thing, nextflow config files are not
yaml
files, so you shouldn't name it that (convention is
.conf
), but generaly that shouldn't make a difference
But I have no idea what is casuing this issue, I've never seen it before
The only use if
snakeyaml
in the mag code base is
Copy code
//
// Get software versions for pipeline
//
def processVersionsFromYAML(yaml_file) {
    def yaml = new org.yaml.snakeyaml.Yaml()
    def versions = yaml.load(yaml_file).collectEntries { k, v -> [k.tokenize(':')[-1], v] }
    return yaml.dumpAsMap(versions).trim()
}
Which we use to pick up versions...
I'll see if I can replicate it somehow with our test data...
Nope, I can't replicate it 😞
I also agree there is nothing obviously 'probematic' in the config file
Hrm actually ti's failing around
Copy code
Feb.-16 20:10:49.601 [Actor Thread 51] DEBUG nextflow.processor.TaskProcessor - Process NFCORE_MAG:MAG:BINNING_PREPARATION:LONGREAD_BINNING_PREPARATION:MINIMAP2_ASSEMBLY_ALIGN > Skipping output binding because one or more optional files are missing: fileoutparam<0:1>
d
Do you think trying to manually pull the .sif for minimap may help here? I can also try switching the file extension to .config to see if that clears it up. I tried re-running a fresh instance of it as well after clearing the cache to see if that helps.
j
I don't think the error is related to the container
Maybe I can try and make a branch for you where I update the minimap module (if there are updates)
Could you run
nextflow pull
, and then run with
-r minimap2-yaml-issue
d
When I tried calling it using the following input code:
Copy code
nextflow run nf-core/mag -r minimap2-yaml-issue -profile apptainer -c mag-wall-time-increase.yaml \
--input 'KB1_long_read_sample_list_20260212.csv' \
--outdir KB1_long_read_MAGs_nf_core \
--min_contig_size 1500 \
--skip_spades \
--refine_bins_dastool \
--postbinning_input refined_bins_only \
--run_checkm2 \
--checkm2_db '/files/home/dgregoire/databases/CheckM2_database/uniref100.KO.1.dmnd' \
--gtdb_db '/datastore/researchdata/gtdbtk/release220'
It returned an error message immediately:
Copy code
Launching `<https://github.com/nf-core/mag>` [high_hypatia] DSL2 - revision: 9aefaa1f00 [minimap2-yaml-issue]

ERROR ~ Module compilation error
- file : /files/home/dgregoire/.nextflow/assets/nf-core/mag/subworkflows/local/hostremoval_longread/main.nf
- cause: Unexpected input: '}' @ line 56, column 1.
   }
   ^

1 error


 -- Check script '/files/home/dgregoire/.nextflow/assets/nf-core/mag/subworkflows/local/preprocessing_longread/main.nf' at line: 16 or see '.nextflow.log' file for more details
j
Oops, I may have made a typo, give me amoment
Ok, remnoved the correct line now 😅 please pull again and then try running
d
Ended up with the same error message using the following input code:
Copy code
nextflow run nf-core/mag -r minimap2-yaml-issue -profile apptainer -c mag-wall-time-increase.yaml \
--input 'KB1_long_read_sample_list_20260212.csv' \
--outdir KB1_long_read_MAGs_nf_core \
--min_contig_size 1500 \
--skip_spades \
--refine_bins_dastool \
--postbinning_input refined_bins_only \
--run_checkm2 \
--checkm2_db '/files/home/dgregoire/databases/CheckM2_database/uniref100.KO.1.dmnd' \
--gtdb_db '/datastore/researchdata/gtdbtk/release220'
Error message:
Copy code
-[nf-core/mag] Pipeline completed with errors-
WARN: Killing running tasks (2)
ERROR ~ Could not find which method load() to invoke from this list:
  public java.lang.Object org.yaml.snakeyaml.Yaml#load(java.io.InputStream)
  public java.lang.Object org.yaml.snakeyaml.Yaml#load(java.io.Reader)
  public java.lang.Object org.yaml.snakeyaml.Yaml#load(java.lang.String)
  public java.lang.Object org.yaml.snakeyaml.Yaml#load(java.io.File)
  public java.lang.Object org.yaml.snakeyaml.Yaml#load(java.nio.file.Path)

 -- Check script '/files/home/dgregoire/.nextflow/assets/nf-core/mag/subworkflows/nf-core/utils_nfcore_pipeline/main.nf' at line: 82 or see '.nextflow.log' file for more details
@James Fellows Yates do you think I could circumvent this by trying an older version of the pipeline? I just need to make sure it can run long-read only assembly
j
Ugh that's frustrating...
Sorry I can't be more responsive on this, loads of non-pipeline deadlines atm. andnow poorly child too facepalm
Could you try 5.3 first
And go sequewntually back
From our changelogs I'm seeing anything related to mmseqs except for maybe a
samtools
bump 🤔
d
So it looks like running it with 5.3.0 moved past the step causing the error originally. Run is still going, but it looks like it is going to finish okay. Maybe something updated in 5.4.0 that led to an incompatibility?
j
OK that helps narrow things down
OOOOH
@Daniel Gregoire @Ruiqi Li @Francesco Fabiano could you all try running the
minimap2-yaml-issue
branch again? So first:
nextflow pull nf-core/mag
then run the commands you were trying to run but with
-r minimap2-yaml-issue
instead of
-r 5.4.0
. I just saw this that slipped past a review,
ch_versions = ch_versions.mix(ALE.out.versions.ifEmpty([]))
, and I wonder if the empty
[]
is trying to be loaded by the YAML loader which of course will not work...
As an empty list is not a YAML file 😬
That's my first instinct anyway...
d
Okay, troubleshooting run with 5.3.0 completed successfully after 5 days. Re-running with the minimap2-yaml-issue noted above and I’ll post the results once its done or interrupts again, thanks for catching this
❤️ 1
j
I would greatly appreciate it, thank you!
👍 1
r
Running with minimap2-yaml-issue with --checkm2 works!
j
Ahh fantastic! @Diego Alvarez Saravia fYI!
d
Fantastic! Your intuition was right on point @James Fellows Yates! Should we merge it then o should I try to reproduce the issue anyway (I could most probably on monday or tuesday)?
d
Same on my end, just waiting for the GTDB step to wrap but it looks like everything worked
🎉 1
j
I think you can merge @Diego Alvarez Saravia As we have two confirmed successful runs
Thank you all for helping testing and your patience!
🙌 1
d
So what version should we be calling for future runs that contains the bug fix? Has this been merged with 5.4.0?
j
It will be 5.4.1 (I assume @Diego Alvarez Saravia?), but we are just trying to finalise the release now
Having to update a couple of dependencies so taking a bit longer than expected
👍 1
d
Yes, 5.4.1 will have this fixed!