Skip to content

Fix #260: add Locus.overlap_length helper#338

Merged
iskandr merged 1 commit into
mainfrom
fix-260-locus-overlap-length
May 12, 2026
Merged

Fix #260: add Locus.overlap_length helper#338
iskandr merged 1 commit into
mainfrom
fix-260-locus-overlap-length

Conversation

@iskandr

@iskandr iskandr commented May 12, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds Locus.overlap_length(other, ignore_strand=False) returning the number of overlapping base positions between two loci. Mirrors the contig/strand handling of distance_to_locus and returns 0 when the loci are disjoint, on different contigs, or on opposite strands.
  • Bumps version to 2.6.11.

Closes #260.

Test plan

  • pytest tests/test_locus.py
  • ./lint.sh
  • CI on PR

Returns the number of overlapping base positions between two loci on the
same contig/strand. Accepts ignore_strand=True for strand-invariant
overlap. Returns 0 when loci are disjoint, on different contigs, or on
opposite strands (unless ignore_strand=True).

Bump version to 2.6.11.
@iskandr iskandr merged commit bdd38de into main May 12, 2026
10 checks passed
@iskandr iskandr deleted the fix-260-locus-overlap-length branch May 12, 2026 03:05
@coveralls

Copy link
Copy Markdown

Coverage Status

coverage: 83.702% (+0.05%) from 83.652% — fix-260-locus-overlap-length into main

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.

A method for getting length of the overlap between two loci

2 participants