Skip to content

Add support for multi-mapping liftover #225

@jennifer-bowser

Description

@jennifer-bowser

Feature description

Currently, AnyVar only supports liftover if the original variant maps uniquely to a single variant in the opposing reference assembly. However, in the real world input variants may sometimes map to mulitple variants in the opposing reference assembly, and we need to support that. However, AnyVar's current tooling doesn't allow this:

  • We use AGCT to convert an input variant's start and end coordinates to the new assembly. However, AGCT only converts a single coordinate at a time.
  • This means that if input variant's start coordinate maps to multiple lifted-over start coordinates AND its end coordinate also maps to multiple lifted-over end coordinates, then there is no way to determine which start and end coordinates are supposed to pair together to create each of the lifted-over variants.

To demonstrate the problem:

from agct import Converter, Genome


agct_converter = Converter(Genome.HG19, Genome.HG38)
    
# logic to determine the input_variant's chromosome

converted_start = agct_converter.convert_coordinate(
    chromosome, input_variant.start, Strand.POSITIVE
)  # returns a list of coordinates

converted_end = agct_converter.convert_coordinate(
    chromosome, input_variant.end, Strand.POSITIVE
) # returns a list of coordinates

# Now what? We have 2 `start`s and 2 `end`s - how do we know which to pair together?

This gets way MORE messy if the start or end positions are Ranges rather than single coordinates, because then we have this problem for a) pairing lower and upper bound start coordinates to one another, b) pairing lower and upper bound end coordinates to one another, and c) pairing start and end Ranges to one another

Use case

AnyVar needs to be able to handle all reasonable edge cases in order to be a useful tool

Acceptance Criteria

AnyVar can support liftover for input variants that map to multiple lifted-over variants

Proposed solution

We either need to:

  • a) Open an AGCT PR to change the methodology used to lift over coordinates
    • AGCT is a black box to me, so I don't know how feasible this is; though it sounds like it might be doable?
  • b) Find a different tool to utilize in AnyVar for liftover.
    • I do not know what alternatives exist, but I assume there must be others out there we could look into.

Alternatives considered

No response

Implementation details

No response

Potential Impact

No response

Additional context

No response

Contribution

None

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions