Skip to content
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

Create method to collapse introns in LGV #557

Open
cmdcolin opened this issue Oct 17, 2019 · 6 comments · May be fixed by #4033
Open

Create method to collapse introns in LGV #557

cmdcolin opened this issue Oct 17, 2019 · 6 comments · May be fixed by #4033
Labels
enhancement New feature or request

Comments

@cmdcolin
Copy link
Collaborator

Collapsed introns or collapsed other regions would result results in a big change in coordinates. The refName labeling would could be modified to allow it to display a more complete description of the displayed region instead of just the refName.

@cmdcolin cmdcolin added this to To do in JBrowse team board via automation Oct 17, 2019
@cmdcolin cmdcolin added needs review needs verification and/or more specifics enhancement New feature or request labels Oct 17, 2019
JBrowse team board automation moved this from To do to Done Oct 17, 2019
@cmdcolin cmdcolin reopened this Oct 17, 2019
JBrowse team board automation moved this from Done to In progress Oct 17, 2019
@cmdcolin cmdcolin moved this from In progress to Prioritized in JBrowse team board Oct 18, 2019
@rbuels rbuels changed the title Ref name labels in a "collapsed introns" type scenario alternate ruler display for displayed regions Feb 28, 2020
@rbuels rbuels removed the needs review needs verification and/or more specifics label Feb 28, 2020
@rbuels
Copy link
Contributor

rbuels commented Feb 28, 2020

Implementation idea so far is to make the ruler of a displayed region just be its locstring label or similar thing, if the displayed region is narrow enough on the screen that there isn't room for meaningful ruler ticks in its ruler.

@cmdcolin cmdcolin changed the title alternate ruler display for displayed regions Having many displayed regions (e.g. collapsed introns) results in hard to read coordinates and/or many duplicate refnames Sep 4, 2020
@cmdcolin
Copy link
Collaborator Author

cmdcolin commented Sep 4, 2020

Somewhat related #1084

@rbuels rbuels added the needs review needs verification and/or more specifics label Sep 4, 2020
@cmdcolin cmdcolin changed the title Having many displayed regions (e.g. collapsed introns) results in hard to read coordinates and/or many duplicate refnames Create collapsed introns view Oct 11, 2022
@cmdcolin cmdcolin changed the title Create collapsed introns view Create collapsed introns view in LGV Oct 11, 2022
@cmdcolin cmdcolin changed the title Create collapsed introns view in LGV Create method to collapse introns in LGV Oct 11, 2022
@cmdcolin
Copy link
Collaborator Author

I retitled this to be a more generic intron collapsing issue

I made a demo where I manually stitched together some displayedRegions from the set of exons from one transcript in a gene (with 100bp on each side)

https://jbrowse.org/code/jb2/main/?config=test_data%2Fconfig_demo.json&session=local-YuIbRHX9y

Screenshot from 2022-10-12 10-12-26

It looks ok, it is pretty moderate in terms of total number of displayedRegions though so if there are e.g. 30-100 exons it would probably start looking messier and create ellided blocks, but that might be ok since you can zoom in on them

@cmdcolin
Copy link
Collaborator Author

script to stitch it together

run in devtools after clicking a feature

getSnapshot(JBrowseSession).widgets.baseFeature.finalizedFeatureData

copy output to test.json, then make nodejs script

const fs = require('fs')
const obj = JSON.parse(fs.readFileSync('test.json'))
const refName = obj.refName
const res = obj.subfeatures
  .filter(f => f.type === 'exon')
  .map(f => ({
    refName,
    start: f.start - 100,
    end: f.end + 100,
    assemblyName: 'hg19',
  }))
res.sort((a, b) => a.start - b.start)
console.log(res)

then copy output to clipboard

node test.js|pbcopy

then in devtools

JBrowseSession.views[0].setDisplayedRegions(<hit paste>)

@cmdcolin cmdcolin removed the needs review needs verification and/or more specifics label Oct 12, 2022
@carolinebridge
Copy link
Contributor

From meeting:

  • right click gene collapse introns
  • mouseover the hard black bar interregion lines
  • open LGV region with collapse in a separate view maybe
  • could make its own view that extends the LGV
  • or just have a dialogue with collapsing options

@cmdcolin
Copy link
Collaborator Author

cmdcolin commented Nov 2, 2022

This feature may benefit from being implemented alongside the canvas feature renderer. The floating labels don't work well on with the SvgFeatureRenderer with the many discontinous regions and the Svg exports are messy too. Each could potentially be fixed within the current SvgFeatureRenderer framework, but i do think a new feature renderer is a good investment

@cmdcolin cmdcolin linked a pull request Nov 3, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
JBrowse team board
  
Prioritized
Development

Successfully merging a pull request may close this issue.

3 participants