private void UpdateFromBam() { if (BamAlignment.CigarData != null) { ValidateCigar(BamAlignment.CigarData, BamAlignment.Bases.Length); } _stitchedCigarInitialized = _directionCigarInitialized = _sequencedBaseDirectionMapInitialized = _positionMapInitialized = false; _isDuplex = null; _directionCigar = null; _sequencedBaseDirectionMap = null; }
private void GetDirectionCigarFromBam() { if (BamAlignment.TagData != null && BamAlignment.TagData.Length > 0) { var xdTag = BamAlignment.GetStringTag("XD"); if (xdTag != null) { _directionCigar = new CigarDirection(xdTag); } _directionCigarInitialized = true; } }
public static DirectionType[] CreateSequencedBaseDirectionMap(CigarDirection directionCigar, CigarAlignment cigarData) { var cigarBaseDirectionMap = directionCigar.Expand();; var cigarBaseAlleleMap = cigarData.Expand(); var sequencedBaseDirectionMap = new DirectionType[cigarData.GetReadSpan()]; int sequencedBaseIndex = 0; for (int cigarBaseIndex = 0; cigarBaseIndex < cigarBaseDirectionMap.Count; cigarBaseIndex++) { var cigarOp = cigarBaseAlleleMap[cigarBaseIndex]; if (cigarOp.IsReadSpan()) //choices: (MIDNSHP) { sequencedBaseDirectionMap[sequencedBaseIndex] = cigarBaseDirectionMap[cigarBaseIndex]; sequencedBaseIndex++; } } return(sequencedBaseDirectionMap); }
public CigarDirectionExpander(CigarDirection cigarDirection) { _cigarDirection = cigarDirection; _cigarIndex = 0; _opIndex = 0; }