Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kaiju: Error when taxon_name repeated #1540

Closed
ewalt98 opened this issue Sep 3, 2021 · 2 comments
Closed

Kaiju: Error when taxon_name repeated #1540

ewalt98 opened this issue Sep 3, 2021 · 2 comments
Labels
bug: module Bug in a MultiQC module

Comments

@ewalt98
Copy link

ewalt98 commented Sep 3, 2021

Description of bug

IndexError: list index out of range

File that triggers the error

file	percent	reads	taxon_id	taxon_name
NGS_0397_quality_analysis/20666_S4_kaiju_v.out	0.000591	1	195	Campylobacter coli
NGS_0397_quality_analysis/20666_S4_kaiju_v.out	0.000591	1	470	Acinetobacter baumannii
NGS_0397_quality_analysis/20666_S4_kaiju_v.out	98.592234	166892	10239	Viruses
NGS_0397_quality_analysis/20666_S4_kaiju_v.out	0.000591	1	0	cannot be assigned to a (non-viral) taxon_name
NGS_0397_quality_analysis/20666_S4_kaiju_v.out	1.405996	2380	0	unclassified

MultiQC Error log

/// MultiQC 🔍 | v1.11 (77d9acb)

[2021-09-03 09:44:38] multiqc                                            [DEBUG  ]  This is MultiQC v1.11 (77d9acb)
[2021-09-03 09:44:38] multiqc                                            [DEBUG  ]  No MultiQC config found: /gs1/apps/user/spack-0.16.0/spack/opt/spack/linux-centos7-sandybridge/gcc-8.3.1/miniconda3-4.8.2-cmo5v4fawfht3g6lzvuyhe4o6tu5thoz/envs/multiqc111/lib/python3.6/site-packages/multiqc_config.yaml
[2021-09-03 09:44:38] multiqc                                            [DEBUG  ]  No MultiQC config found: /gs1/home/dahlstromew/.multiqc_config.yaml
[2021-09-03 09:44:38] multiqc                                            [DEBUG  ]  No MultiQC config found: multiqc_config.yaml
[2021-09-03 09:44:38] multiqc                                            [DEBUG  ]  Command used: /gs1/apps/user/spack-0.16.0/spack/opt/spack/linux-centos7-sandybridge/gcc-8.3.1/miniconda3-4.8.2-cmo5v4fawfht3g6lzvuyhe4o6tu5thoz/envs/multiqc111/bin/multiqc -vf ./
[2021-09-03 09:44:38] multiqc                                            [DEBUG  ]  Latest MultiQC version is v1.11
[2021-09-03 09:44:38] multiqc                                            [DEBUG  ]  Command     : /gs1/apps/user/spack-0.16.0/spack/opt/spack/linux-centos7-sandybridge/gcc-8.3.1/miniconda3-4.8.2-cmo5v4fawfht3g6lzvuyhe4o6tu5thoz/envs/multiqc111/bin/multiqc -vf ./
[2021-09-03 09:44:38] multiqc                                            [DEBUG  ]  Working dir : /gs1/RTS/NextGen/SequencerRuns/miseq_2021/210831_M03210_0231_000000000-JL48L/NGS_0397_quality_analysis/test
[2021-09-03 09:44:38] multiqc                                            [DEBUG  ]  Template    : default
[2021-09-03 09:44:38] multiqc                                            [DEBUG  ]  Running Python 3.6.13 | packaged by conda-forge | (default, Feb 19 2021, 05:36:01)  [GCC 9.3.0]
[2021-09-03 09:44:38] multiqc                                            [DEBUG  ]  Analysing modules: custom_content, ccs, ngsderive, purple, conpair, lima, peddy, somalier, methylQA, mosdepth, phantompeakqualtools, qualimap, preseq, quast, qorts, rna_seqc, rockhopper, rsem, rseqc, busco, bustools, goleft_indexcov, gffcompare, disambiguate, supernova, deeptools, sargasso, verifybamid, mirtrace, happy, mirtop, sambamba, homer, hops, macs2, theta2, snpeff, gatk, htseq, bcftools, featureCounts, fgbio, dragen, dedup, damageprofiler, biobambam2, jcvi, mtnucratio, picard, vep, sentieon, prokka, qc3C, nanostat, samblaster, samtools, sexdeterrmine, eigenstratdatabasetools, bamtools, jellyfish, vcftools, longranger, stacks, varscan2, snippy, bbmap, bismark, biscuit, hicexplorer, hicup, hicpro, salmon, kallisto, slamdunk, star, hisat2, tophat, bowtie2, bowtie1, snpsplit, odgi, pangolin, kat, leehom, adapterRemoval, clipandmerge, cutadapt, flexbar, kaiju, kraken, malt, trimmomatic, sickle, skewer, sortmerna, biobloomtools, fastq_screen, afterqc, fastp, fastqc, pychopper, pycoqc, minionqc, multivcfanalyzer, clusterflow, bcl2fastq, bclconvert, interop, ivar, flash, seqyclean, optitype
[2021-09-03 09:44:38] multiqc                                            [DEBUG  ]  Using temporary directory for creating report: /tmp/tmp75_5fdsf
[2021-09-03 09:44:38] multiqc                                            [INFO   ]  Search path : /gs1/RTS/NextGen/SequencerRuns/miseq_2021/210831_M03210_0231_000000000-JL48L/NGS_0397_quality_analysis/test
|         searching | ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 2/2  
[2021-09-03 09:44:39] multiqc.plots.bargraph                             [DEBUG  ]  Using matplotlib version 3.3.4
[2021-09-03 09:44:39] multiqc.plots.linegraph                            [DEBUG  ]  Using matplotlib version 3.3.4
[2021-09-03 09:44:39] multiqc                                            [DEBUG  ]  No samples found: custom_content
[2021-09-03 09:44:39] multiqc                                            [DEBUG  ]  No samples found: ccs
[2021-09-03 09:44:39] multiqc                                            [DEBUG  ]  No samples found: ngsderive
[2021-09-03 09:44:39] multiqc                                            [DEBUG  ]  No samples found: purple
[2021-09-03 09:44:39] multiqc                                            [DEBUG  ]  No samples found: conpair
[2021-09-03 09:44:39] multiqc                                            [DEBUG  ]  No samples found: lima
[2021-09-03 09:44:39] multiqc                                            [DEBUG  ]  No samples found: peddy
[2021-09-03 09:44:39] multiqc                                            [DEBUG  ]  No samples found: somalier
[2021-09-03 09:44:39] multiqc                                            [DEBUG  ]  No samples found: methylQA
[2021-09-03 09:44:39] multiqc.modules.mosdepth.mosdepth                  [DEBUG  ]  include_contigs: []
[2021-09-03 09:44:39] multiqc.modules.mosdepth.mosdepth                  [DEBUG  ]  exclude_contigs: []
[2021-09-03 09:44:39] multiqc                                            [DEBUG  ]  No samples found: mosdepth
[2021-09-03 09:44:39] multiqc                                            [DEBUG  ]  No samples found: phantompeakqualtools
[2021-09-03 09:44:39] multiqc                                            [DEBUG  ]  No samples found: qualimap
[2021-09-03 09:44:39] multiqc                                            [DEBUG  ]  No samples found: preseq
[2021-09-03 09:44:39] multiqc                                            [DEBUG  ]  No samples found: quast
[2021-09-03 09:44:39] multiqc                                            [DEBUG  ]  No samples found: qorts
[2021-09-03 09:44:39] multiqc                                            [DEBUG  ]  No samples found: rna_seqc
[2021-09-03 09:44:39] multiqc                                            [DEBUG  ]  No samples found: rockhopper
[2021-09-03 09:44:39] multiqc                                            [DEBUG  ]  No samples found: rsem
[2021-09-03 09:44:39] multiqc                                            [DEBUG  ]  No samples found: rseqc
[2021-09-03 09:44:39] multiqc                                            [DEBUG  ]  No samples found: busco
[2021-09-03 09:44:39] multiqc                                            [DEBUG  ]  No samples found: bustools
[2021-09-03 09:44:39] multiqc                                            [DEBUG  ]  No samples found: goleft_indexcov
[2021-09-03 09:44:39] multiqc                                            [DEBUG  ]  No samples found: gffcompare
[2021-09-03 09:44:39] multiqc                                            [DEBUG  ]  No samples found: disambiguate
[2021-09-03 09:44:39] multiqc                                            [DEBUG  ]  No samples found: supernova
[2021-09-03 09:44:39] multiqc                                            [DEBUG  ]  No samples found: deeptools
[2021-09-03 09:44:39] multiqc                                            [DEBUG  ]  No samples found: sargasso
[2021-09-03 09:44:39] multiqc                                            [DEBUG  ]  No samples found: verifybamid
[2021-09-03 09:44:39] multiqc                                            [DEBUG  ]  No samples found: mirtrace
[2021-09-03 09:44:39] multiqc                                            [DEBUG  ]  No samples found: happy
[2021-09-03 09:44:39] multiqc                                            [DEBUG  ]  No samples found: mirtop
[2021-09-03 09:44:39] multiqc                                            [DEBUG  ]  No samples found: sambamba
[2021-09-03 09:44:39] multiqc                                            [DEBUG  ]  No samples found: homer
[2021-09-03 09:44:39] multiqc                                            [DEBUG  ]  No samples found: hops
[2021-09-03 09:44:39] multiqc                                            [DEBUG  ]  No samples found: macs2
[2021-09-03 09:44:39] multiqc                                            [DEBUG  ]  No samples found: theta2
[2021-09-03 09:44:39] multiqc                                            [DEBUG  ]  No samples found: snpeff
[2021-09-03 09:44:39] multiqc                                            [DEBUG  ]  No samples found: gatk
[2021-09-03 09:44:39] multiqc                                            [DEBUG  ]  No samples found: htseq
[2021-09-03 09:44:39] multiqc                                            [DEBUG  ]  No samples found: bcftools
[2021-09-03 09:44:39] multiqc                                            [DEBUG  ]  No samples found: featureCounts
[2021-09-03 09:44:39] multiqc                                            [DEBUG  ]  No samples found: fgbio
[2021-09-03 09:44:39] multiqc                                            [DEBUG  ]  No samples found: dragen
[2021-09-03 09:44:39] multiqc                                            [DEBUG  ]  No samples found: dedup
[2021-09-03 09:44:40] multiqc                                            [DEBUG  ]  No samples found: damageprofiler
[2021-09-03 09:44:40] multiqc                                            [DEBUG  ]  No samples found: biobambam2
[2021-09-03 09:44:40] multiqc                                            [DEBUG  ]  No samples found: jcvi
[2021-09-03 09:44:40] multiqc                                            [DEBUG  ]  No samples found: mtnucratio
[2021-09-03 09:44:40] multiqc                                            [DEBUG  ]  No samples found: picard
[2021-09-03 09:44:40] multiqc                                            [DEBUG  ]  No samples found: vep
[2021-09-03 09:44:40] multiqc                                            [DEBUG  ]  No samples found: sentieon
[2021-09-03 09:44:40] multiqc                                            [DEBUG  ]  No samples found: prokka
[2021-09-03 09:44:40] multiqc                                            [DEBUG  ]  No samples found: qc3C
[2021-09-03 09:44:40] multiqc                                            [DEBUG  ]  No samples found: nanostat
[2021-09-03 09:44:40] multiqc                                            [DEBUG  ]  No samples found: samblaster
[2021-09-03 09:44:40] multiqc                                            [DEBUG  ]  No samples found: samtools
[2021-09-03 09:44:40] multiqc                                            [DEBUG  ]  No samples found: sexdeterrmine
[2021-09-03 09:44:40] multiqc                                            [DEBUG  ]  No samples found: eigenstratdatabasetools
[2021-09-03 09:44:40] multiqc                                            [DEBUG  ]  No samples found: bamtools
[2021-09-03 09:44:40] multiqc                                            [DEBUG  ]  No samples found: jellyfish
[2021-09-03 09:44:40] multiqc                                            [DEBUG  ]  No samples found: vcftools
[2021-09-03 09:44:40] multiqc                                            [DEBUG  ]  No samples found: longranger
[2021-09-03 09:44:40] multiqc                                            [DEBUG  ]  No samples found: stacks
[2021-09-03 09:44:40] multiqc                                            [DEBUG  ]  No samples found: varscan2
[2021-09-03 09:44:40] multiqc                                            [DEBUG  ]  No samples found: snippy
[2021-09-03 09:44:40] multiqc                                            [DEBUG  ]  No samples found: bbmap
[2021-09-03 09:44:40] multiqc                                            [DEBUG  ]  No samples found: bismark
[2021-09-03 09:44:40] multiqc                                            [DEBUG  ]  No samples found: biscuit
[2021-09-03 09:44:40] multiqc                                            [DEBUG  ]  No samples found: hicexplorer
[2021-09-03 09:44:40] multiqc                                            [DEBUG  ]  No samples found: hicup
[2021-09-03 09:44:40] multiqc                                            [DEBUG  ]  No samples found: hicpro
[2021-09-03 09:44:40] multiqc                                            [DEBUG  ]  No samples found: salmon
[2021-09-03 09:44:40] multiqc                                            [DEBUG  ]  No samples found: kallisto
[2021-09-03 09:44:40] multiqc                                            [DEBUG  ]  No samples found: slamdunk
[2021-09-03 09:44:40] multiqc                                            [DEBUG  ]  No samples found: star
[2021-09-03 09:44:40] multiqc                                            [DEBUG  ]  No samples found: hisat2
[2021-09-03 09:44:40] multiqc                                            [DEBUG  ]  No samples found: tophat
[2021-09-03 09:44:40] multiqc                                            [DEBUG  ]  No samples found: bowtie2
[2021-09-03 09:44:40] multiqc                                            [DEBUG  ]  No samples found: bowtie1
[2021-09-03 09:44:40] multiqc                                            [DEBUG  ]  No samples found: snpsplit
[2021-09-03 09:44:40] multiqc                                            [DEBUG  ]  No samples found: odgi
[2021-09-03 09:44:40] multiqc                                            [DEBUG  ]  No samples found: pangolin
[2021-09-03 09:44:40] multiqc                                            [DEBUG  ]  No samples found: kat
[2021-09-03 09:44:40] multiqc                                            [DEBUG  ]  No samples found: leehom
[2021-09-03 09:44:40] multiqc                                            [DEBUG  ]  No samples found: adapterRemoval
[2021-09-03 09:44:40] multiqc                                            [DEBUG  ]  No samples found: clipandmerge
[2021-09-03 09:44:40] multiqc                                            [DEBUG  ]  No samples found: cutadapt
[2021-09-03 09:44:40] multiqc                                            [DEBUG  ]  No samples found: flexbar
[2021-09-03 09:44:40] multiqc.modules.kaiju.kaiju                        [DEBUG  ]  Duplicate sample found in logs at taxon_name rank! Overwriting sample: 20666_S4_kaiju_v
[2021-09-03 09:44:40] multiqc.modules.kaiju.kaiju                        [INFO   ]  Found 1 reports
╭─────────────────────────────────────────────────────────────────────────────────────────── Oops! The 'kaiju' MultiQC module broke... ────────────────────────────────────────────────────────────────────────────────────────────╮
│ Please copy this log and report it at https://github.com/ewels/MultiQC/issues                                                                                                                                                    │
│ Please attach a file that triggers the error. The last file found was: ./20666_S4_kaiju_v.out_phylum.txt                                                                                                                         │
│                                                                                                                                                                                                                                  │
│ Traceback (most recent call last):                                                                                                                                                                                               │
│   File "/gs1/apps/user/spack-0.16.0/spack/opt/spack/linux-centos7-sandybridge/gcc-8.3.1/miniconda3-4.8.2-cmo5v4fawfht3g6lzvuyhe4o6tu5thoz/envs/multiqc111/lib/python3.6/site-packages/multiqc/multiqc.py", line 624, in run      │
│     output = mod()                                                                                                                                                                                                               │
│   File "/gs1/apps/user/spack-0.16.0/spack/opt/spack/linux-centos7-sandybridge/gcc-8.3.1/miniconda3-4.8.2-cmo5v4fawfht3g6lzvuyhe4o6tu5thoz/envs/multiqc111/lib/python3.6/site-packages/multiqc/modules/kaiju/kaiju.py", line 75,  │
│     self.top_five_barplot()                                                                                                                                                                                                      │
│   File "/gs1/apps/user/spack-0.16.0/spack/opt/spack/linux-centos7-sandybridge/gcc-8.3.1/miniconda3-4.8.2-cmo5v4fawfht3g6lzvuyhe4o6tu5thoz/envs/multiqc111/lib/python3.6/site-packages/multiqc/modules/kaiju/kaiju.py", line 288, │
│     plot=bargraph.plot(pd, cats, pconfig),                                                                                                                                                                                       │
│   File "/gs1/apps/user/spack-0.16.0/spack/opt/spack/linux-centos7-sandybridge/gcc-8.3.1/miniconda3-4.8.2-cmo5v4fawfht3g6lzvuyhe4o6tu5thoz/envs/multiqc111/lib/python3.6/site-packages/multiqc/plots/bargraph.py", line 104, in p │
│     if type(cats[0]) is str or type(cats[0]) is unicode:                                                                                                                                                                         │
│ IndexError: list index out of range                                                                                                                                                                                              │
│                                                                                                                                                                                                                                  │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
[2021-09-03 09:44:40] multiqc                                            [DEBUG  ]  Oops! The 'kaiju' MultiQC module broke...
================================================================================
Traceback (most recent call last):
  File "/gs1/apps/user/spack-0.16.0/spack/opt/spack/linux-centos7-sandybridge/gcc-8.3.1/miniconda3-4.8.2-cmo5v4fawfht3g6lzvuyhe4o6tu5thoz/envs/multiqc111/lib/python3.6/site-packages/multiqc/multiqc.py", line 624, in run
    output = mod()
  File "/gs1/apps/user/spack-0.16.0/spack/opt/spack/linux-centos7-sandybridge/gcc-8.3.1/miniconda3-4.8.2-cmo5v4fawfht3g6lzvuyhe4o6tu5thoz/envs/multiqc111/lib/python3.6/site-packages/multiqc/modules/kaiju/kaiju.py", line 75, in __init__
    self.top_five_barplot()
  File "/gs1/apps/user/spack-0.16.0/spack/opt/spack/linux-centos7-sandybridge/gcc-8.3.1/miniconda3-4.8.2-cmo5v4fawfht3g6lzvuyhe4o6tu5thoz/envs/multiqc111/lib/python3.6/site-packages/multiqc/modules/kaiju/kaiju.py", line 288, in top_five_barplot
    plot=bargraph.plot(pd, cats, pconfig),
  File "/gs1/apps/user/spack-0.16.0/spack/opt/spack/linux-centos7-sandybridge/gcc-8.3.1/miniconda3-4.8.2-cmo5v4fawfht3g6lzvuyhe4o6tu5thoz/envs/multiqc111/lib/python3.6/site-packages/multiqc/plots/bargraph.py", line 104, in plot
    if type(cats[0]) is str or type(cats[0]) is unicode:
