I want the table given by get_module_data to be the same as whatâs given internally to MultiQC when itâs putting the table in the report. The ToL ID is lost on the same table.
custom_data:
dtol:
file_format: "tsv"
section_name: "DToL"
description: "Darwin Tree of Life identifier and related meta data."
plot_type: "table"
sp: # Search pattern
dtol:
fn: "DToL.tsv"
When the MultiQC report displays it, it displays with the âToL IDâ header, but itâs not possible it seems in a notebook to get the exact same table.
I feel like the issue is the same with the plots as well. Even though you can display plots in a notebook, theyâre not as feature rich as you get in the MultiQC html.
Iâm not entirely sure why get_plot() isnât returning the table with this config though, if it is ending up in the report. I guess there is some order of logic somewhere thatâs being lostâŚ
Tables in notebooks are different from plots because they are not rendered with Plotly, but rather we just wrap data in a Pandas DataFrame object and return it to the cell, so the notebook would display it with itâs intefrated widget. This, there is not going to be any of the HTML-verion rich functionality there, for now.
However, the col1 header should be possible to display as you are pointing out, so I added that in this PR:
So, setting the config in the yaml didnât help for the notebook case. It works for the normal multiqc report, but the pandas DataFrame object remains the same.
Hopefully Vladâs PR fixes that though.
Itâs also a shame we donât get the same HTML version rich functionality there. What was the decision behind that?
MultiQC tables use a bunch of custom javascript, which is why we didnât package it up in the same way. In contrast, Plotly plots are generally well supported natively by notebook environments.
You can try using MultiQC tables yourself if you want, the function is multiqc.plot.table() - but itâs likely that we need to pull some extra magic to somehow inject in the custom CSS and JavaScript for them to function properly.
Feel free to open an issue for this on the MultiQC repo if itâs something youâd like to see.