Ejemplo n.º 1
0
        public static List <LcMsFeature> LoadProMexResult(int dataId, string featureFilePath, LcMsRun run, double minMass = 2000, double maxMass = 50000)
        {
            var featureList = new List <LcMsFeature>();

            var totalDatasetRunTime = run.GetElutionTime(run.MaxLcScan);

            foreach (var entry in Ms1FtEntry.ReadFromFile(featureFilePath, false))
            {
                if (entry.MonoMass < minMass || maxMass < entry.MonoMass)
                {
                    continue;
                }

                var feature = entry.ToLcMsFeature(totalDatasetRunTime);
                feature.DataSetId = dataId;

                featureList.Add(feature);
            }

            return(featureList);
        }
Ejemplo n.º 2
0
        private void Read(string ms1FtFileName)
        {
            var featureCountFiltered = 0;
            var totalFeatureCount    = 0;

            foreach (var entry in Ms1FtEntry.ReadFromFile(ms1FtFileName))
            {
                totalFeatureCount++;

                if (entry.LikelihoodRatio < _minLikelihoodRatio)
                {
                    continue;
                }

                featureCountFiltered++;
                _lcMsChargeMap.SetMatches(entry.FeatureId, entry.MonoMass, entry.MinScan, entry.MaxScan, entry.RepresentativeScan, entry.MinCharge, entry.MaxCharge);
                Ms1FtIndexToScanRange.Add(entry.FeatureId, new Tuple <int, int>(entry.MinScan, entry.MaxScan));
            }

            // NOTE: The DMS Analysis Manager looks for this statistic; do not change it
            Console.Write(@"{0}/{1} features loaded...", featureCountFiltered, totalFeatureCount);
            _lcMsChargeMap.CreateMassToScanNumMap();
        }