mag
mag copied to clipboard
Set minimal contig length for metaBAT2 to 1,500 if the provided value is smaller
Description of the bug
The parameter --min_contig_size allows the user to specify the minimal contig length for binning and subsequent analysis. The program metaBAT2 requires a minimal contig length of 1,500 bp and fails if a lower value is provided. However, the other binner MaxBin2 does not have this restriction and, particularly for ancient DNA data, it is beneficial to also bin contigs that are just 1,000 bp and longer.
Therefore, we should evaluate the parameter --min_contig_size prior to running metaBAT2 and setting it to 1,500 bp for this program in line 420 of the modules.config to avoid crashes.
Command used and terminal output
$ nextflow run nf-core/mag -r 2.2.1 --input 01-resources/samplesheet.csv --outdir 04-analysis/results_emn001_plv001_rig001
--host_genome GRCh37 -profile singularity --skip_spades --binning_map_mode own --min_contig_size 1000 --gtdb 'https://data.gtdb.ecogenomic.org/releases/release202/202.0/a
uxillary_files/gtdbtk_r202_data.tar.gz' --ancient_dna
Error executing process > 'NFCORE_MAG:MAG:BINNING:METABAT2_METABAT2 (PLV001)'
Caused by:
Process `NFCORE_MAG:MAG:BINNING:METABAT2_METABAT2 (PLV001)` terminated with an error exit status (1)
Command executed:
gzip -d -f MEGAHIT-PLV001-depth.txt.gz
metabat2 \
-m 1000 --unbinned --seed 1 \
-i PLV001.fa \
-a MEGAHIT-PLV001-depth.txt \
-t 8 \
--saveCls \
-o metabat2/MEGAHIT-MetaBAT2-PLV001
mv metabat2/MEGAHIT-MetaBAT2-PLV001 MEGAHIT-MetaBAT2-PLV001.tsv
mv metabat2 bins
gzip MEGAHIT-MetaBAT2-PLV001.tsv
find ./bins/ -name "*.fa" -type f | xargs -t -n 1 bgzip -@ 8
find ./bins/ -name "*[lowDepth,tooShort,unbinned].fa.gz" -type f -exec mv {} . \;
cat <<-END_VERSIONS > versions.yml
"NFCORE_MAG:MAG:BINNING:METABAT2_METABAT2":
metabat2: $( metabat2 --help 2>&1 | head -n 2 | tail -n 1| sed 's/.*\:\([0-9]*\.[0-9]*\).*/\1/' )
END_VERSIONS
Command exit status:
1
Command output:
(empty)
Command error:
WARNING: Skipping mount /usr/local64/opt/singularity-3.7.1/var/singularity/mnt/session/etc/resolv.conf [files]: /etc/resolv.conf doesn't exist in container
[Error!] Contig length < 1500 is not allowed to be used for binning.
Relevant files
No response
System information
- Nextflow version 22.10.0
- Hardware: Desktop
- Executer: local
- Container engine: Singularity
- OS: Linux Ubuntu
- Version of nf-core/mag: 2.2.1
Yes, agreed, that should be done.