GMOD / jbrowse-components

Source code for JBrowse 2, a modern React-based genome browser
https://jbrowse.org/jb2
Apache License 2.0
205 stars 61 forks source link

Add "Group by" method for alignments tracks #4519

Closed cmdcolin closed 1 month ago

cmdcolin commented 1 month ago

This creates a 'Group by' feature for alignments tracks. It uses a sort of 'slight of hand' by dynamically adding a series of sessionTracks to the users session, and then launching them individually

Example: there are haplotypes 0 and 1 in the HP tag for a bam file, it create trackname-HP:0 and tracknamee-HP:1 as session tracks with each track having filterBy set to either HP==0 or HP==1, and then launches them

Pros:

Cons:

fixes https://github.com/GMOD/jbrowse-components/issues/912

cmdcolin commented 1 month ago

result on HP tag in volvox demo

image

menu item

image

dialog box

image

cmdcolin commented 1 month ago

the previous "state of the art" was sort by+color by, which helps distinguish somewhat but is not a full 'group by' solution (picture below)

image