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

Add .delta and .chain format adapters, fix ref name aliasing in synteny/dotplot views, and optimize very long CIGAR string in synteny view #2746

Merged
merged 23 commits into from
Feb 21, 2022

Conversation

cmdcolin
Copy link
Collaborator

@cmdcolin cmdcolin commented Feb 15, 2022

Fixes #1557
Fixes #2093

Adds a "comparative adapter" with PAFAdapter and DeltaAdapter. The PAFAdapter was in the dotplot plugin

Adapts some code from minimap2's paftools.js https://github.com/lh3/minimap2/blob/master/misc/paftools.js#L1853 (licensed MIT, cited in source code) to parse the delta file

@github-actions github-actions bot added the needs label triage Needs a label to show in changelog (breaking, enhancement, bug, documentation, or internal) label Feb 15, 2022
@cmdcolin cmdcolin force-pushed the comparative_adapter branch 2 times, most recently from 538f776 to a138ba0 Compare February 15, 2022 22:02
@cmdcolin cmdcolin added enhancement New feature or request and removed needs label triage Needs a label to show in changelog (breaking, enhancement, bug, documentation, or internal) labels Feb 15, 2022
@codecov
Copy link

codecov bot commented Feb 15, 2022

Codecov Report

Merging #2746 (116b1d4) into main (ab41f01) will decrease coverage by 0.39%.
The diff coverage is 23.95%.

❗ Current head 116b1d4 differs from pull request most recent head b39d1b5. Consider uploading reports for the commit b39d1b5 to get more accurate results

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2746      +/-   ##
==========================================
- Coverage   60.63%   60.23%   -0.40%     
==========================================
  Files         566      571       +5     
  Lines       26348    26578     +230     
  Branches     6422     6472      +50     
==========================================
+ Hits        15976    16010      +34     
- Misses      10047    10243     +196     
  Partials      325      325              
Impacted Files Coverage Δ
...pes/renderers/ComparativeServerSideRendererType.ts 62.50% <0.00%> (-4.17%) ⬇️
packages/core/util/types/mst.ts 84.37% <ø> (ø)
...parative-adapters/src/ChainAdapter/ChainAdapter.ts 0.00% <0.00%> (ø)
...parative-adapters/src/DeltaAdapter/DeltaAdapter.ts 0.00% <0.00%> (ø)
...ugins/comparative-adapters/src/PAFAdapter/index.ts 100.00% <ø> (ø)
plugins/dotplot-view/src/DotplotDisplay/index.ts 71.79% <ø> (ø)
...arative-view/src/LinearComparativeDisplay/index.ts 5.88% <ø> (ø)
...src/LinearSyntenyRenderer/LinearSyntenyRenderer.ts 0.00% <0.00%> (ø)
...tenyRenderer/components/LinearSyntenyRendering.tsx 1.28% <0.00%> (-0.07%) ⬇️
...ew/src/LinearSyntenyView/components/ImportForm.tsx 0.00% <0.00%> (ø)
... and 17 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ab41f01...b39d1b5. Read the comment docs.

@cmdcolin cmdcolin marked this pull request as draft February 17, 2022 02:04
@cmdcolin cmdcolin force-pushed the comparative_adapter branch 2 times, most recently from f81b38c to a720df0 Compare February 17, 2022 07:49
@cmdcolin
Copy link
Collaborator Author

this PR has a couple of extra changes

now supports loading chain files (e.g. from UCSC) files to display synteny.

this combo of

  • PAF (minimap)
  • .delta (mummer)
  • .chain (ucsc pipeline)

this covers a good amount of basic "whole genome alignment" formats

this PR also...

  • adds refname renaming for all of these (fixes Add ref name renaming for synteny datasets #2093), which was needed to test a UCSC chain file (which has chr prefixes, while our code does not). it does this by adding assembly name to features on webworker, and then using assembly.getCanonicalRefName on the main thread
  • adds an optimization for displaying very long chain file data which can have very large cigar strings, so it avoids drawing very small synteny rectangles less than 0.5px wide (e.g. drawing a single bp insertion or deletion when viewing whole chromosomes)

example screenshot showing this liftover file https://hgdownload.cse.ucsc.edu/goldenpath/hg19/liftOver/hg19ToHg38.over.chain.gz (reads it gzipped from the remote url)

Screenshot from 2022-02-17 00-42-06

the import form for the dotplot and linear synteny import forms is redesigned to allow .delta, .chain, .paf, and .out files (mashmap)

Screenshot from 2022-02-17 00-44-26

@cmdcolin cmdcolin changed the title Add .delta (mummer) format support for synteny tracks Add .delta and .chain format support for synteny tracks, and fix allow ref name aliased data in synteny/dotplot views Feb 18, 2022
@cmdcolin cmdcolin marked this pull request as ready for review February 18, 2022 22:17
@cmdcolin cmdcolin changed the title Add .delta and .chain format support for synteny tracks, and fix allow ref name aliased data in synteny/dotplot views Add .delta and .chain format support for synteny tracks, fix allow ref name aliased data in synteny/dotplot views, and optimize very long CIGAR string rendering Feb 18, 2022
@cmdcolin cmdcolin merged commit ea2faba into main Feb 21, 2022
@cmdcolin cmdcolin changed the title Add .delta and .chain format support for synteny tracks, fix allow ref name aliased data in synteny/dotplot views, and optimize very long CIGAR string rendering Add .delta and .chain format adapters, fix ref name aliasing in synteny/dotplot views, and optimize very long CIGAR string in synteny view Feb 21, 2022
@cmdcolin cmdcolin deleted the comparative_adapter branch February 23, 2022 00:29
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
None yet
Development

Successfully merging this pull request may close these issues.

Add ref name renaming for synteny datasets Support mummer output for dotplot/synteny views
1 participant