Ejemplo n.º 1
0
        public int[] GetSequenceCoverage(IEnumerable <Peptide> peptides, bool includePSMcounts = false)
        {
            int[] bits = new int[Length];

            foreach (Peptide pep in peptides)
            {
                int start_index = 0;
                while (true)
                {
                    int index = LeucineSequence.IndexOf(pep.LeucineSequence, start_index);
                    start_index = index + 1;
                    if (index < 0)
                    {
                        break;
                    }

                    for (int aa = index; aa < index + pep.Length; aa++)
                    {
                        if (includePSMcounts)
                        {
                            bits[aa] += pep.PSMs.Count;
                        }
                        else
                        {
                            bits[aa]++;
                        }
                    }
                }
            }
            return(bits);
        }
Ejemplo n.º 2
0
 public bool Equals(Peptide other)
 {
     return(ReferenceEquals(this, other) || LeucineSequence.Equals(other.LeucineSequence));
 }
Ejemplo n.º 3
0
 public int FindStopResidue(string sequence)
 {
     return(LeucineSequence.IndexOf(sequence) + sequence.Length);
 }
Ejemplo n.º 4
0
 public int FindStartResidue(string sequence)
 {
     return(LeucineSequence.IndexOf(sequence) + 1);
 }