Skip to content

Merge/security hardening to main#33

Open
prmunday wants to merge 330 commits into
mainfrom
merge/security-hardening-to-main
Open

Merge/security hardening to main#33
prmunday wants to merge 330 commits into
mainfrom
merge/security-hardening-to-main

Conversation

@prmunday

Copy link
Copy Markdown
Collaborator

No description provided.

prmunday added 28 commits May 14, 2026 10:49
Hardcoded immunolyser.erc.monash.edu replaced with BASE_URL config
so the same codebase works on test and production instances.
utils.py stored only basenames for bar plots and logos; the template
then constructed paths without the PID subdirectory added by 2.0f.
Now store paths relative to app/static/ so the PID dir is included,
and simplify template to use those paths directly via url_for.
Also updated findNumberOfPeptidesInCore cores glob to use PID wildcard.
…alls

All three tools silently fail if the output directory doesn't exist.
Added os.makedirs(exist_ok=True) before each call.
…cess

MixMHCpred is a bash script that calls python3 directly. When invoked
from Celery (which has no lenv/bin in PATH), python3 resolves to the
system Python which lacks numpy/pandas/scipy/logomaker. The fix passes
the virtualenv bin directory as PATH prefix so the correct python3 is used.
Add csv_map to export route: reads each binder CSV and encodes as
data:text/csv URI. Export template now renders a download table
for majority-voted binders with embedded href data URIs so the
file works fully offline without server access.
…export

predicted_binders uses predictor objects (not short_name strings) as keys,
so the binders_data build loop was silently missing all data. Now iterates
actual dict keys and maps to short_name for the JS BINDERS_DATA structure.

Also adds getGibbsImagesAll() which pre-computes all cluster counts (1-6
plus best KLD) for the offline export. The export Gibbs section now has a
dropdown matching the analytics page — selecting a cluster count shows/hides
the pre-embedded images without any server call.
Majority voted binders (tool key '') were never added to BINDERS_DATA so
the UpSet showed 'No data' on load. Now reads Majority_Voted CSVs with
presence/absence values (1.0) so the overlap UpSet renders correctly.

Violin div is now explicitly hidden at the start of every renderBindersUpset
call, so switching back to majority voted (or any tool with no violin data)
clears the plot from the previous selection.

Also refactored the per-allele binder CSV reading into two helper closures
to reduce duplication.
Majority voted: empty elems array was stored as a truthy key, causing UpSetJS
to render with zero sets (NaN transforms). Now guard against empty data in
both Python (skip '' key if no binders found) and JS (check .some(s =>
s.elems.length > 0) before rendering).

Violin: UpSetJS extractCombinations may not preserve custom fields on returned
combo.elems. Use seqMap[p.name] lookup instead of p.values to get binding
values. Also show the violin div before calling Plotly.newPlot so the
container has correct dimensions at render time.

Removed duplicate 'combinations' key from UpSet props (config object was
overwriting the extracted combinations; only the config is needed for render).
- Flask 1.1.2 -> 3.0.3, Werkzeug 1.0.1 -> 3.0.3, Jinja2 2.11.3 -> 3.1.4
- MarkupSafe 2.0.1 -> 2.1.5, itsdangerous 2.0.1 -> 2.1.2
- Remove flask-restplus (abandoned, api object was unused)
- Remove Flask-WTF and WTForms (forms.py is never imported)
Majority Voted CSVs have no 'Binding Level' column (per-tool columns are
renamed to {tool}_Binding Level during the merge), so _read_binder_csv was
failing silently and returning empty binders. Now detects 'Is Majority Voted
Binder' column and filters to Y rows directly.

Violin used plotly-basic.min.js which does not include violin chart support.
Replaced with plotly-cartesian.min.js (same version, adds violin/box).
@prmunday prmunday requested a review from chenli-bioinfo May 19, 2026 23:21
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.

2 participants