コード例 #1
0
ファイル: LCMSWarpTest.cs プロジェクト: msdna/MultiAlign
        public void TestCppSetReferenceFeatures(string baselinePath)
        {
            Console.WriteLine(@"I'm Testing!");

            var rawBaselineData = File.ReadAllLines(baselinePath);

            var baseline = new List<UMCLight>();

            foreach (var line in rawBaselineData)
            {
                if (line != "")
                {
                    var parsed = line.Split(',');
                    var data = new UMCLight
                    {
                        Net = Convert.ToDouble(parsed[0]),
                        ChargeState = Convert.ToInt32(parsed[1]),
                        Mz = Convert.ToDouble(parsed[2]),
                        Scan = Convert.ToInt32(parsed[3]),
                        MassMonoisotopic = Convert.ToDouble(parsed[4]),
                        MassMonoisotopicAligned = Convert.ToDouble(parsed[5]),
                        Id = Convert.ToInt32(parsed[6])
                    };
                    baseline.Add(data);
                }
            }

            var oldStyle = new MultiAlignEngine.Alignment.clsAlignmentProcessor();
            var oldBaseline = baseline.Select(baseData => new MultiAlignEngine.Features.clsUMC
            {
                Net = baseData.Net,
                MZForCharge = baseData.Mz,
                Scan = baseData.Scan,
                Mass = baseData.MassMonoisotopic,
                MassCalibrated = baseData.MassMonoisotopicAligned,
                Id = baseData.Id
            }).ToList();

            oldStyle.SetReferenceDatasetFeatures(oldBaseline);
            Console.WriteLine(@"Done testing");
        }
コード例 #2
0
        public void TestCppSetReferenceFeatures(string baselinePath)
        {
            Console.WriteLine(@"I'm Testing!");

            var rawBaselineData = File.ReadAllLines(baselinePath);

            var baseline = new List <UMCLight>();

            foreach (var line in rawBaselineData)
            {
                if (line != "")
                {
                    var parsed = line.Split(',');
                    var data   = new UMCLight
                    {
                        Net                     = Convert.ToDouble(parsed[0]),
                        ChargeState             = Convert.ToInt32(parsed[1]),
                        Mz                      = Convert.ToDouble(parsed[2]),
                        Scan                    = Convert.ToInt32(parsed[3]),
                        MassMonoisotopic        = Convert.ToDouble(parsed[4]),
                        MassMonoisotopicAligned = Convert.ToDouble(parsed[5]),
                        Id                      = Convert.ToInt32(parsed[6])
                    };
                    baseline.Add(data);
                }
            }

            var oldStyle    = new MultiAlignEngine.Alignment.clsAlignmentProcessor();
            var oldBaseline = baseline.Select(baseData => new MultiAlignEngine.Features.clsUMC
            {
                Net            = baseData.Net,
                MZForCharge    = baseData.Mz,
                Scan           = baseData.Scan,
                Mass           = baseData.MassMonoisotopic,
                MassCalibrated = baseData.MassMonoisotopicAligned,
                Id             = baseData.Id
            }).ToList();

            oldStyle.SetReferenceDatasetFeatures(oldBaseline);
            Console.WriteLine(@"Done testing");
        }
コード例 #3
0
        public void TestSetAligneeFeatures(string aligneePath)
        {
            Console.WriteLine(@"I'm Testing!");
            var rawFeaturesData = File.ReadAllLines(aligneePath);

            var features = (from line in rawFeaturesData
                            where line != ""
                            select line.Split(',')
                            into parsed
                            select new UMCLight
            {
                Net = Convert.ToDouble(parsed[0]),
                ChargeState = Convert.ToInt32(parsed[1]),
                Mz = Convert.ToDouble(parsed[2]),
                Scan = Convert.ToInt32(parsed[3]),
                MassMonoisotopic = Convert.ToDouble(parsed[4]),
                MassMonoisotopicAligned = Convert.ToDouble(parsed[5]),
                Id = Convert.ToInt32(parsed[6])
            }).ToList();

            var oldStyle    = new MultiAlignEngine.Alignment.clsAlignmentProcessor();
            var oldFeatures = features.Select(baseData => new MultiAlignEngine.Features.clsUMC
            {
                Net            = baseData.Net,
                MZForCharge    = baseData.Mz,
                Scan           = baseData.Scan,
                Mass           = baseData.MassMonoisotopic,
                MassCalibrated = baseData.MassMonoisotopicAligned,
                Id             = baseData.Id
            }).ToList();

            var oldMzBound = new MultiAlignEngine.Alignment.classAlignmentMZBoundary(0, 9999999.0);

            oldStyle.SetAligneeDatasetFeatures(oldFeatures, oldMzBound);

            Console.WriteLine(@"Done testing");
        }
コード例 #4
0
ファイル: LCMSWarpTest.cs プロジェクト: msdna/MultiAlign
        public void TestSetAligneeFeatures(string aligneePath)
        {
            Console.WriteLine(@"I'm Testing!");
            var rawFeaturesData = File.ReadAllLines(aligneePath);

            var features = (from line in rawFeaturesData
                where line != ""
                select line.Split(',')
                into parsed
                select new UMCLight
                {
                    Net = Convert.ToDouble(parsed[0]),
                    ChargeState = Convert.ToInt32(parsed[1]),
                    Mz = Convert.ToDouble(parsed[2]),
                    Scan = Convert.ToInt32(parsed[3]),
                    MassMonoisotopic = Convert.ToDouble(parsed[4]),
                    MassMonoisotopicAligned = Convert.ToDouble(parsed[5]),
                    Id = Convert.ToInt32(parsed[6])
                }).ToList();

            var oldStyle = new MultiAlignEngine.Alignment.clsAlignmentProcessor();
            var oldFeatures = features.Select(baseData => new MultiAlignEngine.Features.clsUMC
            {
                Net = baseData.Net,
                MZForCharge = baseData.Mz,
                Scan = baseData.Scan,
                Mass = baseData.MassMonoisotopic,
                MassCalibrated = baseData.MassMonoisotopicAligned,
                Id = baseData.Id
            }).ToList();

            var oldMzBound = new MultiAlignEngine.Alignment.classAlignmentMZBoundary(0, 9999999.0);
            oldStyle.SetAligneeDatasetFeatures(oldFeatures, oldMzBound);

            Console.WriteLine(@"Done testing");
        }