/// <summary>
        /// Create an object using the contents of the corresponding MzIdentML object
        /// </summary>
        /// <param name="sip"></param>
        /// <param name="idata"></param>
        public SpectrumIdentificationProtocolObj(SpectrumIdentificationProtocolType sip, IdentDataObj idata)
            : base(idata)
        {
            Id   = sip.id;
            Name = sip.name;
            AnalysisSoftwareRef = sip.analysisSoftware_ref;

            _searchType             = null;
            _additionalSearchParams = null;
            _enzymes             = null;
            _threshold           = null;
            _databaseTranslation = null;

            ModificationParams = new IdentDataList <SearchModificationObj>(1);
            MassTables         = new IdentDataList <MassTableObj>(1);
            FragmentTolerances = new IdentDataList <CVParamObj>(1);
            ParentTolerances   = new IdentDataList <CVParamObj>(1);
            DatabaseFilters    = new IdentDataList <FilterInfo>(1);

            if (sip.SearchType != null)
            {
                _searchType = new ParamObj(sip.SearchType, IdentData);
            }
            if (sip.AdditionalSearchParams != null)
            {
                _additionalSearchParams = new ParamListObj(sip.AdditionalSearchParams, IdentData);
            }
            if (sip.ModificationParams?.Count > 0)
            {
                ModificationParams.AddRange(sip.ModificationParams, mp => new SearchModificationObj(mp, IdentData));
            }
            if (sip.Enzymes != null)
            {
                _enzymes = new EnzymeListObj(sip.Enzymes, IdentData);
            }
            if (sip.MassTable?.Count > 0)
            {
                MassTables.AddRange(sip.MassTable, mt => new MassTableObj(mt, IdentData));
            }
            if (sip.FragmentTolerance?.Count > 0)
            {
                FragmentTolerances.AddRange(sip.FragmentTolerance, ft => new CVParamObj(ft, IdentData));
            }
            if (sip.ParentTolerance?.Count > 0)
            {
                ParentTolerances.AddRange(sip.ParentTolerance, pt => new CVParamObj(pt, IdentData));
            }
            if (sip.Threshold != null)
            {
                _threshold = new ParamListObj(sip.Threshold, IdentData);
            }
            if (sip.DatabaseFilters?.Count > 0)
            {
                DatabaseFilters.AddRange(sip.DatabaseFilters, df => new FilterInfo(df, IdentData));
            }
            if (sip.DatabaseTranslation != null)
            {
                _databaseTranslation = new DatabaseTranslationObj(sip.DatabaseTranslation, IdentData);
            }
        }
示例#2
0
        /// <summary>
        ///     Create an object using the contents of the corresponding MzIdentML object
        /// </summary>
        /// <param name="sip"></param>
        /// <param name="idata"></param>
        public SpectrumIdentificationProtocolObj(SpectrumIdentificationProtocolType sip, IdentDataObj idata)
            : base(idata)
        {
            Id = sip.id;
            Name = sip.name;
            AnalysisSoftwareRef = sip.analysisSoftware_ref;

            _searchType = null;
            _additionalSearchParams = null;
            _modificationParams = null;
            _enzymes = null;
            _massTables = null;
            _fragmentTolerances = null;
            _parentTolerances = null;
            _threshold = null;
            _databaseFilters = null;
            _databaseTranslation = null;

            if (sip.SearchType != null)
                _searchType = new ParamObj(sip.SearchType, IdentData);
            if (sip.AdditionalSearchParams != null)
                _additionalSearchParams = new ParamListObj(sip.AdditionalSearchParams, IdentData);
            if ((sip.ModificationParams != null) && (sip.ModificationParams.Count > 0))
            {
                ModificationParams = new IdentDataList<SearchModificationObj>();
                foreach (var mp in sip.ModificationParams)
                    ModificationParams.Add(new SearchModificationObj(mp, IdentData));
            }
            if (sip.Enzymes != null)
                _enzymes = new EnzymeListObj(sip.Enzymes, IdentData);
            if ((sip.MassTable != null) && (sip.MassTable.Count > 0))
            {
                MassTables = new IdentDataList<MassTableObj>();
                foreach (var mt in sip.MassTable)
                    MassTables.Add(new MassTableObj(mt, IdentData));
            }
            if ((sip.FragmentTolerance != null) && (sip.FragmentTolerance.Count > 0))
            {
                FragmentTolerances = new IdentDataList<CVParamObj>();
                foreach (var ft in sip.FragmentTolerance)
                    FragmentTolerances.Add(new CVParamObj(ft, IdentData));
            }
            if (sip.ParentTolerance != null)
            {
                ParentTolerances = new IdentDataList<CVParamObj>();
                foreach (var pt in sip.ParentTolerance)
                    ParentTolerances.Add(new CVParamObj(pt, IdentData));
            }
            if (sip.Threshold != null)
                _threshold = new ParamListObj(sip.Threshold, IdentData);
            if ((sip.DatabaseFilters != null) && (sip.DatabaseFilters.Count > 0))
            {
                DatabaseFilters = new IdentDataList<FilterInfo>();
                foreach (var df in sip.DatabaseFilters)
                    DatabaseFilters.Add(new FilterInfo(df, IdentData));
            }
            if (sip.DatabaseTranslation != null)
                _databaseTranslation = new DatabaseTranslationObj(sip.DatabaseTranslation, IdentData);
        }
