Development branch to be merged to master#14
Development branch to be merged to master#14JavierSanchez-Utges wants to merge 16 commits intomasterfrom
Conversation
…eraction cylinders. Removed centering and zooming in so the same orientation is kept when swapping between superposition and assemblies
…ing protein atoms representative chain for Q8XXK6_1
…ies and superposition views
…oning between assemblies and superposition views
… between assemblies and superposition views
There was a problem hiding this comment.
Pull Request Overview
This PR merges the development branch into master, adding support for reading and transforming mmCIF assembly files and improving view persistence across superposition and assembly modes, as well as updating citations across templates and documentation.
- Added functions to parse custom matrix files and transform coordinate data for assemblies
- Updated 3DMol JS toggling logic to preserve styling for clicked residues
- Revised citation entries in HTML templates and README
Reviewed Changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| templates/index.html, help.html, contact.html, about.html | Updated citation text and DOIs for new publications |
| static/js/charts.js | Cleared chart dataset labels and updated tooltips |
| static/js/chart_listeners.js | Removed stray whitespace |
| static/js/USER_3DMol_toggle_surfs.js / 3DMol_toggle_surfs.js | Enhanced toggle logic to exclude selected residues |
| static/js/USER_3DMol_applet.js / 3DMol_applet_DEV.js | Commented out initial zoom/render calls to avoid override |
| config.py | Pointed ASSEMBLY_FOLDER to per-protein split folder |
| app.py | Imported new MATS_FOLDER, added parse/transform funcs, updated routes |
| README.md | Added publication reference to README |
Comments suppressed due to low confidence (5)
README.md:6
- [nitpick] Citation markup varies between
<em>,<i>and plain text; consider standardizing tag usage and punctuation for consistency.
This is the repository for our ligand binding site analysis, **LIGYSIS**, [web server](https://www.compbio.dundee.ac.uk/ligysis/) published in [Nucleic Acids Research](https://doi.org/10.1093/nar/gkaf411). LIGYSIS is a Python [Flask](https://flask.palletsprojects.com/en/stable/) Web application.
app.py:281
- The new
transform_coordinates()andparse_custom_matrix()functions lack unit tests; consider adding tests to ensure correct behavior and prevent regressions.
### TRANSFORMATION FUNCTIONS ###
static/js/USER_3DMol_toggle_surfs.js:399
- The selector variable
protAtomsmay be undefined or incorrect here; use the correct model selector (e.g.,protAtomsModel) to avoid runtime errors.
{...protAtoms, model: activeModel, not: {or: siteAssemblyPDBResNums}},
static/js/3DMol_toggle_surfs.js:388
- The variable
AssemblyClickedSiteResiduesmay not be defined in this scope; ensure the correct residue list variable is passed tonot.
{...protAtoms, model: activeModel, not: {or: AssemblyClickedSiteResidues}},
| datasets: [ | ||
| { | ||
| label: "Binding sites", | ||
| label: "", |
There was a problem hiding this comment.
Removing the dataset label will leave an empty legend entry; consider specifying a meaningful label or disabling the legend if not needed.
| label: "", | |
| label: chartLab, |
| def serve_assembly(filename): | ||
| #print(ASSEMBLY_FOLDER, filename) | ||
| full_ASSEMBLY_FOLDER = os.path.join(ASSEMBLY_FOLDER, os.path.dirname(filename)) | ||
| print(full_ASSEMBLY_FOLDER, os.path.basename(filename)) |
There was a problem hiding this comment.
Remove or replace this debug print statement to avoid noisy console output in production.
| print(full_ASSEMBLY_FOLDER, os.path.basename(filename)) | |
| logger.debug("Assembly folder: %s, Filename: %s", full_ASSEMBLY_FOLDER, os.path.basename(filename)) |
| rot, trans = parse_custom_matrix(os.path.join(MATS_FOLDER, prot_id, seg_id, f'{active_model}_bio.mat')) | ||
|
|
||
| #print(rot, trans) | ||
| print(f'{PROTS_FOLDER}/{prot_id}/{seg_id}/arpeggio/{active_model}_bio_proc.pkl') |
There was a problem hiding this comment.
These debug print statements in get_contacts should be removed or replaced with proper logging.
| SPLIT_FOLDER = DATA_FOLDER | ||
|
|
||
| ASSEMBLY_FOLDER = os.path.join(DATA_FOLDER, "data", "structures", "assembly") # IN EXAMPLE & CLUSTER | ||
| #ASSEMBLY_FOLDER = os.path.join(DATA_FOLDER, "data", "structures", "assembly") # IN EXAMPLE & CLUSTER |
There was a problem hiding this comment.
[nitpick] Consider removing this obsolete commented-out ASSEMBLY_FOLDER definition or add a comment explaining why it must remain.
| #ASSEMBLY_FOLDER = os.path.join(DATA_FOLDER, "data", "structures", "assembly") # IN EXAMPLE & CLUSTER |
| // viewer.zoomTo(); | ||
| // viewer.render(); |
There was a problem hiding this comment.
[nitpick] Remove this commented-out viewer.zoomTo() (and the subsequent render call) if they're no longer needed.
| // viewer.zoomTo(); | |
| // viewer.render(); | |
| // viewer.zoomTo(); | ||
| // viewer.render(); |
There was a problem hiding this comment.
[nitpick] Clean up the commented viewer.zoomTo() and viewer.render() calls to reduce dead code.
| // viewer.zoomTo(); | |
| // viewer.render(); | |
This branch includes several changes across 15 files. Minor changes on HTML templates and README. Major updates include:
Changes should work for both LIGYSIS pre-computed results as well as user-submitted job results.