Ejemplo n.º 1
0
        public FeatureSet GetFeatures(double mz, Tolerance tolerance, DataReader.FrameType frameType)
        {
            var intensityBlock = _uimfUtil.GetXic(mz, tolerance.GetValue(), frameType,
                                                  tolerance.GetUnit() == ToleranceUnit.Ppm ? DataReader.ToleranceType.PPM : DataReader.ToleranceType.Thomson);
            var features = new FeatureSet(intensityBlock);

            return(features);
        }
Ejemplo n.º 2
0
        public Dictionary <int, FeatureSet> GetFeaturesMultiThreading(int minTargetBin, int maxTargetBin, Tolerance tolerance, DataReader.FrameType frameType)
        {
            var featureDictionary = new Dictionary <int, FeatureSet>();

            var targetMzList = Enumerable.Range(minTargetBin, maxTargetBin - minTargetBin + 1).Select(targetBin => _uimfUtil.GetMzFromBin(targetBin)).ToList();
            var featureStatisticsDictionary = _featureDetectionUtil.GetFeatureStatistics(targetMzList, tolerance.GetValue(), frameType,
                                                                                         tolerance.GetUnit() == ToleranceUnit.Ppm ? DataReader.ToleranceType.PPM : DataReader.ToleranceType.Thomson);

            foreach (var entry in featureStatisticsDictionary)
            {
                var targetBin    = _uimfUtil.GetBinFromMz(entry.Key);
                var featureStats = entry.Value;
                featureDictionary.Add(targetBin, new FeatureSet(featureStats));
            }
            return(featureDictionary);
        }