IndexError: list index out of range
================================================================================
[2021-09-03 09:44:40] multiqc                                            [DEBUG  ]  No samples found: kraken
[2021-09-03 09:44:40] multiqc                                            [DEBUG  ]  No samples found: malt
[2021-09-03 09:44:40] multiqc                                            [DEBUG  ]  No samples found: trimmomatic
[2021-09-03 09:44:40] multiqc                                            [DEBUG  ]  No samples found: sickle
[2021-09-03 09:44:40] multiqc                                            [DEBUG  ]  No samples found: skewer
[2021-09-03 09:44:40] multiqc                                            [DEBUG  ]  No samples found: sortmerna
[2021-09-03 09:44:40] multiqc                                            [DEBUG  ]  No samples found: biobloomtools
[2021-09-03 09:44:40] multiqc                                            [DEBUG  ]  No samples found: fastq_screen
[2021-09-03 09:44:40] multiqc                                            [DEBUG  ]  No samples found: afterqc
[2021-09-03 09:44:40] multiqc                                            [DEBUG  ]  No samples found: fastp
[2021-09-03 09:44:40] multiqc                                            [DEBUG  ]  No samples found: fastqc
[2021-09-03 09:44:40] multiqc                                            [DEBUG  ]  No samples found: pychopper
[2021-09-03 09:44:40] multiqc                                            [DEBUG  ]  No samples found: pycoqc
[2021-09-03 09:44:40] multiqc                                            [DEBUG  ]  No samples found: minionqc
[2021-09-03 09:44:40] multiqc                                            [DEBUG  ]  No samples found: multivcfanalyzer
[2021-09-03 09:44:40] multiqc                                            [DEBUG  ]  No samples found: clusterflow
[2021-09-03 09:44:40] multiqc                                            [DEBUG  ]  No samples found: bcl2fastq
[2021-09-03 09:44:40] multiqc                                            [DEBUG  ]  No samples found: bclconvert
[2021-09-03 09:44:40] multiqc                                            [DEBUG  ]  No samples found: interop
[2021-09-03 09:44:40] multiqc                                            [DEBUG  ]  No samples found: ivar
[2021-09-03 09:44:40] multiqc                                            [DEBUG  ]  No samples found: flash
[2021-09-03 09:44:40] multiqc                                            [DEBUG  ]  No samples found: seqyclean
[2021-09-03 09:44:40] multiqc                                            [DEBUG  ]  No samples found: optitype
[2021-09-03 09:44:40] multiqc                                            [WARNING]  No analysis results found. Cleaning up..
[2021-09-03 09:44:40] multiqc                                            [INFO   ]  MultiQC complete
@ewalt98
Copy link
Author

ewalt98 commented Sep 3, 2021

I was able to figure out the issue.
The input file has the word taxon_name in multiple locations, not just the first row.
I had been looking for a formatting issue in the first row, not any other as I thought the Kaiju module search pattern would find just the first row?

@ewels ewels added the bug: module Bug in a MultiQC module label Nov 9, 2021
@ewels ewels changed the title Oops! The 'kaiju' MultiQC module broke... Kaiju: Error when taxon_name repeated Nov 9, 2021
ewels added a commit to MultiQC/test-data that referenced this issue Jan 7, 2023
@ewels ewels closed this as completed in 5ddb3d5 Jan 7, 2023
@ewels
Copy link
Member

ewels commented Jan 7, 2023

Many thanks @ewalt98 ! It looks like the error was coming from the core MultiQC plotting code, triggered because it was given an empty plot (in a fairly specific way). I've updated the code to catch the error and also not bother trying to create the plot from the module in the first place if there isn't enough data.

Thanks for reporting :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug: module Bug in a MultiQC module
Projects
None yet
Development

No branches or pull requests

2 participants