question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Possible issue with Loci.remap()

See original GitHub issue

I am trying to remap a loci based on a different structure using Loci.remap(). Sometimes this works, but sometimes it doesn’t and the output loci is empty (even if it shouldn’t be).

I have found the possible issue here: https://github.com/molstar/molstar/blob/0f5a6194ffc83b9963c2ce41e84f2625da00f203/src/mol-model/structure/structure/element/loci.ts#L152-L153

This issue could be entirely due to my wrong interpretation of how remap method should be used, but I have found that if i compare against unit.invariantId instead of unit.id everything seems to work fine.

if i get the unit in this way, it seems to work fine in every case in my code.

  let unit
   structure.units.forEach(u => {
      if (u.invariantId === invId) unit = u
   });
  if (!unit) return

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:11 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
dsehnalcommented, Jun 22, 2022

Instead what does chainGroupId represents?

All instances of the same unit have the same chainGroupId. Mol* doesn’t do “physical” copies of chains when rendering instances and this helps with performance of some algorithms.

1reaction
dsehnalcommented, Jun 21, 2022

invariantId will stay the between instanced copies of the same change (e.g. when creating an assembly/symmetry).

From the code:

        /** invariant ID stays the same even if the Operator/conformation changes. */
        readonly invariantId: number,
Read more comments on GitHub >

github_iconTop Results From Across the Web

Coordinate remapping service - NCBI - NIH
We are sorry but a service supporting the Remap service is down. We expect this is a transient problem but if this persists,...
Read more >
Network reconstruction for trans acting genetic loci using multi ...
We bridge the gap between the involved chromosomes by including transcription factor binding site (TFBS) information collected from ReMap [62, ...
Read more >
dereneaton/ipyrad - Gitter
I ask because I'm scrounging for data and would like to find broken read pairs that map to only one side of focal...
Read more >
ROS Topic Remap [Example] - The Robotics Back-End
Remapping a topic means that you'll change the topic name at run-time. If a node publishes on “topic1”, then you can make it...
Read more >
How do I use OpenCV's remap function? - Stack Overflow
It and everyone on SO states you input an array (a map) of starting points, a map of ending points, and then remap()...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found