igvteam / igv-reports

Python application to generate self-contained pages embedding IGV visualizations, with no dependency on original input files.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

need ability to freeze column headers in HTML table

stevekm opened this issue · comments

If the variant table in the HTML report is very long, you lose sight of the column header labels as you scroll down, making it hard to remember which column is which. It would be great if there was a way to freeze the header row in place as you scroll, similar to the "freeze pane" feature in Excel.

This would be in the html template, which is user customizable. If you know how to do this with html you can start with our default template and modify it, or better yet submit a PR.

Specifically here. igv_reports/templates/variant_template.html. When working on the template I find it easiest to generate a small report, then edit the report, and copy any changes back manually to the template. For the default report I tried to do it without any dependencies so that a completely standalone report could be generated that wasn't too large. I would like to maintain that (no library dependencies). It should be possible to do what you suggest with just HTML, however you can have your own template that use libraries, bootstrap, whatever.

My programming languages in order of decreasing competency is something like. javascript-java, python, html. There are big dropoffs after the first 2. So any help I can get on the html is much appreciated.

I've added a template that does this. To use it you have to specify template 'variant_template-2.html' when you make the report.

For this work I had to make the table itself crollable, and for that to take effect it needs a defined height. In the template its set at 33%, of course that can be changed. Its sometimes tricky to get the table to scroll instead of the entire page, but that's the nature of the beast. To specify the template use the --template arguement, for example if run from the repository root

 --template igv_reports/templates/variant_template-2.html