private bool AnchoredRegionContainsUnanchoredEnds(BamAlignment read1, BamAlignment read2) { var read1UnanchoredStart = read1.Position - (read1.CigarData.GetPrefixClip()); var read1UnanchoredEnd = read1.GetLastBasePosition() + (read1.CigarData.GetSuffixClip()); return(read2.ContainsPosition(read1UnanchoredStart, read1.RefID) || read2.ContainsPosition(read1UnanchoredEnd, read1.RefID)); }