'test' profile (v5.0.0) was running ok until it go...
# mag
n
'test' profile (v5.0.0) was running ok until it got to this error. Should I post the log file?
Copy code
[a2/71ca45] NFC…T-MetaBAT2-test_minigut.1) | 11 of 19
Plus 7 more processes waiting for tasks…
ERROR ~ Failed to publish file: /bgfs/uchandran/pgc92/projects/nextflow/nfcore_mag/v5.0.0_test/work/e8/eb0984d9a70b80213e65c30b4f5b7e/test_minigut-bacteria_odb10-busco; to: /bgfs/uchandran/pgc92/projects/nextflow/nfcore_mag/v5.0.0_test/results/GenomeBinning/QC/BUSCO/test_minigut/test_minigut-bacteria_odb10-busco [copy] -- See log file for details
d
probably first just resume, maybe its a temporary issue. If the resume has the same problem, than the log file might be helpful, yes.
n
I resumed and got this at the end: Plus 3 more processes waiting for tasks… Waiting for file transfers to complete (1 files) -[nf-core/mag] Pipeline completed successfully, but with errored process(es) - Completed at: 15-Oct-2025 091708 Duration : 8m 30s CPU hours : 2.0 (52.7% cached, 2.5% failed) Succeeded : 19 Cached : 151 Ignored : 1 Failed : 1 Anything to be worried about? What do you think?
d
The "Failed" is not good. What failed?
n
I think this is it from work directory 6b/356073
Copy code
$ grep 356073 !$
grep 356073 .nextflow.log
Oct-15 09:09:19.745 [Task submitter] DEBUG nextflow.executor.GridTaskHandler - [SLURM] submitted process NFCORE_MAG:MAG:BINNING:MAXBIN2 (test_minigut_sample2) > jobId: 6609419; workDir: /bgfs/uchandran/pgc92/projects/nextflow/nfcore_mag/v5.0.0_test/work/6b/35607346d214293937d03b62e3c4df
Oct-15 09:09:19.746 [Task submitter] INFO  nextflow.Session - [6b/356073] Submitted process > NFCORE_MAG:MAG:BINNING:MAXBIN2 (test_minigut_sample2)
Oct-15 09:09:51.085 [Task monitor] DEBUG n.processor.TaskPollingMonitor - Task completed > TaskHandler[jobId: 6609419; id: 58; name: NFCORE_MAG:MAG:BINNING:MAXBIN2 (test_minigut_sample2); status: COMPLETED; exit: 255; error: -; workDir: /bgfs/uchandran/pgc92/projects/nextflow/nfcore_mag/v5.0.0_test/work/6b/35607346d214293937d03b62e3c4df started: 1760533761038; exited: 2025-10-15T13:09:24Z; ]
  task: name=NFCORE_MAG:MAG:BINNING:MAXBIN2 (test_minigut_sample2); work-dir=/bgfs/uchandran/pgc92/projects/nextflow/nfcore_mag/v5.0.0_test/work/6b/35607346d214293937d03b62e3c4df
Oct-15 09:09:51.134 [TaskFinalizer-1] INFO  nextflow.processor.TaskProcessor - [6b/356073] NOTE: Process `NFCORE_MAG:MAG:BINNING:MAXBIN2 (test_minigut_sample2)` terminated with an error exit status (255) -- Error is ignored
I just reran it on a different filesystem with the same HTC supercomputer. Seems I'm getting the same error:
Copy code
Plus 20 more processes waiting for tasks…
[53/a363a1] NOTE: Process `NFCORE_MAG:MAG:BINNING:MAXBIN2 (test_minigut_sample2)` terminated with an error exit status (255) -- Error is ignored
The pipeline is still churning away; hasn't finished yet.
Bad news, the pipeline finished on this other filesystem (/ix1) but now I'm also getting the original Failed to publish file error (that was seemingly corrected when I resumed as you suggested previously).
Copy code
Plus 5 more processes waiting for tasks…
ERROR ~ Failed to publish file: /ix1/uchandran/pgc92/projects/nextflow/nfcore_mag/v5.0.0_test/work/34/d5b14e0c4239c826fc2978ecac3308/test_minigut_sample2-bacteria_odb10-busco; to: /ix1/uchandran/pgc92/projects/nextflow/nfcore_mag/v5.0.0_test/results/GenomeBinning/QC/BUSCO/test_minigut_sample2/test_minigut_sample2-bacteria_odb10-busco [copy] -- See log file for details

 -- Check '.nextflow.log' file for details