示例#3
0
        /// <summary>
        /// Constructor
        /// </summary>
        public ProteinDetectionProtocolObj()
        {
            Id   = null;
            Name = null;
            _analysisSoftwareRef = null;

            _analysisSoftware = null;
            _analysisParams   = null;
            _threshold        = null;
        }
示例#4
0
        /// <summary>
        ///     Constructor
        /// </summary>
        public EnzymeObj()
        {
            Id                       = null;
            Name                     = null;
            SiteRegexp               = null;
            NTermGain                = null;
            CTermGain                = null;
            _semiSpecific            = false;
            SemiSpecificSpecified    = false;
            _missedCleavages         = -1;
            MissedCleavagesSpecified = false;
            _minDistance             = -1;
            MinDistanceSpecified     = false;

            _enzymeName = null;
        }
        /// <summary>
        /// Constructor
        /// </summary>
        public SpectrumIdentificationProtocolObj()
        {
            Id   = null;
            Name = null;
            _analysisSoftwareRef = null;

            _analysisSoftware       = null;
            _searchType             = null;
            _additionalSearchParams = null;
            ModificationParams      = new IdentDataList <SearchModificationObj>(1);
            _enzymes             = null;
            MassTables           = new IdentDataList <MassTableObj>(1);
            FragmentTolerances   = new IdentDataList <CVParamObj>(1);
            ParentTolerances     = new IdentDataList <CVParamObj>(1);
            _threshold           = null;
            DatabaseFilters      = new IdentDataList <FilterInfo>(1);
            _databaseTranslation = null;
        }
示例#6
0
        /// <summary>
        /// Create an object using the contents of the corresponding MzIdentML object
        /// </summary>
        /// <param name="pdp"></param>
        /// <param name="idata"></param>
        public ProteinDetectionProtocolObj(ProteinDetectionProtocolType pdp, IdentDataObj idata)
            : base(idata)
        {
            Id   = pdp.id;
            Name = pdp.name;
            AnalysisSoftwareRef = pdp.analysisSoftware_ref;

            _analysisParams = null;
            _threshold      = null;

            if (pdp.AnalysisParams != null)
            {
                _analysisParams = new ParamListObj(pdp.AnalysisParams, IdentData);
            }
            if (pdp.Threshold != null)
            {
                _threshold = new ParamListObj(pdp.Threshold, IdentData);
            }
        }
示例#7
0
        /// <summary>
        ///     Create an object using the contents of the corresponding MzIdentML object
        /// </summary>
        /// <param name="f"></param>
        /// <param name="idata"></param>
        public FilterInfo(FilterType f, IdentDataObj idata)
            : base(idata)
        {
            _filterType = null;
            _include    = null;
            _exclude    = null;

            if (f.FilterType1 != null)
            {
                _filterType = new ParamObj(f.FilterType1, IdentData);
            }
            if (f.Include != null)
            {
                _include = new ParamListObj(f.Include, IdentData);
            }
            if (f.Exclude != null)
            {
                _exclude = new ParamListObj(f.Exclude, IdentData);
            }
        }
示例#8
0
        /// <summary>
        ///     Create an object using the contents of the corresponding MzIdentML object
        /// </summary>
        /// <param name="e"></param>
        /// <param name="idata"></param>
        public EnzymeObj(EnzymeType e, IdentDataObj idata)
            : base(idata)
        {
            Id                       = e.id;
            Name                     = e.name;
            SiteRegexp               = e.SiteRegexp;
            NTermGain                = e.nTermGain;
            CTermGain                = e.cTermGain;
            _semiSpecific            = e.semiSpecific;
            SemiSpecificSpecified    = e.semiSpecificSpecified;
            _missedCleavages         = e.missedCleavages;
            MissedCleavagesSpecified = e.missedCleavagesSpecified;
            _minDistance             = e.minDistance;
            MinDistanceSpecified     = e.minDistanceSpecified;

            _enzymeName = null;

            if (e.EnzymeName != null)
            {
                _enzymeName = new ParamListObj(e.EnzymeName, IdentData);
            }
        }
示例#9
0
 /// <summary>
 ///     Constructor
 /// </summary>
 public FilterInfo()
 {
     _filterType = null;
     _include    = null;
     _exclude    = null;
 }