コード例 #1
0
        public void AddMissedCleavages()
        {
            if (this.maxMissedCleavages > 0)
            {
                var missedList = new List <DigestRangeLocation>();
                for (int i = 0; i < this.peptideQue.Count; i++)
                {
                    DigestRangeLocation loc = this.peptideQue[i];

                    for (int iMiss = 0; iMiss < this.maxMissedCleavages; iMiss++)
                    {
                        int j = i + 1 + iMiss;
                        if (j == this.peptideQue.Count)
                        {
                            break;
                        }

                        RangeLocation loc2 = this.peptideQue[j];
                        missedList.Add(new DigestRangeLocation(loc.Min, loc2.Max, iMiss + 1));
                    }
                }

                this.peptideQue.AddRange(missedList);
            }
        }
コード例 #2
0
        public void TestParse()
        {
            RangeLocation expect = new RangeLocation(30, 600);

            Assert.AreEqual(expect, RangeLocation.Parse("30-600"));
            Assert.AreEqual(expect, RangeLocation.Parse("30.5, 600.1"));
        }
コード例 #3
0
        public bool Accept(RangeLocation rl)
        {
            string peptide = this.sequence.Substring(rl.Min - 1, rl.Max - rl.Min + 1);

            double mass = this.aminoacids.AveragePeptideMass(peptide);

            return(mass >= this.minWeight && mass <= this.maxWeight);
        }
コード例 #4
0
        public bool Accept(RangeLocation rl)
        {
            string peptide = this.sequence.Substring(rl.Min - 1, rl.Max - rl.Min + 1);

            if (0 <= peptide.IndexOfAny(this.exceptAminoacids))
            {
                return(false);
            }
            return(true);
        }
コード例 #5
0
 public bool Accept(RangeLocation rl)
 {
     for (int index = rl.Min - 1; index <= rl.Max - 1; index++)
     {
         if (this.isNglycan[index])
         {
             return(true);
         }
     }
     return(false);
 }
コード例 #6
0
        public bool Accept(RangeLocation rl)
        {
            foreach (IRangeLocationFilter filter in this.filters)
            {
                if (!filter.Accept(rl))
                {
                    return(false);
                }
            }

            return(true);
        }
コード例 #7
0
 public RangeLocation(RangeLocation source)
 {
     this.min = source.min;
     this.max = source.max;
 }
コード例 #8
0
 public void TestParseExceptionDouble()
 {
     RangeLocation.Parse("3.1.1, 200");
 }
コード例 #9
0
 public void TestParseExceptionRegex()
 {
     RangeLocation.Parse("3");
 }
コード例 #10
0
 public bool Accept(RangeLocation rl)
 {
     return(rl.Max - rl.Min + 1 >= this.minLength);
 }