Skip to content

surject: check anchor sliding on target paths - #5011

Draft
Sagorikanag wants to merge 1 commit into
vgteam:masterfrom
Sagorikanag:fix-surject-max-slide
Draft

surject: check anchor sliding on target paths#5011
Sagorikanag wants to merge 1 commit into
vgteam:masterfrom
Sagorikanag:fix-surject-max-slide

Conversation

@Sagorikanag

Copy link
Copy Markdown

Changelog Entry

  • vg surject --max-slide now detects slideable anchors using both the
    read sequence and the target-path sequence.

Description

The existing --max-slide check pruned an anchor when the same sequence
occurred at a nearby offset in the read. However, an anchor can also be
ambiguous because its reference sequence occurs again nearby on the path
being surjected to.

This change preserves the existing read-based check and adds a target-path
check. For every offset within --max-slide:

  1. If the anchor repeats at that offset in the read, it is pruned immediately.
  2. Otherwise, the same offset is checked on the current target path.
  3. If the reference sequence repeats there, the anchor is pruned.

The target-path comparison is limited to the path currently being surjected
to. An anchor occurring on other graph paths does not affect this decision.
Both forward and reverse-strand anchors are handled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant