Hei!! Two days ago I started a new position to an...
# eager
t
Hei!! Two days ago I started a new position to analyse ancient metagenomics in SedaDNA! Today I tried a setup nf-core/eager with Conda. Then i tried to add the Metagenomic Screening part especially Taxonomic binner with alignment (MALT) aDNA characteristic screening of taxonomically binned data from MALT (MaltExtract) is super unclear for me. Also do I need HOPs as well? So I gave up today, but will start again tomorrow. I can’t get my way through the different tutorials without loosing myself…maybe someone can help me :) 1000 dank!
j
Hey @Theda (me again 😬) Please can you give us more information? What command have you attempted? What error/problem are you hitting?
t
So, I am on the Cluster πŸ˜„ !! It might be that i don`t understood the set up correct. From what i understood: I need to have nextflow, nf-core, MALT, MaltExtract, Kraken2, BBduk for the metagenomics part. I have in my CONDA : N E X T F L O W version 22.10.6 build 5843 nf-core, version 2.11.1 malt-run -v MaltRun - Aligns sequences using MALT (MEGAN alignment tool) Options: Mode: Caught: jloda.util.UsageException: Mandatory option '--mode' not specified, legal values: Unknown, BlastN, BlastP, BlastX, Classifier, use option '-h' for help at jloda/jloda.swing.util.ArgsOptions.getOption(ArgsOptions.java:596) at jloda/jloda.swing.util.ArgsOptions.getOptionMandatory(ArgsOptions.java:403) at malt/malt.MaltRun.run(MaltRun.java:109) at malt/malt.MaltRun.main(MaltRun.java:76) at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104) at java.base/java.lang.reflect.Method.invoke(Method.java:578) at com.install4j.runtime/com.exe4j.runtime.LauncherEngine.launch(LauncherEngine.java:84) at com.install4j.runtime/com.install4j.runtime.launcher.UnixLauncher.start(UnixLauncher.java:71) at install4j.malt.MaltRun.main(Unknown Source)
Do i need HOPs and MaltExtract and if yes i tried to get it from https://github.com/rhuebler/MaltExtract /HOPs respectivly and then lost the plot....
Also I saw you wrote please dont use CONDA πŸ₯²
j
No no, you only need conda + nextflow! that's it! The pipeline will install the rest for you But what Nextflow command/config are you using to get to the error πŸ™‚
And conda is fine, just not as good as docker/singluarity (it's more breakable)
t
Ah also just checked we have singularity as well! But i will try stick to conda.
I did not run it jet, but my idea is fastq - skip host mapping - metagenomic screaning - MALT + MALTEtract is this correct? πŸ™‚ sorry I am a bit slow
j
Sorry, but you're not being clear πŸ˜…
Please give us the
nextflow run <...>
command
As a first step
How you got to the MALT error
This would be a good starting point for us πŸ™‚
Then we can adpapt it
But for example, you cannot skip host-mapping in eager2
In eager2, you have to get the 'offtarget' reads to send to metagenomic screening
(this is different in eager3, but won't be released for a few more months)
πŸ‘ 1
And have you tried following this?
If yo udon't have host associated samples (given you're working with sedaDNA) you could use a tiny genome like PhiX instead
t
Ah this is helpful already thanks. Probably more questions soon, let me adapt first πŸ˜‰
Update: I am running nextflow run nf-core/eager -r 2.5.3 \ -profile conda \ --input 'sediment_screen_1.tsv' \ --fasta 'Reference/phix/PhiX174.fa' \ --bwa_index 'Reference/phix/' \ --fasta_index 'Reference/phix/PhiX174.fa.fai' \ --seq_dict 'Reference/phix/PhiX174.dict' \ --outdir 'results_test' \ -w 'work_test' \ --complexity_filter_poly_g \ --run_bam_filtering --bam_unmapped_type fastq \ --run_metagenomic_screening \ --metagenomic_tool malt \ --database '/fast/AG_Forslund/Theda/stickelback/Reference/malt_db/bacarch_mini_2025_09/malt_refseq_bacarch_mini_2025_09' \ --malt_mode BlastN --malt_alignment_mode SemiGlobal \ --malt_min_support_mode percent --malt_min_support_percent 0.01 \ --max_cpus 8 --max_memory '64.GB' \ -resume I get the following error : pipeline_report.txt ---------------------------------------------------- ,--./,-. _ _ _ __ _ /,-._.--~\ |\ | |__ _ / ` / \ |_) |__ } { | \| | \__, \__/ | \ |___ \`-._,-
Copy code
-,
.,.,' nf-core/eager v2.5.3 ---------------------------------------------------- Run Name: dreamy_pasteur #################################################### ## nf-core/eager execution completed unsuccessfully! ## #################################################### The exit status of the task that caused the workflow execution to fail was: 4. The full error message was: Error executing process > 'fastqc (SRR27862434_L1)' Caused by: Process
fastqc (SRR27862434_L1)
terminated with an error exit status (4) Command executed: fastqc -t 2 -q SRR27862434_1.fastq.gz SRR27862434_2.fastq.gz rename 's/_fastqc\.zip$/_raw_fastqc.zip/' *_fastqc.zip rename 's/_fastqc\.html$/_raw_fastqc.html/' *_fastqc.html Command exit status: 4 Command output: application/gzip application/gzip Command error: application/gzip application/gzip Work dir: /fast/AG_Forslund/Theda/stickelback/work_test/cd/ea4bd7c1056e14a3f32561acb48748 Tip: view the complete command output by changing to the process work dir and entering the command
cat .command.out
The workflow was completed at 2025-09-04T115844.766912+02:00 (duration: 3m 37s) The command used to launch the workflow was as follows: nextflow run nf-core/eager -r 2.5.3 -profile conda --input sediment_screen_1.tsv --fasta Reference/phix/PhiX174.fa --bwa_index Reference/phix/ --fasta_index Reference/phix/PhiX174.fa.fai --seq_dict Reference/phix/PhiX174.dict --outdir results_test -w work_test --complexity_filter_poly_g --run_bam_filtering --bam_unmapped_type fastq --run_metagenomic_screening --metagenomic_tool malt --database /fast/AG_Forslund/Theda/stickelback/Reference/malt_db/bacarch_mini_2025_09/malt_refseq_bacarch_mini_2025_09 --malt_mode BlastN --malt_alignment_mode SemiGlobal --malt_min_support_mode percent --malt_min_support_percent 0.01 --max_cpus 8 --max_memory 64.GB -resume Pipeline Configuration: ----------------------- - Pipeline Release: 2.5.3 - Run Name: dreamy_pasteur - Input: sediment_screen_1.tsv - Fasta Ref: Reference/phix/PhiX174.fa - Max Resources: 64.GB memory, 8 cpus, 10d time per job - Output dir: results_test - Launch dir: /fast/AG_Forslund/Theda/stickelback - Working dir: /fast/AG_Forslund/Theda/stickelback/work_test - Script dir: /home/tbartol/.nextflow/assets/nf-core/eager - User: tbartol - Config Profile: conda - Config Files: /home/tbartol/.nextflow/assets/nf-core/eager/nextflow.config - Date Started: 2025-09-04T115507.848381+02:00 - Date Completed: 2025-09-04T115844.766912+02:00 - Pipeline script file path: /home/tbartol/.nextflow/assets/nf-core/eager/main.nf - Pipeline script hash ID: ef0f57ac4456e40d8157464a225ab85b - Pipeline repository Git URL: - Pipeline repository Git Commit: 3f9d64ced5e287391bcd5517a0c40153a01268e5 - Pipeline Git branch/tag: 2.5.3 - Nextflow Version: 22.10.6 - Nextflow Build: 5843 - Nextflow Compile Timestamp: 23-01-2023 23:20 UTC -- nf-core/eager i am running on one sample and a super reduced database for MALT
j
note itself helpful if you can use triple backticks around code blocks (it makes it easier toread)
Your error message is not one I've seen before...
A quick skim suggests to me that the command looks good, but exit code
4
apparently means ' Interrupted system call'
Which is a very odd thing...
It might mean your cluster killed the job somehow
How are you submitting the command?
t
Cool a new error. Ja it could be OOM. I did not use slurm, which i am normally, I used the local executor straight from the shell :*D
t
Hi Theda! I see James is on the case, so I'll only give a couple of broader comments. a) it is possible that your cluster has some limit on resource usage on the headnodes, hence running locally might trigger a killswitch due to that. b) I would highly suggest using singularity/docker whenever available, over conda. Makes everything much more reproducible and well-behaved
also, you can check whether a configuration for your cluster already exists on nf-core/configs. that would make swapping to using the scheduler easy as pie
t
Hei! Thanks, ja maybe I will try singularity we have it on the Cluster as well. I check nf-core/configs but we are not there...yet πŸ™‚ thanks
j
t
Perfect!! Thank you so much for the help and support I will keep you updated. Testing slurm first and then maybe switch to singularity!
j
Note you will need both
SLURM means that each step of the nextflow pipeline gets submitted as seaprate jobs
πŸ₯² 1
Singluarity tells the compute node to load the software for the step of the pipeline (so bascially the tool) using a singularity image
t
Oki!! Thanks
j
Like if you get this configured right it's going to be soooooooooooo goood
it's one of the best things about nextflow
100 rainbow 1
πŸ™‚ 1
t
Oh I learned so much today! Thank you both! @James Fellows Yates and @Thiseas C. Lamnidis the test job is running already for 2 minutes!!
100 rainbow 1
party parrot 1
j
Let us know if it completes! If you got this running fully within a day would be pretty cool!
t
okay. I think I did the MALT db build with the wrong version but ist progress πŸ™‚ will keep you updated! ## nf-core/eager execution completed unsuccessfully! ## #################################################### The exit status of the task that caused the workflow execution to fail was: 1. The full error message was: Error executing process > 'malt (1)' Caused by: Process
malt (1)
terminated with an error exit status (1) Command executed: malt-run -J-Xmx12g -t 6 -v -o . -d malt_refseq_bacarch_mini_2025_09 -id 85 -m BlastN -at SemiGlobal -top 1 -supp 0.01 -mq 100 --memoryMode load -i SRR27862434.unmapped.fastq.gz |&tee malt.log Command exit status: 1 Command output: Filter: --minBitScore: 50.0 --maxExpected: 1.0 --minPercentIdentity: 85.0 --maxAlignmentsPerQuery: 100 --maxAlignmentsPerRef: 1 BlastN parameters: --matchScore: 2 --mismatchScore: -3 --setLambda: 0.625 --setK: 0.41 DNA query parameters: --forwardOnly: false --reverseOnly: false LCA parameters: --topPercent: 1.0 --minSupportPercent: 0.01 --minSupport: 0 --minPercentIdentityLCA: 0.0 --useMinPercentIdentityFilterLCA: false --weightedLCA: false --magnitudes: false Heuristics: --maxSeedsPerFrame: 100 --maxSeedsPerRef: 20 --seedShift: 1 Banded alignment parameters: --gapOpen: 7 --gapExtend: 3 --band: 4 Other: --replicateQueryCacheBits: 20 --xPart: false --verbose: true Version MALT (version 0.6.1, built 25 Oct 2022) Author(s) Daniel H. Huson Copyright (C) 2022 Daniel H. Huson. This program comes with ABSOLUTELY NO WARRANTY. Expected: MATableV0.12. Got: Caught: java.io.IOException: Index is too old or incorrect file (wrong magic number). Please recompute index. at jloda/jloda.util.Basic.readAndVerifyMagicNumber(Basic.java:278) at malt/malt.data.ReferencesHashTableAccess.getIndexSequenceType(ReferencesHashTableAccess.java:278) at malt/malt.MaltRun.run(MaltRun.java:230) at malt/malt.MaltRun.main(MaltRun.java:76) at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104) at java.base/java.lang.reflect.Method.invoke(Method.java:577) at com.install4j.runtime/com.exe4j.runtime.LauncherEngine.launch(LauncherEngine.java:84) at com.install4j.runtime/com.install4j.runtime.launcher.UnixLauncher.start(UnixLauncher.java:69) at install4j.malt.MaltRun.main(Unknown Source) Command error: INFO: Environment variable SINGULARITYENV_TMPDIR is set, but APPTAINERENV_TMPDIR is preferred INFO: Environment variable SINGULARITYENV_NXF_DEBUG is set, but APPTAINERENV_NXF_DEBUG is preferred Work dir: /fast/AG_Forslund/Theda/stickelback/work_test/c9/9ebd11114b64a00ff4697d1f8b5b0e 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
The workflow was completed at 2025-09-04T171425.768774+02:00 (duration: 15m 21s) The command used to launch the workflow was as follows: nextflow run nf-core/eager -r 2.5.3 -profile singularity -c nextflow_slurm_singularity.config --input sediment_screen_1.tsv --fasta Reference/phix/PhiX174.fa --bwa_index Reference/phix/ --fasta_index Reference/phix/PhiX174.fa.fai --seq_dict Reference/phix/PhiX174.dict --outdir results_test -w work_test --complexity_filter_poly_g --run_bam_filtering --bam_unmapped_type fastq --run_metagenomic_screening --metagenomic_tool malt --database /fast/AG_Forslund/Theda/stickelback/Reference/malt_db/bacarch_mini_2025_09/malt_refseq_bacarch_mini_2025_09 --malt_mode BlastN --malt_alignment_mode SemiGlobal --malt_min_support_mode percent --malt_min_support_percent 0.01 -with-report results_test/execution_report_20250904_165859.html -with-timeline results_test/execution_timeline_20250904_165859.html -with-trace results_test/execution_trace_20250904_165859.txt -resume Pipeline Configuration: ----------------------- - Pipeline Release: 2.5.3 - Run Name: nice_jones - Input: sediment_screen_1.tsv - Fasta Ref: Reference/phix/PhiX174.fa - Max Resources: 128 GB memory, 16 cpus, 10d time per job - Container: singularity - nfcore/eager:2.5.3 - Output dir: results_test - Launch dir: /fast/AG_Forslund/Theda/stickelback - Working dir: /fast/AG_Forslund/Theda/stickelback/work_test - Script dir: /home/tbartol/.nextflow/assets/nf-core/eager - User: tbartol - Config Profile: singularity - Config Profile Description: MDC SLURM + Apptainer profile for nf-core pipelines - Config Profile Contact: Theda / MDC - Config Files: /home/tbartol/.nextflow/assets/nf-core/eager/nextflow.config, /fast/AG_Forslund/Theda/stickelback/nextflow_slurm_singularity.config - Date Started: 2025-09-04T165904.386008+02:00 - Date Completed: 2025-09-04T171425.768774+02:00 - Pipeline script file path: /home/tbartol/.nextflow/assets/nf-core/eager/main.nf - Pipeline script hash ID: ef0f57ac4456e40d8157464a225ab85b - Pipeline repository Git URL: https://github.com/nf-core/eager - Pipeline repository Git Commit: 3f9d64ced5e287391bcd5517a0c40153a01268e5 - Pipeline Git branch/tag: 2.5.3 - Nextflow Version: 22.10.6 - Nextflow Build: 5843 - Nextflow Compile Timestamp: 23-01-2023 23:20 UTC -- nf-core/eager https://github.com/nf-core/eager
j
Yeah looks like it!
MALT in eager is v0.61
t
Is there anywhere already a ready to use MALT DB for sediementary/ enviromental microbes you would recommend?
j
No
There are very few ready-made databases at all for metagenomics, let alone for MALT or sedaDNA πŸ™ƒ
You could use stuff like GTDB or some of the Ben Langmead pre-made Kraken2 databases, and convert to MALT..
❀️ 1
t
Ahh it worked, it is without maltextract yet! (base) [tbartol@max218.mdc-berlin.net:/fast/AG_Forslund/Theda/stickelback/results_test] $ cat execution_trace.txt task_id hash native_id name status exit submit duration realtime %cpu peak_rss peak_vmem rchar wchar 4 7e/c8a8ac 1040466 fastp (SRR27862434_L1) CACHED 0 2025-09-04 165910.922 3m 45s 3m 23s 378.1% 635.2 MB 936 MB 2.2 GB 2.1 GB 3 a4/317a87 1040467 fastqc (SRR27862434_L1) CACHED 0 2025-09-04 165910.974 3m 30s 3m 9s 168.4% 600.4 MB 2.9 GB 2.3 GB 2.8 MB 7 5d/428f99 1040477 adapter_removal (SRR27862434_L1) CACHED 0 2025-09-04 170255.725 7m 40s 7m 10s 172.3% 583.8 MB 6.4 GB 5 GB 3.4 GB 10 2d/6d6841 1040484 fastqc_after_clipping (SRR27862434_L1) CACHED 0 2025-09-04 171035.810 1m 5s 46.9s 101.6% 605.9 MB 2.8 GB 398.6 MB 1.5 MB 12 d9/59e335 1040485 bwa (SRR27862434) CACHED 0 2025-09-04 171035.858 1m 20s 59.7s 180.1% 2.9 GB 3.4 GB 3.5 GB 2.8 GB 16 13/b3e9a5 1040487 samtools_flagstat (SRR27862434) CACHED 0 2025-09-04 171155.630 34.9s 2.3s 89.8% 5.5 MB 11.9 MB 288.6 MB 1.6 KB 15 d9/daca31 1040488 samtools_filter (SRR27862434) CACHED 0 2025-09-04 171155.664 1m 25s 54.3s 324.7% 12.7 MB 516.5 MB 2.8 GB 2.6 GB 19 3f/532523 1040489 samtools_flagstat_after_filter (SRR27862434) CACHED 0 2025-09-04 171320.691 4.9s 49ms 29.2% 0 0 58 KB 1.6 KB 18 5a/86c8bd 1040490 markduplicates (SRR27862434) CACHED 0 2025-09-04 171320.746 4.8s 1.5s 150.6% 528.4 MB 6.4 GB 24.5 MB 627.3 KB 22 1b/4866fc 1040493 endorSpy (SRR27862434) CACHED 0 2025-09-04 171325.626 29.9s 148ms 42.1% 11 MB 19.7 MB 716.2 KB 1.7 KB 36 bd/95fca3 1040494 qualimap (SRR27862434) CACHED 0 2025-09-04 171325.671 34.9s 3.5s 132.2% 144.4 MB 6.5 GB 26 MB 597.7 KB 24 46/7dca3d 1040495 damageprofiler (SRR27862434) CACHED 0 2025-09-04 171325.696 34.9s 2.4s 58.6% 113.8 MB 6.3 GB 25.8 MB 71.9 KB 21 c6/650469 1040492 preseq (SRR27862434) CACHED 0 2025-09-04 171320.870 9.7s 377ms 4.2% 2.8 MB 7.1 MB 57.9 KB 1.3 KB 13 e0/5bef5c 1040469 output_documentation CACHED 0 2025-09-04 165911.586 24s 2s 15.0% 16.8 MB 34 MB 8.1 MB 7.4 MB 14 80/b316c8 1045182 get_software_versions COMPLETED 0 2025-09-05 133353.885 19.1s 14.1s 79.6% 271.1 MB 6.4 GB 171.1 MB 35.5 KB 23 01/391bdc 1045183 malt (1) COMPLETED 0 2025-09-05 133354.000 2m 9s 2m 6s 186.6% 1000.8 MB 7.3 GB 857.7 MB 1.4 MB 38 8f/462a2c 1045205 multiqc (1) COMPLETED 0 2025-09-05 133603.297 59.7s 34.9s 94.1% 215.3 MB 737.2 MB 33.4 GB 12.9 MB
πŸŽ‰ 2
Another questions here, so for Malt_Extract i need to define a list of microbes i want to authenticate. So in my case would I create a list from the MALT classification? I tried a mock list but this did not work
j
Yes, what do you mean by it did not work? The names need to match exactly what it's in the NCBI taxonomu
You can use the malt tables as an example
t
Ja I will try the malt table. I will send errors once i have new once :`D
salute 1
I might have fucked up the MALT db i think? INFO: MaltExtract 1.7 --input /fast/AG_Forslund/Theda/stickelback/results_test/metagenomic_classification/malt/SRR27862434.unmapped.rma6 --taxa --output /fast/AG_Forslund/Theda/stickelback/tmp_me_scan/ --filter scan --top 0.01 --maxLength 0 --minPI 0.0 --resources Reference/hops --threads 2 Sep 05, 2025 31152 PM RMAExtractor.RMAExtractor main INFO: Setting up Taxon Name and Taxon ID maps Filter no longer supprted use parameter -h for accepted values Sep 05, 2025 31206 PM RMAExtractor.RMAExtractor main INFO: Setting up Phylogenetic Tree Sep 05, 2025 31206 PM RMAExtractor.RMAExtractor main INFO: Using 2 cores Sep 05, 2025 31206 PM RMA6Processor.RMA6Scanner process INFO: Scanning File: SRR27862434.unmapped.rma6 Sep 05, 2025 31206 PM RMA6Processor.RMA6Scanner process SEVERE: SRR27862434.unmapped.rma6 has no taxonomy block Exception in thread "main" java.lang.NullPointerException at java.util.AbstractCollection.addAll(AbstractCollection.java:343) at utility.ScanSummaryWriter.setProcessedIds(ScanSummaryWriter.java:46) at utility.ScanSummaryWriter.<init>(ScanSummaryWriter.java:39) at RMAExtractor.RMAExtractor.main(RMAExtractor.java:160) because i have no taxa in the RMA6
j
Yeah might be
Unfortunately maltExtract doesn't have the best error.handlimg
t
Soo, maltExtract i am so close: this is my script: (base) [tbartol@max189.mdc-berlin.net://fast/AG_Forslund/Theda/stickelback/scripts] $ cat run_eager_mx.slurm #!/bin/bash #SBATCH --job-name=eager_mx #SBATCH --output=logs/eager_mx_%j.out #SBATCH --error=logs/eager_mx_%j.err #SBATCH --cpus-per-task=2 #SBATCH --mem=8G #SBATCH --time=240000 set -euo pipefail source ~/miniforge3/etc/profile.d/conda.sh conda activate nf-driver source .configs/env_eager.sh cd /fast/AG_Forslund/Theda/stickelback rm -f results_test/execution_trace.txt || true nextflow run nf-core/eager -r 2.5.3 \ -profile singularity \ -c nextflow_slurm_singularity.config \ --input 'sediment_screen_1.tsv' \ --fasta 'Reference/phix/PhiX174.fa' \ --bwa_index 'Reference/phix/' \ --fasta_index 'Reference/phix/PhiX174.fa.fai' \ --seq_dict 'Reference/phix/PhiX174.dict' \ --outdir 'results_test' \ -w 'work_test' \ --complexity_filter_poly_g \ --run_bam_filtering --bam_unmapped_type fastq \ --run_metagenomic_screening \ --metagenomic_tool malt \ --database '/fast/AG_Forslund/Theda/stickelback/Reference/malt_db/bacarch_mini_061/malt_refseq_bacarch_mini_061_map' \ --malt_mode BlastN \ --malt_alignment_mode SemiGlobal \ --malt_min_support_mode percent \ --malt_min_support_percent 0.01 \ --malt_top_percent 1 \ --percent_identity 85 \ --run_maltextract \ --maltextract_taxon_list '/fast/AG_Forslund/Theda/stickelback/targets_global/targets.txt' \ --maltextract_topalignment true \ --maltextract_ncbifiles '/fast/AG_Forslund/Theda/stickelback/Reference/hops' \ --maltextract_percentidentity 85 \ --maltextract_megansummary \ -with-report -with-timeline \ -resume (base) [tbartol@max189.mdc-berlin.net://fast/AG_Forslund/Theda/stickelback/logs] $ cat eager_mx_1053047.err /var/spool/slurm/job1053047/slurm_script: line 43: --run_maltextract: command not found Is the problem something with the dashes??
t
hi Theda! Please use Markdown syntax when posting code. It makes it much easier to read and find issues https://www.markdownguide.org/extended-syntax/#fenced-code-blocks
currently, I cannot see anything wrong with the command πŸ˜… My best guess would be that one of the
\
at the ends of the lines is followed by a space and hence not escaping the new line. but I could not see such an issue when copy-pasting the text above
this 1
t
sorry, you told me already earlier and i forgot that, Jesus πŸ˜„ thanks i thought so with the dash thingies
t
on slack you can also edit sent messages to add the code block backticks after the fact πŸ˜‰ For future reference
❀️ 1