-
Notifications
You must be signed in to change notification settings - Fork 63
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
Filter tracks that match all view.assemblyNames in multi-assembly track selector modes #3725
Conversation
made a fallback where a particular view type can specify on their view model trackSelectorAnyOverlap:true to display tracks that have 'any overlap' with view.assemblyNames |
.views(self => ({ | ||
/** | ||
* #method | ||
*/ | ||
get(asmName: string) { | ||
return self.assemblies.find(asm => asm.hasName(asmName)) | ||
return self.assemblyNameMap[asmName] |
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.
this refactor to assemblyManager.get speeds up potentially calling assemblyManager.get here many times (for every track * for every assemblyName on track) https://github.com/GMOD/jbrowse-components/pull/3725/files#diff-57f9ccf43c6a6dfb5af36c32f44b8bba8c6339a9e1a76409b44c26f2fefe5cebR71
Codecov Report
@@ Coverage Diff @@
## main #3725 +/- ##
=======================================
Coverage 64.29% 64.30%
=======================================
Files 961 961
Lines 29962 29956 -6
Branches 7190 7189 -1
=======================================
- Hits 19263 19262 -1
+ Misses 10535 10530 -5
Partials 164 164
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
should be good to go. there could be some future case where this needs adjusting, where e.g. in a multisyntenyview, we have the need to open synteny tracks that don't match all of view.assemblyNames, but i think we can address that as it comes and in the meantime a potential multisyntenyview can enable a property on the view model view.trackSelectorAnyOverlap:true) |
Currently, tracks in e.g. the track selector to turn on synteny tracks will display any track where
intersection(readConfObject(track,'assemblyNames'), view.assemblyNames).length!==0
This changes it so that it only displays
intersection(readConfObject(track,'assemblyNames'), view.assemblyNames).length===view.assemblyNames.length
I think overall, this conveys a better situation for users. We could alternatively make it so that it can display it in both modes
Fixes #3539