/// <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);
            }
        }
Example #2
0
        /// <summary>
        /// Create an object using the contents of the corresponding MzIdentML object
        /// </summary>
        /// <param name="sd"></param>
        /// <param name="idata"></param>
        public SearchDatabaseInfo(SearchDatabaseType sd, IdentDataObj idata)
            : base(sd, idata)
        {
            Id                            = sd.id;
            Name                          = sd.name;
            Version                       = sd.version;
            _releaseDate                  = sd.releaseDate;
            ReleaseDateSpecified          = sd.releaseDateSpecified;
            _numDatabaseSequences         = sd.numDatabaseSequences;
            NumDatabaseSequencesSpecified = sd.numDatabaseSequencesSpecified;
            _numResidues                  = sd.numResidues;
            NumResiduesSpecified          = sd.numResiduesSpecified;
            ExternalFormatDocumentation   = sd.ExternalFormatDocumentation;
            Location                      = sd.location;

            _databaseName = null;
            _fileFormat   = null;

            if (sd.DatabaseName != null)
            {
                _databaseName = new ParamObj(sd.DatabaseName, IdentData);
            }
            if (sd.FileFormat != null)
            {
                _fileFormat = new FileFormatInfo(sd.FileFormat, IdentData);
            }
        }
Example #3
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);
        }
Example #4
0
        /// <summary>
        ///     Constructor
        /// </summary>
        public AnalysisSoftwareObj()
        {
            Id             = null;
            Name           = null;
            Customizations = null;
            Version        = null;
            URI            = null;

            _contactRole  = null;
            _softwareName = null;
        }
Example #5
0
        /// <summary>
        /// Constructor
        /// </summary>
        public SearchDatabaseInfo()
        {
            Id                            = null;
            Name                          = null;
            Version                       = null;
            _releaseDate                  = DateTime.Now;
            ReleaseDateSpecified          = false;
            _numDatabaseSequences         = -1;
            NumDatabaseSequencesSpecified = false;
            _numResidues                  = -1;
            NumResiduesSpecified          = false;
            ExternalFormatDocumentation   = null;
            Location                      = null;

            _databaseName = null;
            _fileFormat   = 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;
        }
Example #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);
            }
        }
Example #8
0
        /// <summary>
        ///     Create an object using the contents of the corresponding MzIdentML object
        /// </summary>
        /// <param name="asi"></param>
        /// <param name="idata"></param>
        public AnalysisSoftwareObj(AnalysisSoftwareType asi, IdentDataObj idata)
            : base(idata)
        {
            Id             = asi.id;
            Name           = asi.name;
            Customizations = asi.Customizations;
            Version        = asi.version;
            URI            = asi.uri;

            _contactRole  = null;
            _softwareName = null;

            if (asi.ContactRole != null)
            {
                _contactRole = new ContactRoleObj(asi.ContactRole, IdentData);
            }
            if (asi.SoftwareName != null)
            {
                _softwareName = new ParamObj(asi.SoftwareName, IdentData);
            }
        }
Example #9
0
 /// <summary>
 ///     Constructor
 /// </summary>
 public FilterInfo()
 {
     _filterType = null;
     _include    = null;
     _exclude    = null;
 }