RestrictionEndCompatibilityManager
in package
implements
RestrictionEndCompatibilityInterface
Two blunt ends always ligate. Two sticky ends of the same kind (both 5' or both 3') ligate when their overhang sequences, AS STORED, are literally equal - not their reverse complement.
This looks backwards next to raw Watson-Crick pairing until the storage convention is taken into account: CircularRestrictionDigestManager::buildEnd() always records the plasmid's own reference ("top") strand bases at the gap, read left to right in fixed plasmid coordinates, and buildFragments() reuses that exact same value both as the RightEnd of the fragment ending there and as the LeftEnd of the fragment starting there. Relative to that single stored value, the two usages sit on physically different strands : a fragment's LeftEnd usage already equals the true protruding strand read 5'->3', while a fragment's RightEnd usage equals the reverse complement of it. The intended comparison here is always between a RightEnd and a LeftEnd (self-religation of a cut, or joining one fragment's end to a different fragment's end, as RestrictionFragment's own accessors produce) ; substituting both roles' true values into the real antiparallel pairing condition cancels the two opposite transforms and leaves plain equality of the stored strings. The clearest proof of this is an invariant that must always hold regardless of the overhang sequence : re-ligating a fragment to the very piece it was cut from restores the original molecule, so checkCompatibility($fragment->getRightEnd(), $fragment->getLeftEnd()) - one cut, compared against itself - must always be COMPATIBLE ; reverse-complement equality fails that invariant for any non-palindromic overhang, while literal equality satisfies it unconditionally.
A blunt end never ligates to a sticky one, a 5' overhang never ligates to a 3' one, and anything involving an UNKNOWN end, or an overhang holding an ambiguous base, is reported indeterminate rather than guessed at.
Comparing two ends that are both in the SAME role (two LeftEnds, or two RightEnds - e.g. to check whether a fragment could be inserted flipped) is a different question this method does not answer ; nothing in this codebase constructs that comparison today, but it would need the reverse complement, not literal equality, since the role transform would no longer cancel out. Class RestrictionEndCompatibilityManager
Tags
Table of Contents
Interfaces
- RestrictionEndCompatibilityInterface
- Interface RestrictionEndCompatibilityInterface - decides whether two restriction ends can be ligated together.
Methods
- checkCompatibility() : string
Methods
checkCompatibility()
public
checkCompatibility(RestrictionEnd $oFirst, RestrictionEnd $oSecond) : string
Parameters
- $oFirst : RestrictionEnd
- $oSecond : RestrictionEnd
Return values
string —One of self::COMPATIBLE, self::INCOMPATIBLE, self::INDETERMINATE