-
Notifications
You must be signed in to change notification settings - Fork 6
min & max stoichiometry labels #212
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
{ | ||
"ac": "CPX-37", | ||
"name": "CPX-37", | ||
"url": "https://www.ebi.ac.uk/complexportal/complex/CPX-37" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a small bug in complex portal (which I have fixed but not deployed yet) causing the min and max stoichiometry not being set properly when the min is 0.
The correct version of this file is
CPX-37.json
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, the min/max label appears for the correct version of the file
participant.setPosition(-500, -500); | ||
this.proteinUpper.appendChild(participant.upperGroup); | ||
} | ||
participant.setPosition(-500, -500); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just got this code locally and I tried to run it, and this is causing errors for complex CPX-5602
app.js:254 Uncaught TypeError: Failed to execute 'appendChild' on 'Node': parameter 1 is not of type 'Node'.
at App.init (app.js:254:1)
at App.readMIJSON (app.js:489:1)
at index.html?_ijt=vs1f11ftplrbgklh33n43qk7rd&_ij_reload=RELOAD_ON_SAVE:175:16
at d3.v3.min.js:1:9203
at Object.<anonymous> (d3.v3.min.js:1:9034)
at Object.t (d3.v3.min.js:1:740)
at XMLHttpRequest.i (d3.v3.min.js:1:7909)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
odd, for me CPX-5602 is working,
i tested in FireFox and Chrome
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's like you don't have the most recent version of complex.js
the new version of complex.js should initialise this.upperGroup
on line 12
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right, I forgot those changes. It is working now. The only thing is that because we don't have labels for complexes, when we have stoichiometry, it's just the stoichiometry being displayed.
So, if we change the code (in line 10 of complex.js) to
const complexIdMatch = interactorRef.match(/^.*(CPX-[0-9]+).*$/);
const complexId = complexIdMatch ? complexIdMatch[1] : "";
this.init(id, app, interactor, complexId);
Then we have the complex id of subcomplexes, and it would look like this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, i mentioned in the issue that "you could now also have similar labels for complexes giving their names if you wanted".
I thought it might be perceived as cluttered things up, but if you prefer this then lets do it like that.
Like this then, with complex names shown?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure. I agree that it's a bit more cluttered, but it does look weird with just the numbers and no name. I'll check with the rest of the team to get their opinion on this and I'll get back to you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it does look weird with just the numbers and no name
i think you're right
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's changed in the pull request now as per your suggestion (v.2.2.8). But lets see what your team think,
cheers,
C
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree it looks better with the CPX id, it's clearer that it isn't a misplaced label
#19