示例#1
0
        private double GetProductIonScore(ScoringGraphNode node, ImsScorer imsScorer, Feature precursorFeature)
        {
            //Console.Write("Offset: " + node.Offset);
            double cutScore = 0;

            if (node.Index > 1 && node.Index <= _aminoAcidSequence.Length - 3)
            {
                var nTermAA = _aminoAcidSequence[node.Index].Residue;
                var cTermAA = _aminoAcidSequence[node.Index + 1].Residue;
                cutScore = imsScorer.GetCutScore(nTermAA, cTermAA, node.Composition, precursorFeature);
                //Console.WriteLine(" " + _aminoAcidSequence[node.Offset].Residue + " " + node.Composition + " " + _aminoAcidSequence[node.Offset + 1].Residue + " " + cutScore);
            }
            //Console.WriteLine();

            if (node.Index > _aminoAcidSequence.Length - 3)
            {
                return(0);
            }
            var nextNodeScore = node.GetNextNodes().DefaultIfEmpty().Max(nextNode => GetProductIonScore(nextNode, imsScorer, precursorFeature));

            return(cutScore + nextNodeScore);
        }
示例#2
0
        private double GetProductIonScore(ScoringGraphNode node, ImsScorer imsScorer, Feature precursorFeature)
        {
            //Console.Write("Offset: " + node.Offset);
            double cutScore = 0;
            if (node.Index > 1 && node.Index <= _aminoAcidSequence.Length-3)
            {
                var nTermAA = _aminoAcidSequence[node.Index].Residue;
                var cTermAA = _aminoAcidSequence[node.Index + 1].Residue;
                cutScore = imsScorer.GetCutScore(nTermAA, cTermAA, node.Composition, precursorFeature);
                //Console.WriteLine(" " + _aminoAcidSequence[node.Offset].Residue + " " + node.Composition + " " + _aminoAcidSequence[node.Offset + 1].Residue + " " + cutScore);
            }
            //Console.WriteLine();

            if (node.Index > _aminoAcidSequence.Length - 3)
                return 0;
            var nextNodeScore = node.GetNextNodes().DefaultIfEmpty().Max(nextNode => GetProductIonScore(nextNode, imsScorer, precursorFeature));
            return cutScore + nextNodeScore;
        }
示例#3
0
 private double GetProductIonScore(ImsScorer imsScorer, Feature precursorFeature)
 {
     return GetProductIonScore(_rootNode, imsScorer, precursorFeature);
 }
示例#4
0
 private double GetProductIonScore(ImsScorer imsScorer, Feature precursorFeature)
 {
     return(GetProductIonScore(_rootNode, imsScorer, precursorFeature));
 }