Skip to content

Improve plotting code - robustness, unification, remove code repetition - #46

Draft
keiran-rowell-unsw wants to merge 43 commits into
devfrom
improve_plotting
Draft

keiran-rowell-unsw wants to merge 43 commits into
devfrom
improve_plotting

Conversation

@keiran-rowell-unsw

Copy link
Copy Markdown
Member

Plotting refactor, drops duplicate files, ~300 lines of repetition beyond files, and reads more cleanly.
Implements nf-core#484, closes nf-core#485, and inches towards nf-core#373.
Will verify this implements nf-core#363

  • HTML report now drops sections where the metric isn't available ( e.g. ESMFold)
  • One generate_report.py, one report_template.html, all plotting logic in plot_utils.py; conceptually separates out the process constructing a report from plotting functions that use plain .tsvs
  • Uses a sort_structures_by_rank() utility in plot_utils.py to provide a place for program-specific ranking rather than use a matcher =~ with regex in the .nf pipeline.
  • Each program sorting logic can be expanded upon in the util.
  • Injection of content in report_template.html now cleaner
  • Everything as plotly objects, no need to write-our and read-in .png files, users can save from the HTML report from plotly toolbar if they want to
  • post_processing.nf massively simplified due to removing program-specific exceptions
  • modeChannel() used consistently, cleaning many lines of adding in mode
  • ch_multiqc now cleared, was previously used to pass along plddt which is now simply extracted from structures with biopython, and makes way for a bulk folding report in Bulk MultiQC reporting as a pipeline-installed Python module nf-core/proteinfold#450.
  • Switches to unpkg.com as a more robust and up-to-date npm CDN. rawgit sunsetted in 2019

TODO:

  • Make a plotly sequence coverage object look as nice as the prior .png

TESTING:

  • In draft mode currently because I haven't run on all modes or validated comparison reports fully

…dles this more robusts on a per-program basis, can be source of truth
@keiran-rowell-unsw keiran-rowell-unsw changed the title mprove plotting code - robustness, unification, remove code repetition Improve plotting code - robustness, unification, remove code repetition Sep 9, 2026
@keiran-rowell-unsw
keiran-rowell-unsw changed the base branch from master to dev September 9, 2026 06:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rename multiqc output channel to plddt across all modules

1 participant