Improve plotting code - robustness, unification, remove code repetition#574
Improve plotting code - robustness, unification, remove code repetition#574keiran-rowell-unsw wants to merge 43 commits intonf-core:devfrom
Conversation
…dles this more robusts on a per-program basis, can be source of truth
…e of plotly saving from the actual report
…meta.mode to each output
…Channel to simpligy everything
|
Warning Newer version of the nf-core template is available. Your pipeline is using an old version of the nf-core template: 3.5.1. For more documentation on how to update your pipeline, please see the nf-core documentation and Synchronisation documentation. |
| z=pae, | ||
| colorscale="Greens_r", | ||
| zmin=0, | ||
| zmax=max_pae, |
There was a problem hiding this comment.
This should be fixed (at 30) as it is on the main branch to give a consistent and interpretable color scale.
There was a problem hiding this comment.
Good catch, I'll fix (at 31.75?). I also need to fix up the space given to the plots.
I'm also updating the sequence coverage plot.
The main thing I'm doing is clearing the pipeline logic, I'll switch out of draft when done testing
There was a problem hiding this comment.
Overall looks to be a nice clean-up! But I think it must forked from an old version because I noticed a few things like this that I have fixed in main which would get un-fixed here. It is already in draft but just flagging a few things that I noticed.
There was a problem hiding this comment.
Yep it was forked from a refactor from v1.1!
Thanks for spotting those ones, I was re-planting old code from refactor before v2.0 fixes, I'll get it more complete in a short while.
| requested_modes_size | ||
| ch_report_input | ||
| ch_report_template | ||
| ch_comparison_template |
There was a problem hiding this comment.
I am not sure of nf-core philosophy but my gut feel is that it is better to be explicit about dependencies rather than relying on globals within the subworkflow?

Plotting refactor, drops duplicate files, ~300 lines of repetition beyond files, and reads more cleanly.
Implements #484, closes #485, and inches towards #373.
Will verify this implements #363
generate_report.py, onereport_template.html, all plotting logic inplot_utils.py; conceptually separates out the process constructing a report from plotting functions that use plain.tsvssort_structures_by_rank()utility inplot_utils.pyto provide a place for program-specific ranking rather than use amatcher =~with regex in the.nfpipeline.Each program sorting logic can be expanded upon in the util.
report_template.htmlnow cleanerplotlyobjects, no need to write-our and read-in.pngfiles, users can save from the HTML report from plotly toolbar if they want topost_processing.nfmassively simplified due to removing program-specific exceptionsmodeChannel()used consistently, cleaning many lines of adding in modech_multiqcnow cleared, was previously used to pass alongplddtwhich is now simply extracted from structures withbiopython, and makes way for a bulk folding report in Bulk MultiQC reporting as a pipeline-installed Python module #450.npmCDN.rawgitsunsetted in 2019TODO:
.pngTESTING:
modesor validated comparison reports fullyPR checklist
CHANGELOG.mdis updated.