public void Execute(Run run)
        {
            Check.Require(run != null, "'Run' has not be defined");
            Check.Require(run.Filename != null &&
                          run.Filename.Length > 0, "MS data file ('run') has not been initialized");
            //Check.Require(run.ScanSetCollection != null && run.ScanSetCollection.ScanSetList.Count > 0, "ChromAligner failed. ScanSets have not been defined.");

            if (m_targetUMCFileStoringAlignmentInfo == null)
            {
                var baseFileName = Path.Combine(run.DataSetPath, run.DatasetName);
                m_targetUMCFileStoringAlignmentInfo = baseFileName + "_UMCs.txt";
            }
            Check.Require(File.Exists(m_targetUMCFileStoringAlignmentInfo), "ChromAligner failed. The UMC file from which alignment data is extracted does not exist.");

            var umcs = new UMCCollection();

            var importer = new UMCFileImporter(m_targetUMCFileStoringAlignmentInfo, '\t');

            umcs = importer.Import();

            var scannetPairs = umcs.GetScanNETLookupTable();

            run.NetAlignmentInfo = new NetAlignmentInfoBasic(run.MinLCScan, run.MaxLCScan);
            run.NetAlignmentInfo.SetScanToNETAlignmentData(scannetPairs);
        }
Exemplo n.º 2
0
        public void importUMCsWithO16O18PairedDataTest1()
        {
            UMCCollection   umcs     = new UMCCollection();
            UMCFileImporter importer = new UMCFileImporter(umcO16O18TestFile1, '\t');

            importer.Import(umcs);

            Assert.AreEqual(23073, umcs.UMCList.Count);
        }
Exemplo n.º 3
0
        public void importUMCsTest1()
        {
            UMCCollection   umcs     = new UMCCollection();
            UMCFileImporter importer = new UMCFileImporter(umcTestfile1, '\t');

            importer.Import(umcs);

            Assert.AreEqual(15381, umcs.UMCList.Count);
        }
Exemplo n.º 4
0
        public void filterUMCsByMassTagsTest2()
        {
            UMCCollection   umcs     = new UMCCollection();
            UMCFileImporter importer = new UMCFileImporter(umcO16O18TestFile1, '\t');

            importer.Import(umcs);


            UMCCollection filteredUMCs = new UMCCollection();

            filteredUMCs.UMCList = umcs.FilterUMCsByMassTagMatch(new List <int> {
                22807265, 22580887, 20791942, 20791939, 20750857, 20908613, 20842966, 22598396, 174124103
            });

            Assert.AreEqual(8, filteredUMCs.UMCList.Count);

            filteredUMCs.DisplayUMCExpressionInfo();
        }
Exemplo n.º 5
0
        public void filterOutPairedUMCsTest1()
        {
            UMCCollection   umcs     = new UMCCollection();
            UMCFileImporter importer = new UMCFileImporter(umcO16O18TestFile1, '\t');

            importer.Import(umcs);


            UMCCollection filteredUMCs = new UMCCollection();

            filteredUMCs.UMCList = umcs.FilterOutPairedData();



            Assert.AreEqual(1734, filteredUMCs.UMCList.Count);



            filteredUMCs.DisplayUMCExpressionInfo();
        }
Exemplo n.º 6
0
        public void umcTest2()
        {
            UMCCollection   umcs     = new UMCCollection();
            UMCFileImporter importer = new UMCFileImporter(umcTestfile1, '\t');

            importer.Import(umcs);

            Stopwatch sw = new Stopwatch();

            sw.Start();

            Dictionary <int, double> lookupTable = umcs.GetScanNETLookupTable();

            sw.Stop();

            double netVal = lookupTable[6005];

            netVal = lookupTable[6004];
            Console.Write(sw.ElapsedMilliseconds);
            Assert.AreEqual(0.3216, netVal);
        }