コード例 #1
0
ファイル: Read.cs プロジェクト: snashraf/Pisces
        private void UpdateFromBam()
        {
            if (BamAlignment.CigarData != null)
            {
                ValidateCigar(BamAlignment.CigarData, BamAlignment.Bases.Length);
            }
            _stitchedCigarInitialized = _directionCigarInitialized = _sequencedBaseDirectionMapInitialized = _positionMapInitialized = false;
            _isDuplex = null;

            _directionCigar            = null;
            _sequencedBaseDirectionMap = null;
        }
コード例 #2
0
ファイル: Read.cs プロジェクト: snashraf/Pisces
        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;
            }
        }
コード例 #3
0
ファイル: Read.cs プロジェクト: snashraf/Pisces
        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);
        }
コード例 #4
0
 public CigarDirectionExpander(CigarDirection cigarDirection)
 {
     _cigarDirection = cigarDirection;
     _cigarIndex     = 0;
     _opIndex        = 0;
 }