Ejemplo n.º 1
0
        public void AddItem(string key, ChipSeqItem item)
        {
            if (!_itemMap.ContainsKey(key))
            {
                _itemMap[key] = new OverlappedChipSeqItem();
            }

            _itemMap[key].Add(item);
        }
    public void AddItem(string key, ChipSeqItem item)
    {
      if (!_itemMap.ContainsKey(key))
      {
        _itemMap[key] = new OverlappedChipSeqItem();
      }

      _itemMap[key].Add(item);
    }
Ejemplo n.º 3
0
    public double GetOverlapPercentage(ChipSeqItem another)
    {
      if (!this.GeneSymbol.Equals(another.GeneSymbol))
      {
        return 0;
      }

      if (this.End < another.Start)
      {
        return 0;
      }

      if (this.Start > another.End)
      {
        return 0;
      }

      var oStart = Math.Max(this.Start, another.Start);
      var oEnd = Math.Min(this.End, another.End);
      var oLength = oEnd - oStart + 1;
      var minLen = Math.Min(this.Length, another.Length);
      return oLength * 1.0 / minLen;
    }
Ejemplo n.º 4
0
        public double GetOverlapPercentage(ChipSeqItem another)
        {
            if (!this.GeneSymbol.Equals(another.GeneSymbol))
            {
                return(0);
            }

            if (this.End < another.Start)
            {
                return(0);
            }

            if (this.Start > another.End)
            {
                return(0);
            }

            var oStart  = Math.Max(this.Start, another.Start);
            var oEnd    = Math.Min(this.End, another.End);
            var oLength = oEnd - oStart + 1;
            var minLen  = Math.Min(this.Length, another.Length);

            return(oLength * 1.0 / minLen);
        }