Skip to content

Consolidated glycan structure and composition rendering #72

@douweschulte

Description

@douweschulte

Currently rendering glycans (#67) is done for structures and fragments of those structures. In spectra however there will be many fragments that result in the same mass, so it would be great if there is a way to consolidate all those fragments into a single figure instead of generating many figures that essentially are the same. For example the figure below could just be a single sialic acid with a root break, but because all of these four options came from different locations in two different glycans they are rendered as four separate pictures. This issue is even more apparent in the second figure where there are tons of different ways of generating a single GlcNAc fragment, this could be rendered as a single GlcNAc with a root break (B1α''p1).

Image
Could be: Image

Image
Could be: Image

Additionally sometimes there are situations where the different structures cannot be consolidated into a single structure but could still be simplified by drawing it as a combination of monosaccharides instead of all different fragments. In the example below there are many ways of generating a fragment of one GlcNAc and one Hex (either Man or Gal). This could be rendered as something like (blue square) ■1○1.

Image
Could be: Image

Needed functionality:

  • Consolidate monosaccharides into the minimum representation of the two:
    • Remove any isomeric state if not shared: f/D/L/e but also the color for Hex etc (eg Man + Gal => Hex)
    • Remove any modifications if not shared (maybe behind a parameter, this could change the chemical composition of the monosaccharides)
  • Consolidate structures
    • Take the first structure
    • Repeatedly add the next structure until all structures are added while removing any specifics that are not shared between all structures
      • Branch breaks
      • Root symbols (or breaks)
      • Specific branch angles (maybe if one angle differs just draw the whole tree as bunched up as normal, use the same layout as currently for PositionedGlycans but run that algorithm again)
      • Plus consolidate that monosaccharides using the function described before.
    • Render this with the same rendering as currently done for structures while returning what kinds of details have been removed, and be able to return nothing if there can be no consolidated structure (mostly when the branching is different)
  • Render a composition
    • Be able to render a composition like: ■1○1.
    • Be able to control internal consolidation (eg should a GlcNAC2Man1Gal1 be rendered as the three monosaccharides with the correct colours or as two ones: GlcNAc2Hex2 (so with a 'white' circle)).
    • Be able to consolidate multiple compositions using the same monosaccharide consolidation.
    • It should be possible to make these from any structure, but also from glycan compositions (eg Glycan:GlcNAc2Man2 should be rendered properly as well)

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-glycanArea: glycansA-mzannotateArea: fragmentation and annotation of spectra

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions