MultiQC / MultiQC

Aggregate results from bioinformatics analyses across many samples into a single report.
http://multiqc.info
GNU General Public License v3.0
1.2k stars 597 forks source link

v1.25: `ColumnMeta` object has no field `group` #2870

Open luisas opened 3 days ago

luisas commented 3 days ago

Description of bug

Since I upgraded to v1.25 (from 1.24.1) i get the following error I was not getting before:

  "ColumnMeta" object has no field "group" (full error log below).

Downgrading again solves the issue.

Thank you! :)

File that triggers the error

shiny_data_with_trace.csv

MultiQC config here.

MultiQC Error log

/// MultiQC 🔍 v1.25

              config | Loading config settings from: multiqc_config.yml
         file_search | Search path: /nfs/users/cn/lsantus/projects/luisamsa/multiplesequencealign/work/f4/802f18d14e5d1f1842f46b61353252
         file_search | Only using modules: custom_content

  ╭───────────── Oops! The 'custom_content' MultiQC module broke... ─────────────╮
  │ Please copy this log and report it at                                        │
  │ https://github.com/MultiQC/MultiQC/issues                                    │
  │ Please attach a file that triggers the error. The last file found was:       │
  │ 3/summary_stats_eval_multiqc_table.csv                                       │
  │                                                                              │
  │ Traceback (most recent call last):                                           │
  │   File "/usr/local/lib/python3.12/site-packages/multiqc/core/exec_modules.py │
  │     these_modules: Union[BaseMultiqcModule, List[BaseMultiqcModule]] = modul │
  │                                                                        ^^^^^ │
  │   File "/usr/local/lib/python3.12/site-packages/multiqc/modules/custom_conte │
  │     parsed_modules[mod_id].add_cc_section(section_id, section_anchor=section │
  │   File "/usr/local/lib/python3.12/site-packages/multiqc/modules/custom_conte │
  │     plot = table.plot(plot_datasets, headers=headers, pconfig=pconfig)       │
  │            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^       │
  │   File "/usr/local/lib/python3.12/site-packages/multiqc/plots/table.py", lin │
  │     dt = table_object.DataTable.create(                                      │
  │          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                      │
  │   File "/usr/local/lib/python3.12/site-packages/multiqc/plots/table_object.p │
  │     column_by_key[col_key] = ColumnMeta.create(                              │
  │                              ^^^^^^^^^^^^^^^^^^                              │
  │   File "/usr/local/lib/python3.12/site-packages/multiqc/plots/table_object.p │
  │     setattr(col, custom_k, custom_v)                                         │
  │   File "/usr/local/lib/python3.12/site-packages/pydantic/main.py", line 881, │
  │     raise ValueError(f'"{self.__class__.__name__}" object has no field "{nam │
  │ ValueError: "ColumnMeta" object has no field "group"                         │
  │                                                                              │
  ╰──────────────────────────────────────────────────────────────────────────────╯
             multiqc | No analysis results found. Cleaning up…

Before submitting

vladsavelyev commented 8 hours ago

The table config contains unrecognized field group:

custom_table_header_config:
  summary_stats:
    perc_sim:
      description: "Average percentage similarity between all sequences in the input fasta file."
      group: "Fasta"
      max: 100
      format: "{:,.2f}"
      suffix: "%"
    fasta:
      description: "Input fasta file."
      hidden: False
      group: "Fasta"

Making Pydantic fail validation. I added a more lenient config processing so it just ignores this field instead: https://github.com/MultiQC/MultiQC/pull/2875 It should work now.

Note that instead of group, there is a field called namespace, that would work probably the same way as intended for this one:

...
    fasta:
      description: "Input fasta file."
      hidden: False
      namespace: "Fasta"
...