ERROR ~ Pipeline failed. Please refer to troubleshooting docs: https://nf-co.re/docs/usage/troubleshooting

 -- Check '.nextflow.log' file for details
-[nf-core/mag] Pipeline completed with errors-
WARN: Killing running tasks (4)
j
Could you share the
nextflow.log
file @novelvirus? I have seen this a lonmg time ago on DSL1 #eager but could never work out what caused it
n
See attached. There are several issues: 1. FailedException:
Process NFCORE_MAG:mag:BINNING:MAXBIN2 (test_minigut_sample2) terminated with an error exit status (255)
2. Many "Failed to publish file" lines for Busco files 3. java.nio.file.NoSuchFileException - I think related to the Busco files. Is anybody else seeing these problems? I'd like to trust
mag
for a new metagenomics project that I'm starting. Microbiome discovery in tumors. But I'm starting to worry.
I also ran v4.0.0 to see if the problem(s) would occur and they did. See attached log file.
j
So the MaxBin2 thing happens with
test
when it can't bin anything (expected because our test data is extremely minimal), so you can ignore that
The publishing I'm really not sure,
Copy code
Oct-15 10:23:47.056 [PublishDir-4] DEBUG nextflow.processor.PublishDir - Failed to publish file: /ix1/uchandran/pgc92/projects/nextflow/nfcore_mag/v5.0.0_test/work/cc/904b557dc5aba0a246def8319d01cd/test_minigut-bacteria_odb10-busco; to: /ix1/uchandran/pgc92/projects/nextflow/nfcore_mag/v5.0.0_test/results/GenomeBinning/QC/BUSCO/test_minigut/test_minigut-bacteria_odb10-busco [copy] -- attempt: 1; reason: /ix1/uchandran/pgc92/projects/nextflow/nfcore_mag/v5.0.0_test/results/GenomeBinning/QC/BUSCO/test_minigut/test_minigut-bacteria_odb10-busco/SPAdes-MetaBAT2-test_minigut.unbinned.2.fa
Oct-15 10:23:49.521 [PublishDir-4] DEBUG nextflow.processor.PublishDir - Failed to publish file: /ix1/uchandran/pgc92/projects/nextflow/nfcore_mag/v5.0.0_test/work/cc/904b557dc5aba0a246def8319d01cd/test_minigut-bacteria_odb10-busco; to: /ix1/uchandran/pgc92/projects/nextflow/nfcore_mag/v5.0.0_test/results/GenomeBinning/QC/BUSCO/test_minigut/test_minigut-bacteria_odb10-busco [copy] -- attempt: 2; reason: /ix1/uchandran/pgc92/projects/nextflow/nfcore_mag/v5.0.0_test/results/GenomeBinning/QC/BUSCO/test_minigut/test_minigut-bacteria_odb10-busco/SPAdes-MetaBAT2-test_minigut.unbinned.2.fa/run_bacteria_odb10
I find weird in that the reason isn't informative... I wonder if that's somehting to ask Nextflow, it might be a bug... but I'm not sure.
It's also odd that on the second attempt the file it is trying to copy changes... 🤔
But one thing to consider @novelvirus is to maybe check what the
busco_summary.tsv
and
bin_summary.csv
look like
What the
failed to publish
means is Nextflow can't copy the files from the working directory to the
--outDir
. Despite this, this should not prevent the files passed down the pipeline, and you should see the important results in those two files
Secondly, you could also try using
checkm2
as the bin_qc tool - this generally I feel is more popular particularly for microbes/bacteria, if you're looking at microbiome discovery in tumours at least
n
Thank you for the ideas but both files are not found in the
results
directory
Copy code
~/ix1projects/nextflow/nfcore_mag/v5.0.0_test/results
$ find . -name 'busco_summary.tsv'
~/ix1projects/nextflow/nfcore_mag/v5.0.0_test/results
$ find . -name 'bin_summary.csv'
~/ix1projects/nextflow/nfcore_mag/v5.0.0_test/results
m
Are there multiple files being written out to the same place with the same name, but the publishdir_mode is
symlink
?
n
I don't know since I don't understand the question. Is there something specific I can check? Command lines?
m
If you go into the results directory, are the outputs symlinked files? Try
ls -l
and if there are arrows by the file names pointing to work directories
n
Copy code
pgc92 at login3 in ~/ix1projects/nextflow/nfcore_mag/v5.0.0_test/results
$ find . -type l
pgc92 at login3 in ~/ix1projects/nextflow/nfcore_mag/v5.0.0_test/results
No symlinks found
j
Do you have
clean_up  = true
?
Oh wait, do you have `busco_clean = true?
n
I'm running the
test
profile. I do not know what the settings are.
my config file for HTC is this:
Copy code
$ cat htc_resourceLimits.config 
params {
  config_profile_description = 'Pitt HTC cluster profile provided by nf-core/configs.'
  config_profile_contact = 'Fangping Mu'
  config_profile_url = 'https://crc.pitt.edu/'
}

singularity {
  enabled = true
  autoMounts = true
  // runOptions = "--bind /zfs1:/zfs1"
}

process {
  executor = 'slurm'
  clusterOptions = { "${params.clusterOptions ?: ''}" }
  scratch = true


  resourceLimits = [
    cpus: 64,
    memory: '768.GB',
    time: '144.h'
  ]
}


// added this 10/14/25 because of this https://nfcore.slack.com/archives/CE9MS66BS/p1760452204421589?thread_ts=1760448413.679689&cid=CE9MS66BS
aws {
  client {
    anonymous = true
  }
}
and nextflow history:
025-10-15 10:15:10	8m 49s	infallible_ramanujan	ERR	3d41222776d2ed7a78dd3fd4dd643690c49f6bd2	0650e180-23f2-49b6-b774-d04cb2b12c96	nextflow run nf-core/mag -r 5.0.0 -c htc_resourceLimits.config -profile test -resume --outdir results
m
I answer everything like it's on hpc. I guess aws wouldn't have symlinked output.
n
I'm running on an HTC. I had to add the aws block becase the
test
profile was failing without it.
👇🏽 1
j
@novelvirus in your command please try adding
--busco_clean false
I have a theory that this bit of code may be somehow breaking publishing (it deletes the files while Nextflow is still in the middle of copying them to
--outdir
...)
If by setting
busco_clean = false
then you and @Scarlet don't have the error anymore, then I think we've foun the culpret
n
Unfortunately, didn't work. Here is the error:
Copy code
$ tail nextflow_head.out 
[-        ] NFCORE_MAG:mag:BIN_SUMMARY     | 0 of 1
[b1/ec3c5c] NFC…-MaxBin2-test_minigut.001) | 16 of 19, cached: 16
Plus 4 more processes waiting for tasks…
ERROR ~ Failed to publish file: /ix1/uchandran/pgc92/projects/nextflow/nfcore_mag/v5.0.0_test/work/16/40b1aceacdd43b4828889983c2dacd/test_minigut_sample2-bacteria_odb10-busco; to: /ix1/uchandran/pgc92/projects/nextflow/nfcore_mag/v5.0.0_test/results/GenomeBinning/QC/BUSCO/test_minigut_sample2/test_minigut_sample2-bacteria_odb10-busco [copy] -- See log file for details
 -- Check '.nextflow.log' file for details
ERROR ~ Pipeline failed. Please refer to troubleshooting docs: https://nf-co.re/docs/usage/troubleshooting
Just to make sure, here is my job file:
Copy code
$ cat mag.job 
#!/bin/bash
#SBATCH --job-name=nextflow_head
#SBATCH -c 1
#SBATCH --mem=8g
#SBATCH -t 2:00:00   # 2hr for 'test' profile    # 3-00:00 for 3 days (Runtime in D-HH:MM)
#SBATCH --output=nextflow_head.out

unset TMPDIR

module purge
module load nextflow/25.04.6 singularity/4.3.2

nextflow run nf-core/mag -r 5.0.0 -c htc_resourceLimits.config -profile test \
  -params-file nf-params.json \
  -resume \
  --outdir results
Here is my nf-params.json. Is my syntax correct?
Copy code
$ cat nf-params.json 
{
  "busco_clean": false
}
j
Could you try from scratch rather than resume? O wonder if it's still trying to publish files from the 'completed' (but 'clean'task)
n
Unfortunately, I'm still getting the same error
Copy code
[46/2a273c] NFC…-MaxBin2-test_minigut.002) | 19 of 19 ✔
Plus 4 more processes waiting for tasks…
...
ERROR ~ Failed to publish file: /ix1/uchandran/pgc92/projects/nextflow/nfcore_mag/v5.0.0_test/work/21/27c01f12deba09ed054e303a45106c/test_minigut_sample2-bacteria_odb10-busco; to: /ix1/uchandran/pgc92/projects/nextflow/nfcore_mag/v5.0.0_test/results/GenomeBinning/QC/BUSCO/test_minigut_sample2/test_minigut_sample2-bacteria_odb10-busco [copy] -- See log file for details
Not sure if you need or want this but FYI, when I check for non-COMPLETED processes in execution_trace, I get this:
Copy code
grep -v COMPLETED results/pipeline_info/execution_trace_2025-10-17_13-13-21.txt
task_id hash    native_id       name    status  exit    submit  duration        realtime        %cpu    peak_rss        peak_vmem    rchar    wchar
59      3a/7e001a       6628720 NFCORE_MAG:mag:BINNING:MAXBIN2 (test_minigut_sample2)   FAILED  255     2025-10-17 13:24:38.897 34.7s30s      -       -       -       -       -
164     1e/8e89ce       6629102 NFCORE_MAG:mag:GTDBTK:GTDBTK_CLASSIFYWF (test_minigut_sample2)  ABORTED -       2025-10-17 14:02:34.811       -       -       -       -       -       -       -
165     95/478c2a       6629103 NFCORE_MAG:mag:GTDBTK:GTDBTK_CLASSIFYWF (test_minigut)  ABORTED -       2025-10-17 14:02:35.045 -    --       -       -       -       -
167     14/609b07       6629104 NFCORE_MAG:mag:GTDBTK:GTDBTK_CLASSIFYWF (test_minigut)  ABORTED -       2025-10-17 14:02:35.288 -    --       -       -       -       -
168     96/60f70b       6629105 NFCORE_MAG:mag:GTDBTK:GTDBTK_CLASSIFYWF (test_minigut)  ABORTED -       2025-10-17 14:02:35.530 -    --       -       -       -       -
166     84/4b61eb       6629106 NFCORE_MAG:mag:GTDBTK:GTDBTK_CLASSIFYWF (test_minigut)  ABORTED -       2025-10-17 14:02:35.743 -    --       -       -       -       -
For running
test
profile run with checkm2 (rather than Busco), the pipeline ran successfully. I think failures are expected b/c of the minimal test size as you mentioned previously. So, Busco just does not work for me with my HTC setup for some reason (I'll just switch to checkm2)
Copy code
-[nf-core/mag] Pipeline completed successfully, but with errored process(es) -
Completed at: 17-Oct-2025 11:34:41
Duration    : 39m 15s
CPU hours   : 2.4 (37.2% cached, 12.3% failed)
Succeeded   : 39
Cached      : 132
Ignored     : 3
Failed      : 3

$ grep -v COMPLETED results/pipeline_info/execution_trace_2025-10-17_10-55-23.txt | grep -v CACHED
task_id hash    native_id       name    status  exit    submit  duration        realtime        %cpu    peak_rss        peak_vmem       rchar   wchar
54      0f/f062fe       6628145 NFCORE_MAG:mag:BINNING:MAXBIN2 (test_minigut_sample2)   FAILED  255     2025-10-17 10:55:55.27230.1s    10ms    -       -       -       -       -
100     8c/0b2fef       6628236 NFCORE_MAG:mag:BIN_QC:CHECKM2_PREDICT (test_minigut_sample2)    FAILED  1       2025-10-17 11:18:41.336 1m 4s   1m      -       -       -       -       -
99      85/8d91da       6628235 NFCORE_MAG:mag:BIN_QC:CHECKM2_PREDICT (test_minigut_sample2)    FAILED  1       2025-10-17 11:18:41.074 2m 5s   2m      -       -       -       -       -
👍 1
s
Thanks for all the replies! I also switched to checkm2 and my test run with 3 samples has completed successfully all the way through the entire pipeline, will stick to checkm2 as well, thanks again.
👍 1
👍🏽 1
j
OK, that sounds good to me - if CheckM2 is working then just stick with this for now. If someone else encounteres the same publication error we can invesgtigate again
d
I can also confirm this error too @James Fellows Yates @Scarlet @novelvirus. If this makes the busco unusable, we probably should investigate.
j
I don't think it's making it completely useable, but good to know otherwise are getting it...
@Maxime Garcia would you have any suggestions on how to debug a 'failed to publish file' error?