示例#1
0
 /// <summary>
 /// MaxEnt deconvolution algorithm constructor
 /// </summary>
 /// <param name="tolerance">tolerance</param>
 /// <param name="massBinning">mass binning interface</param>
 /// <param name="minCharge">maximum charge to be considered</param>
 /// <param name="maxCharge">minimum charge to be considered</param>
 /// <param name="minMass">minimum mass to be considered</param>
 /// <param name="maxMass">maximum mass to be considered</param>
 public MaxEntDeconvoluter(Spectrum spec, Tolerance tolerance, MzComparerWithBinning massBinning, int minCharge = 1, int maxCharge = 100, double minMass = 10000, double maxMass = 100000)
 {
     _minCharge            = minCharge;
     _maxCharge            = maxCharge;
     _minMass              = minMass;
     _maxMass              = maxMass;
     _tolerance            = tolerance;
     _massBinning          = massBinning;
     _spectrum             = spec;
     _deconvolutedSpectrum = null;
 }
示例#2
0
        public LcMsChargeMap(LcMsRun run, Tolerance tolerance, int maxNumMs2ScansPerMass = MaxNumMs2ScansPerFeature)
        {
            _run = run;
            _scanToIsolationWindow = new Dictionary <int, IsolationWindow>();
            _maxNumMs2ScansPerMass = maxNumMs2ScansPerMass;

            foreach (var ms2ScanNum in _run.GetScanNumbers(2))
            {
                var isoWindow = _run.GetIsolationWindow(ms2ScanNum);
                if (isoWindow != null)
                {
                    _scanToIsolationWindow.Add(ms2ScanNum, isoWindow);
                }
            }

            _tolerance = tolerance;
            _map       = new Dictionary <int, BitArray>();
            _comparer  = new MzComparerWithBinning(30); // 2 ppm binning

            _sequenceMassBinToScanNumsMap = new Dictionary <int, IEnumerable <int> >();
            _scanNumToMassBin             = new Dictionary <int, List <int> >();
        }