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

Columns ordering & hiding from custom content not working #841

Closed
RoxaneLS opened this issue Oct 5, 2018 · 4 comments
Closed

Columns ordering & hiding from custom content not working #841

RoxaneLS opened this issue Oct 5, 2018 · 4 comments
Labels
bug: core Bug in the main MultiQC code

Comments

@RoxaneLS
Copy link

RoxaneLS commented Oct 5, 2018

Description of bug:
Hi Phil, I'm having problems with ordering and hiding columns form my custom content tables.

  • Command used to run MultiQC:
    multiqc . -f -o . -n multiqc_test -c ./multiqc_config.test.yaml 
    
  • MultiQC Version: MultiQC v1.6
  • Operating System: on linux
  • Python Version: Python 2.7.5 (default, Jul 13 2018, 13:06:57)
    [GCC 4.8.5 20150623 (Red Hat 4.8.5-28)] on linux2
  • Method of MultiQC installation: pip I think

Additional context
See input & output files and config file attached.

for Phil.zip

@ewels ewels added the bug: core Bug in the main MultiQC code label Oct 8, 2018
@RoxaneLS
Copy link
Author

RoxaneLS commented Oct 9, 2018

Hi Phil, do you think that's gonna be an easy fix?

@RoxaneLS
Copy link
Author

RoxaneLS commented Oct 10, 2018

Ok, solved it. I was using the table_columns_placement section in my config file, but that actually only works for columns in the General Stats table.

To order or hide columns in custom made tables, one needs to use the headers sub-section in the custom_data section. It all makes sense now! :)

e.g.

Clusters Passing Filter:
   description: 'Clsuter passing filter (from bcl2fastq)'
   format: '{:,.2f}'
   group: sequencing_stats
   placement: 900
   hidden: True

@ewels
Copy link
Member

ewels commented Oct 20, 2018

Hi @RoxaneLS,

Glad you got it working. I'm a little confused though - table_columns_placement should work for any table I think, the code is in the main table object which is used for all tables. The headers config is the usual way to do it though if you're building a table, as you found. table_columns_placement is more for customising existing tables, where the headers config is already hardcoded in MultiQC.

Phil

@ewels ewels closed this as completed in ce02fcd Oct 20, 2018
@ewels
Copy link
Member

ewels commented Oct 20, 2018

Hi @RoxaneLS,

I figured it out. The table_columns_placement config uses the table column Namespace, not the Table ID as you were using. In your table, namespace wasn't set, so you couldn't access those columns.

I've updated the code to look for namespace first and then table ID, so your example code does now work as expected. I've also added a little to the docs explaining this.

Cheers,

Phil

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

No branches or pull requests

2 participants