Skip to content

Development branch to be merged to master#14

Open
JavierSanchez-Utges wants to merge 16 commits intomasterfrom
development
Open

Development branch to be merged to master#14
JavierSanchez-Utges wants to merge 16 commits intomasterfrom
development

Conversation

@JavierSanchez-Utges
Copy link
Collaborator

This branch includes several changes across 15 files. Minor changes on HTML templates and README. Major updates include:

  1. Reading from new mmCIF assembly files superposed to representative segment structure
  2. Edits to maintain the view when transitioning from superposition view to assembly and across assemblies. This includes fixing: water molecules, ligands, labels, surfaces, etc.

Changes should work for both LIGYSIS pre-computed results as well as user-submitted job results.

…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
…oning between assemblies and superposition views
@stuartmac stuartmac requested review from Copilot and stuartmac June 5, 2025 13:57
@stuartmac stuartmac self-assigned this Jun 5, 2025
@stuartmac stuartmac added the enhancement New feature or request label Jun 5, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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() and parse_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 protAtoms may 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 AssemblyClickedSiteResidues may not be defined in this scope; ensure the correct residue list variable is passed to not.
{...protAtoms, model: activeModel, not: {or: AssemblyClickedSiteResidues}},

datasets: [
{
label: "Binding sites",
label: "",
Copy link

Copilot AI Jun 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing the dataset label will leave an empty legend entry; consider specifying a meaningful label or disabling the legend if not needed.

Suggested change
label: "",
label: chartLab,

Copilot uses AI. Check for mistakes.
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))
Copy link

Copilot AI Jun 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove or replace this debug print statement to avoid noisy console output in production.

Suggested change
print(full_ASSEMBLY_FOLDER, os.path.basename(filename))
logger.debug("Assembly folder: %s, Filename: %s", full_ASSEMBLY_FOLDER, os.path.basename(filename))

Copilot uses AI. Check for mistakes.
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')
Copy link

Copilot AI Jun 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These debug print statements in get_contacts should be removed or replaced with proper logging.

Copilot uses AI. Check for mistakes.
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
Copy link

Copilot AI Jun 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Consider removing this obsolete commented-out ASSEMBLY_FOLDER definition or add a comment explaining why it must remain.

Suggested change
#ASSEMBLY_FOLDER = os.path.join(DATA_FOLDER, "data", "structures", "assembly") # IN EXAMPLE & CLUSTER

Copilot uses AI. Check for mistakes.
Comment on lines +97 to +98
// viewer.zoomTo();
// viewer.render();
Copy link

Copilot AI Jun 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Remove this commented-out viewer.zoomTo() (and the subsequent render call) if they're no longer needed.

Suggested change
// viewer.zoomTo();
// viewer.render();

Copilot uses AI. Check for mistakes.
Comment on lines +74 to +75
// viewer.zoomTo();
// viewer.render();
Copy link

Copilot AI Jun 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Clean up the commented viewer.zoomTo() and viewer.render() calls to reduce dead code.

Suggested change
// viewer.zoomTo();
// viewer.render();

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants