MICommunity/ComplexViewer

Avoid hatching lines under sequences

EliotRagueneau opened this issue · 15 comments

Hi Colin,

Sometimes, some complexes have non-located features, so they are hatched, and they take the whole width of the sequence (which is totally fine).

However, when this feature is under the sequence, the sequence becomes basically invisible (eg this network). I see 3 solutions against that:

  • increase the outline stroke or the background-color of the sequence so that it hides more of the features under him, and enhance the contrast (downside: Might hide the feature under the sequence )
  • when possible (several features on the same molecule) make the undefined features come last so that they aren't in the middle (Downside: doesn't really work until there is more than 2 features on a single interaction, which is quite uncommon)
  • Consider the sequence as a feature so that the other features dodge it (Downside: will probably not be as well centred and nice ...)

Don't hesitate to discuss the proposed solutions, specially if you find a better one ^^

increase the outline stroke

I think that won't work so well because it's not really an outline, its done with a css text shadow:
https://github.com/MICommunity/ComplexViewer/blob/master/src/css/xinet.css#L68

I see there's commented out code to double the size of that text shadow but I think there is a problem with it no longer looking like an outline.

Maybe we could address this by making it a proper outline stroke to the text and making it bigger.

Other solutions might be switching off the annotations or not using the hatches.

Good point, Eliot. It does become invisible.

We have quite a few of these features in CP but I never zoomed into them to notice the visualisation issue. Often more than 1 feature with an undefined region.

The non-specific region is actually of no use once you are at the seq level so switching it off as you zoom in might be a neat option.

I also like the idea that the seq text becomes its own feature.

The non-specific region is actually of no use once you are at the seq level so switching it off as you zoom in might be a neat option.

maybe we shouldn't show the non-specific regions that cover the whole sequence on the bars? it would help with this but not completely solve it

I also like the idea that the seq text becomes its own feature

that way works if you really do want to see the sequence in the context uncertain features

just getting rid of the hatches and trying to do it all with transparency / colours is going to get a bit confusing with the colours I think

ok, there is a solution to this in v2.1.10 (currently at complexviewer.org)
the AA letters have a thick white outline,
it's slightly crude because it just obliterates the sequence annotation colours below, rather than moving them out of the way.
but it is probably better, prob good enough to close this?

That works well - except you lost the tooltip with the feature shortlabel :(

I can still see the tooltip on my side ... That's odd ...
Otherwise, it's working quite well this outline, the only issue from my side being the N outline that goes outside of its "allowed" area:
Screenshot 2021-08-16 at 15 06 54

Hmm, that is odd. Tooltip works for me in the current CP version but not the demo. My OS is Mac Catalina 10.15.7

@EliotRagueneau - the spiky N's should be gone (v2.1.12)
@bmeldal - you still have missing tooltips on the Mac?

I found the tool tip - almost off-screen to the top left!
image

ok, i see... are all your tooltips there? (i.e. also the ones for the complexes, proteins, links, etc)

Yes, all of them by the looks of it. And just the bottom left edge visible.

The issue is present under Firefox and not Chrome

He he, that old nugget!

ok, i think you should have tooltips back in firefox?
and those spiky bits on the AA letters should be gone
(v2.1.13, demo at complexviewer.org)

Yup, tooltip is back!