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

Option to hide rows by default in General Statistics table #541

Closed
ewels opened this issue Aug 7, 2017 · 3 comments
Closed

Option to hide rows by default in General Statistics table #541

ewels opened this issue Aug 7, 2017 · 3 comments

Comments

@ewels
Copy link
Member

ewels commented Aug 7, 2017

A classic problem in MultiQC is rows in the General Statistics table that have sample name variants, resulting in partial rows that don't line up properly - eg. sample_name, sample_name_R1, sample_name_R2 being split across three lines.

I typically recommend that sample names have the _R1 and _R2 suffixes removed, but then these results are completely absent from the report, including in the plots below.

Instead, it could be nice to have a new option to hide rows in tables by default. These could be shown with a button above the table. It would need an option to limit this to a specific table ID (eg. only General Stats). Also have string and regex matches (we only have to match here).

This gets us to the better state of having all samples in the report, and _R2 hidden in General Stats by default. We still need to truncate _R1 from sample names to get those ones to line up with the main sample basename, but I think this is still an improvement. This may be good enough to add to the MultiQC default config too...

@ewels
Copy link
Member Author

ewels commented Aug 8, 2017

After sleeping on this idea, I think it's overly complicated. Instead, add configurable options to merge stats for modules that commonly have two outputs for PE data. eg. In the FastQC module code, merge General Statistics stats for _R1 and _R2. Needs to be done per-module and per-statistic.

@ewels ewels closed this as completed Aug 8, 2017
@pancheto
Copy link

pancheto commented Sep 13, 2018

I've came across a solution that could work for me and maybe for some others, although it's not working properly right now. let me know if you'd like me to open a proper issue with it of if you'd prefer to reopen this one.

what I have

starting from fastq files and ending up with bam and vcf files, one ends up too with fastq associated reports and also with bam and vcf associated reports. the first ones are listed in General Statistics table with suffixes (_L00\d_R\d_001 typically), and the last ones are listed without them. e.g., as you well said, a first sample_name line and subsequent sample_name lines per lane and direction.

what I thought

what happens if I hide all fastq related columns from the General Statistics table by default through the multiqc_config.yaml file? the data would be still there, but only the main sample lines with whole sample information would be visible, and the rest of columns would be accessible on demand through the Configure Columns button.

what I found out

if you hide all fastq related columns from the General Statistics table by default the fastq related empty rows keep being displayed by default, although single a touch on any checkbox in the Configure Columns section updates these columns to be displayed only if a fastq related column is selected, or to be hidden otherwise.

what I request

I know that this behaviour is not the same thing as merging fastq data into main sample data as this issue started, which would be much more complicated indeed, but being able to hide already empty rows by default could be enough for most of us. also, being able to hide all columns from a section instead of having to write down all columns' ids in the configuration file would be a great plus.

current example

table_columns_visible:
  fastp:
    pct_duplication: False
    after_filtering_q30_rate: False
    after_filtering_q30_bases: False
    after_filtering_gc_content: False
    pct_surviving: False
    pct_adapter: False
  FastQC:
    percent_duplicates: False
    percent_gc: False
    avg_sequence_length: False
    percent_fails: False
    total_sequences: False

desired example

table_columns_visible:
  fastp: False
  FastQC: False

@ewels
Copy link
Member Author

ewels commented Nov 13, 2019

Hi @pancheto,

It took me over a year, but I finally implemented your request! 🎉

This now works:

table_columns_visible:
  FastQC: False

Updated docs: https://multiqc.info/docs/#hiding-columns

Let me know if you find any problems, and thanks for the suggestion 👍

Phil

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants