Пример #1
0
        public static void QcDIA(IRawDataPlus rawFile, WorkflowParameters parameters)
        {
            rawFile.SelectInstrument(Device.MS, 1);

            rawFile.CheckIfBoxcar();

            ScanIndex Index = Extract.ScanIndices(rawFile);

            MethodDataContainer methodData = Extract.MethodData(rawFile, Index);

            CentroidStreamCollection centroidStreams = new CentroidStreamCollection();

            SegmentScanCollection segmentScans = new SegmentScanCollection();

            (centroidStreams, segmentScans) = Extract.MsData(rawFile: rawFile, index: Index);

            TrailerExtraCollection trailerExtras = Extract.TrailerExtras(rawFile, Index);

            RetentionTimeCollection retentionTimes = Extract.RetentionTimes(rawFile, Index);

            ScanMetaDataCollectionDIA metaData = MetaDataProcessingDIA.AggregateMetaDataDIA(centroidStreams, segmentScans, methodData,
                                                                                            trailerExtras, retentionTimes, Index);

            RawMetricsDataDIA metrics = MetaDataProcessingDIA.GetMetricsDataDIA(metaData, methodData, rawFile.FileName, retentionTimes, Index);

            QcDataContainer qcData = new QcDataContainer();

            qcData.DIA = metrics;

            QcDataCollection qcDataCollection = QC.QcWorkflow.LoadOrCreateQcCollection(parameters);

            QC.QcWorkflow.UpdateQcCollection(qcDataCollection, qcData, methodData, rawFile.FileName);
        }
Пример #2
0
        public static void ParseDIA(IRawFileThreadManager rawFile, WorkflowParameters parameters)
        {
            var staticRawFile = rawFile.CreateThreadAccessor();

            staticRawFile.SelectInstrument(Device.MS, 1);

            staticRawFile.CheckIfBoxcar();

            ScanIndex Index = Extract.ScanIndices(rawFile.CreateThreadAccessor());

            TrailerExtraCollection trailerExtras = Extract.TrailerExtras(rawFile.CreateThreadAccessor(), Index);

            MethodDataContainer methodData = Extract.MethodData(rawFile.CreateThreadAccessor(), Index);

            PrecursorScanCollection precursorScans = Extract.PrecursorScansByMasterScanMs2Only(rawFile.CreateThreadAccessor(), trailerExtras, Index);

            (CentroidStreamCollection centroidStreams, SegmentScanCollection segmentScans) =
                Extract.MsData(rawFile: rawFile.CreateThreadAccessor(), index: Index);

            RetentionTimeCollection retentionTimes = Extract.RetentionTimes(rawFile.CreateThreadAccessor(), Index);

            ScanMetaDataCollectionDIA metaData = MetaDataProcessingDIA.AggregateMetaDataDIA(centroidStreams, segmentScans, methodData,
                                                                                            trailerExtras, retentionTimes, Index);

            RawMetricsDataDIA metrics = null;

            if (parameters.ParseParams.Metrics)
            {
                metrics = MetaDataProcessingDIA.GetMetricsDataDIA(metaData, methodData, staticRawFile.FileName, retentionTimes, Index);
                MetricsWriter.WriteMatrix(metrics, staticRawFile.FileName, parameters.ParseParams.OutputDirectory);
            }

            if (parameters.ParseParams.Parse)
            {
                string matrixFileName = ReadWrite.GetPathToFile(parameters.ParseParams.OutputDirectory, staticRawFile.FileName, "._parse.txt");

                //MatrixWriter.ParseQuantDIA()

                //ParseWriter writerDIA = new ParseWriter(matrixFileName, centroidStreams, segmentScans, metaData,
                //    retentionTimes, trailerExtras, precursorScans, Index);
                //writerDIA.WriteMatrixDIA();
            }

            // I'm not sure what goes into a DIA mgf file, so we aren't making one yet
            //if (parameters.ParseParams.WriteMgf)
            //{
            //    ParseWriter writerMGF = new ParseWriter(centroidStreams, segmentScans, parameters, retentionTimes, precursorMasses, precursorScans, trailerExtras, methodData, Index);
            //    writerMGF.WriteMGF(staticRawFile.FileName);
            //}
        }