Esempio n. 1
0
 public void WriteParameterFile(string parameterFilePath, AnalysisOptions options)
 {
     MetaData metaData = new MetaData("PNNLProteomics");
     ReflectParameterOptions(options.MSLinkerOptions,           metaData.OpenChild("MSnLinker"));
     ReflectParameterOptions(options.FeatureFindingOptions,     metaData.OpenChild("LCMSFeatureFinding"));
     ReflectParameterOptions(options.FeatureFilterOptions,      metaData.OpenChild("LCMSFeatureFilters"));
     ReflectParameterOptions(options.MassTagDatabaseOptions,    metaData.OpenChild("MassTagDatabase"));
     ReflectParameterOptions(options.AlignmentOptions,          metaData.OpenChild("Alignment"));
     ReflectParameterOptions(options.DriftTimeAlignmentOptions, metaData.OpenChild("DriftTimeAlignment"));
     ReflectParameterOptions(options.ClusterOptions,            metaData.OpenChild("LCMSFeatureClustering"));
     ReflectParameterOptions(options.STACOptions,               metaData.OpenChild("STAC"));
     ReflectParameterOptions(options.ConsolidationOptions,      metaData.OpenChild("FeatureConsolidator"));
     metaData.WriteFile(parameterFilePath);
 }
Esempio n. 2
0
        public void ReadParameterFile(string parameterFilePath, ref AnalysisOptions options)
        {
            MetaData metaData = new MetaData("PNNLProteomics");
            metaData.ReadFile(parameterFilePath);

            MetaNode msOptions = metaData.OpenChild("MSnLinker", false);
            if (msOptions != null)
            {
                LoadParameterOptions(options.MSLinkerOptions, msOptions);
            }
            LoadParameterOptions(options.MassTagDatabaseOptions, metaData.OpenChild("MassTagDatabase"));
            LoadParameterOptions(options.FeatureFindingOptions, metaData.OpenChild("LCMSFeatureFinding"));
            msOptions = metaData.OpenChild("LCMSFeatureFilters", false);
            if (msOptions != null)
            {
                LoadParameterOptions(options.FeatureFilterOptions, msOptions);
            }
            List<classAlignmentMZBoundary> boundaries                       = options.AlignmentOptions.MZBoundaries;
            LoadParameterOptions(options.AlignmentOptions, metaData.OpenChild("Alignment"));
            if (options.AlignmentOptions.DriftTimeBinSize <= 0)
            {
                options.AlignmentOptions.DriftTimeBinSize = 1;
            }
            options.AlignmentOptions.MZBoundaries                  = boundaries;
            MetaNode node = metaData.OpenChild("DriftTimeAlignment", false);
            if (node != null)
            {
                LoadParameterOptions(options.DriftTimeAlignmentOptions, node);
            }
            LoadParameterOptions(options.ClusterOptions, metaData.OpenChild("LCMSFeatureClustering"));
            MetaNode stacNode = metaData.OpenChild("STAC", false);
            if (stacNode != null)
            {
                LoadParameterOptions(options.STACOptions, stacNode);
            }

            MetaNode consolidatorNode = metaData.OpenChild("FeatureConsolidator", false);
            if (consolidatorNode != null)
            {
                LoadParameterOptions(options.ConsolidationOptions, consolidatorNode);
            }
        }