Adding supported tool table columns to generalstats table

Hi,

I’m currently having trouble trying to add the NanoStat legacy table output (nanostat_aligned_stats_table) to the generalstats table using multiqc v1.19. I’ve looked around a fair bit and can’t seem to find a solution at the moment. Is this possible and I’ve missed how somewhere or am I better writing a custom module to pull out the data that I want?

Thanks a ton!

Hi @DarianHole,

You can find docs about the NanoStat module here and example NanoStat data that we use for testing (which should work) here, in case that helps.

It’s a bit tough to help beyond that with what you’ve written. Could you please provide a bit more detail about what the trouble is? Are you able to attach some files please?

Cheers,

Phil

Hi Phil,

Thanks for the help! I’ve gotten around my issue by creating a CSV file of the data I want to add to the General Statistics table and using a custom section to add it but I feel like I’ve missed the better way to do this with the existing config options.

For the data (it seems I can’t upload a zip file of it here so I’ll just give the relevant parts), in the multiqc output file the FastP output is in the General Statistics table but the nanostats output is not:


I didn’t really see a way to change the nanostats output table to include it in the general stats section (I was thinking that maybe using the custom_plot_config: section would work but it didn’t seem to). And then here is my basic config:

# Top of the page info
title: "MultiQC Report"
subtitle: "Overall run summary statistics and plots"
show_analysis_paths: False

data_format: "yaml"
max_table_rows: 10000

# General Statistics Table
# Visible columns
table_columns_visible:
  Fastp - Read Processsing:
    pct_duplication: False
    after_filtering_gc_content: False

# Modules/tools supported that we only want to grab
run_modules:
  - fastp
  - nanostat

# Order of supported tools
module_order:
  - fastp:
      name: "Fastp - Read Processsing"
      path_filters:
        - "./fastp/*.fastp.json"
  - nanostat:
      name: NanoStat BAM Statistics
      path_filters:
        - "./nanostat/*nanostat.txt"

# Extensions to clean from names
extra_fn_clean_exts:
  - '.nanostat'
  - '.processed'

Thanks again!
Darian

You can’t do this without modifying the MultiQC source code. Given the nature of this module, it could be interesting to add a module-specific config option to allow users to choose specific columns to end up in the General Stats table though, rather than having none there at all as is done currently. Feel free to open an issue on the MultiQC repo about adding this :+1: (or a PR of course).

For now, using Custom Content as you are doing is probably the easiest and fastest way to get the end result you’re looking for.

Thanks for pointing this out - I’ve just greatly expanded the list of allowed file extensions for uploads so should be easier in the future.