FeatureOverlapInterface
in
Interface FeatureOverlapInterface - answers "does this restriction site fall inside that CDS ?" and "do these two annotations overlap ?" for the features of a circular Plasmid, correctly handling a feature that crosses the origin.
Tags
Table of Contents
Methods
- containsPosition() : bool
- findFeaturesAtPosition() : array<string|int, PlasmidFeature>
- findOverlapping() : array<string|int, PlasmidFeature>
- findOverlappingPairs() : array<string|int, FeatureOverlap>
- Every pair of $oPlasmid's own features that overlap each other. With n features this compares every pair once (O(n^2)) rather than building an interval tree : a single plasmid's annotation set is small enough (rarely more than a few dozen features) that the simpler algorithm is both clearer and, in practice, at least as fast.
- overlaps() : bool
Methods
containsPosition()
public
containsPosition(PlasmidFeature $oFeature, int $iOneBasedPosition, int $iPlasmidLength) : bool
Parameters
- $oFeature : PlasmidFeature
- $iOneBasedPosition : int
-
1-based, the same convention as PlasmidFeature's own start/end
- $iPlasmidLength : int
Return values
boolfindFeaturesAtPosition()
public
findFeaturesAtPosition(Plasmid $oPlasmid, int $iOneBasedPosition) : array<string|int, PlasmidFeature>
Parameters
- $oPlasmid : Plasmid
- $iOneBasedPosition : int
Return values
array<string|int, PlasmidFeature> —In the same relative order as $oPlasmid->getFeatures()
findOverlapping()
public
findOverlapping(PlasmidFeature $oTarget, array<string|int, PlasmidFeature> $aCandidates, int $iPlasmidLength) : array<string|int, PlasmidFeature>
Parameters
- $oTarget : PlasmidFeature
- $aCandidates : array<string|int, PlasmidFeature>
-
$oTarget itself, if present, is never returned
- $iPlasmidLength : int
Return values
array<string|int, PlasmidFeature> —In the same relative order as $aCandidates
findOverlappingPairs()
Every pair of $oPlasmid's own features that overlap each other. With n features this compares every pair once (O(n^2)) rather than building an interval tree : a single plasmid's annotation set is small enough (rarely more than a few dozen features) that the simpler algorithm is both clearer and, in practice, at least as fast.
public
findOverlappingPairs(Plasmid $oPlasmid) : array<string|int, FeatureOverlap>
Parameters
- $oPlasmid : Plasmid
Return values
array<string|int, FeatureOverlap>overlaps()
public
overlaps(PlasmidFeature $oFirst, PlasmidFeature $oSecond, int $iPlasmidLength) : bool
Parameters
- $oFirst : PlasmidFeature
- $oSecond : PlasmidFeature
- $iPlasmidLength : int