Ejemplo n.º 1
0
        public TopDownScorer(Composition proteinComposition, LcMsRun run, Tolerance tolernace, SubScoreFactory factory)
        {
            _run = run;
            _proteinCompositionPlusWater = proteinComposition + Composition.H2O;
            _tolerance = tolernace;
            _factory   = factory;

            _maxIntensityIsotopeIndex = _proteinCompositionPlusWater.GetMostAbundantIsotopeZeroBasedIndex();
            var thorethicalIsotopeEnvelope = _proteinCompositionPlusWater.GetIsotopomerEnvelopeRelativeIntensities();



            _minIsotopeIndex = 0;
            for (var i = 0; i < thorethicalIsotopeEnvelope.Length; i++)
            {
                if (!(thorethicalIsotopeEnvelope[i] > MinIsotopeIntensity))
                {
                    continue;
                }
                _minIsotopeIndex = i;
                break;
            }

            _isotopeEnvelope = new double[Math.Min(_maxIntensityIsotopeIndex + NumberAfterMaxIsotopeIndex, thorethicalIsotopeEnvelope.Length) - _minIsotopeIndex];
            for (var k = 0; k < _isotopeEnvelope.Length; k++)
            {
                _isotopeEnvelope[k] = thorethicalIsotopeEnvelope[k + _minIsotopeIndex];
            }

            /*foreach (var iso in thorethicalIsotopeEnvelope)
             * {
             *  Console.WriteLine(iso);
             * }
             * Console.WriteLine();
             * foreach (var iso in _isotopeEnvelope)
             * {
             *  Console.WriteLine(iso);
             * }
             *
             * System.Environment.Exit(1);
             */
            _xicArray         = GetXicArray();
            _smoothedXicArray = GetSmoothedXicArray();
        }
Ejemplo n.º 2
0
        public TopDownScorer(Composition proteinComposition, LcMsRun run, Tolerance tolernace, SubScoreFactory factory)
        {
            _run = run;
            _proteinCompositionPlusWater = proteinComposition + Composition.H2O;
            _tolerance = tolernace;
            _factory = factory;

            _maxIntensityIsotopeIndex = _proteinCompositionPlusWater.GetMostAbundantIsotopeZeroBasedIndex();
            var thorethicalIsotopeEnvelope = _proteinCompositionPlusWater.GetIsotopomerEnvelopeRelativeIntensities();

            

            _minIsotopeIndex = 0;
            for (var i = 0; i < thorethicalIsotopeEnvelope.Length; i++)
            {
                if (!(thorethicalIsotopeEnvelope[i] > MinIsotopeIntensity)) continue;
                _minIsotopeIndex = i;
                break;
            }

            _isotopeEnvelope = new double[Math.Min(_maxIntensityIsotopeIndex + NumberAfterMaxIsotopeIndex, thorethicalIsotopeEnvelope.Length) - _minIsotopeIndex];
            for (var k = 0; k < _isotopeEnvelope.Length; k++)
            {
                _isotopeEnvelope[k] = thorethicalIsotopeEnvelope[k + _minIsotopeIndex];
            }

            /*foreach (var iso in thorethicalIsotopeEnvelope)
            {
                Console.WriteLine(iso);
            }
            Console.WriteLine();
            foreach (var iso in _isotopeEnvelope)
            {
                Console.WriteLine(iso);
            }
            
            System.Environment.Exit(1);
            */
            _xicArray = GetXicArray();
            _smoothedXicArray = GetSmoothedXicArray();
        }
Ejemplo n.º 3
0
 public TopDownScorer(Composition proteinComposition, LcMsRun run, Tolerance tolerance, SubScoreFactory factory) : this(proteinComposition, run, tolerance)
 {
 }