예제 #1
0
        public static void CheckBins(Dictionary <int, int> nonZeroBinValues, IBins <int> intBins)
        {
            for (int i = 0; i < 100; i++)
            {
                if (!nonZeroBinValues.ContainsKey(i))
                {
                    Assert.Equal(0, intBins.GetHit(i));
                }
            }

            foreach (var bin in nonZeroBinValues)
            {
                Assert.Equal(bin.Value, intBins.GetHit(bin.Key));
            }
        }
예제 #2
0
        public void Merge(IBins <int> otherBins, int binOffset, int startBinInOther, int endBinInOther)
        {
            var startBinInThis = startBinInOther - binOffset;
            var endBinInThis   = Math.Min(_numBins, endBinInOther - binOffset);

            for (int i = startBinInThis; i <= endBinInThis; i++)
            {
                var binIdInOtherBins = i + binOffset;

                // Note, this keeps checking even if we've gone past the range of the other guy
                var otherHit = otherBins.GetHit(binIdInOtherBins, false);
                if (otherHit > 0)
                {
                    IncrementHit(i, otherHit);
                }
            }
        }
        /// <summary>
        /// Increment the hits of this bin with the hits from otherBins. Assumes they are on the same scale,
        /// and will not go past the current bins. If offset not provided, also assumes start positions are the same.
        /// </summary>
        /// <param name="otherBins"></param>
        /// <param name="binOffset"></param>
        public void Merge(IBins <T> otherBins, int binOffset, int startBinInOther, int endBinInOther)
        {
            var defaultResult  = ReturnDefault();
            var startBinInThis = startBinInOther - binOffset;
            var endBinInThis   = Math.Min(_numBins, endBinInOther - binOffset);

            for (int i = startBinInThis; i <= endBinInThis; i++)
            {
                var binIndexInOther = i + binOffset;

                // Note, this keeps checking even if we've gone past the range of the other guy
                var otherHit = otherBins.GetHit(binIndexInOther);
                if (!otherHit.Equals(defaultResult))
                {
                    MergeHits(i, otherHit);
                }
            }
        }
예제 #4
0
 public int GetAllHits(int i)
 {
     return(AllHits.GetHit(i));
 }
예제 #5
0
 public int GetMapqMessyHit(int i)
 {
     return(_mapqMessyHits.GetHit(i));
 }
예제 #6
0
 public int GetIndelHit(int i)
 {
     return(_indelHits.GetHit(i));
 }
예제 #7
0
 public int GetReverseMessyRegionHit(int i)
 {
     return(_revOnlyMessyHits.GetHit(i));
 }
예제 #8
0
 public int GetForwardMessyRegionHit(int i)
 {
     return(_fwdOnlyMessyHits.GetHit(i));
 }
예제 #9
0
 private bool GetProbableSnvHit(int i)
 {
     return(_probableTrueSnvRegions.GetHit(i));
 }
예제 #10
0
 public bool GetIsMessyEnough(int i)
 {
     return(_isMessyEnough.GetHit(i));
 }
예제 #11
0
 public bool GetIndelRegionHit(int i)
 {
     return(_indelRegions.GetHit(i));
 }
예제 #12
0
 public bool GetMapqMessyStatus(int i)
 {
     return(_mapqMessyStatus.GetHit(i));
 }
예제 #13
0
 public bool GetRevMessyStatus(int i)
 {
     return(_revMessyStatus.GetHit(i));
 }
예제 #14
0
 public bool GetFwdMessyStatus(int i)
 {
     return(_fwdMessyStatus.GetHit(i));
 }
예제 #15
0
 public bool IsPositionUsable(int position)
 {
     return(_sitesUsable.GetHit(_binConclusions.GetBinId(position)));
 }