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

New feature request: Conditional formatting for whole tables #761

Closed
RoxaneLS opened this issue May 16, 2018 · 7 comments
Closed

New feature request: Conditional formatting for whole tables #761

RoxaneLS opened this issue May 16, 2018 · 7 comments
Milestone

Comments

@RoxaneLS
Copy link

RoxaneLS commented May 16, 2018

Hi Phil,
as discussed on Gitter, just requesting a new feature to allow for conditional formatting at the table level (instead of per-column).

More specifically, I would like to have all values greater than X in my custom table highlighted in red (which I can do per-column using the table_cond_formatting_rules in the config file). However in my use case, the column names will be different for every new run, so I can't use that.

From our chat:

Phil:
Conditional formatting for whole table - I don’t think that this is possible currently.. Will need to add it as a new feature.
Should be doable - just need a special case “column name” (eg. all_columns)

Thanks a lot in advance!
Roxane

@ewels
Copy link
Member

ewels commented May 20, 2018

I did it again! Suggested a feature that I have already written. And even with exactly the same config name 🤣 At least I'm consistent!

This feature already exists - just specify all_columns instead of a column key. See the docs: http://multiqc.info/docs/#conditional-formatting

Rules can be applied to every table column, or to specific columns only, using that column's unique ID.
To have matches for a specific column, use that column's ID instead of all_columns.

@ewels ewels closed this as completed May 20, 2018
@RoxaneLS
Copy link
Author

RoxaneLS commented May 21, 2018

ahah Ok, so yes sorry I should have clarified. I did see that, but then it applies the formatting to ALL columns in the report - which is not good either. I need to be able to specify all_columns in that_table.

table_cond_formatting_rules:
    all_columns:
        pass:
            - s_eq: 'pass'
            - s_eq: 'true'
        warn:
            - s_eq: 'warn'
            - s_eq: 'unknown'
        fail:
            - s_eq: 'fail'
            - s_eq: 'false'

For instance, I'd need something like that:

table_cond_formatting_rules:
    *my_table_X*:
        all_columns:
            pass:
                - lt: 0.5
            warn:
                 - gt: 6
             fail:
                 - gt: 8

@ewels ewels reopened this May 21, 2018
@ewels
Copy link
Member

ewels commented May 21, 2018

Thanks for the clarification! I’ll take a look. Should be possible to specify just the table ID - they should be unique so MultiQC can check the column IDs first then the table IDs I think..

@RoxaneLS
Copy link
Author

RoxaneLS commented May 21, 2018 via email

@ewels ewels added this to the MultiQC v1.9 milestone Nov 13, 2019
@ewels ewels modified the milestones: MultiQC v1.9, MultiQC v1.10 May 29, 2020
@ewels ewels closed this as completed in 575f39a Nov 10, 2021
@ewels
Copy link
Member

ewels commented Nov 10, 2021

@RoxaneLS it's finally done! Sorry that it took... 3 years, 5 months and 25 days!!

What's worse is that in the end it only took a few keystrokes: , table_id 😆

Hopefully it'll still be useful, and thanks @ErikDanielsson for taking a look at this even though I didn't use your PR.

@ewels
Copy link
Member

ewels commented Nov 10, 2021

@RoxaneLS
Copy link
Author

RoxaneLS commented Nov 11, 2021 via email

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

Successfully merging a pull request may close this issue.

2 participants