Skip to content

merge_criteria

Predicate functions consumed by FeatureDB.merge. Each has the signature (acc: Feature, cur: Feature, components: list[Feature]) -> bool.

Merge predicates — pure functions consumed by FeatureDB.merge.

Signature: (acc: Feature, cur: Feature, components: list[Feature]) -> bool. acc is the running accumulator; cur is the candidate to fold in; components is the list of already-folded features. All callables return True if the candidate should be merged into the accumulator.

Mirrors the legacy gffutils.merge_criteria module.

overlap_end_inclusive

overlap_end_inclusive(acc, cur, components)

True if cur.start falls within or immediately after acc.

Source code in python/gffbase/merge_criteria.py
def overlap_end_inclusive(acc, cur, components):
    """True if ``cur.start`` falls within or immediately after ``acc``."""
    return acc.start <= cur.start <= acc.end + 1