/// <summary>
        /// Create an object using the contents of the corresponding MzIdentML object
        /// </summary>
        /// <param name="ac"></param>
        /// <param name="idata"></param>
        public AnalysisCollectionObj(AnalysisCollectionType ac, IdentDataObj idata)
            : base(idata)
        {
            SpectrumIdentifications = new IdentDataList <SpectrumIdentificationObj>(1);
            _proteinDetection       = null;

            idata.AnalysisCollection = this;

            if (ac.SpectrumIdentification?.Count > 0)
            {
                SpectrumIdentifications.AddRange(ac.SpectrumIdentification, si => new SpectrumIdentificationObj(si, IdentData));
            }
            if (ac.ProteinDetection != null)
            {
                ProteinDetection = new ProteinDetectionObj(ac.ProteinDetection, IdentData);
            }
        }
Beispiel #2
0
        /// <summary>
        ///     Create an object using the contents of the corresponding MzIdentML object
        /// </summary>
        /// <param name="ac"></param>
        /// <param name="idata"></param>
        public AnalysisCollectionObj(AnalysisCollectionType ac, IdentDataObj idata)
            : base(idata)
        {
            _spectrumIdentifications = null;
            _proteinDetection        = null;

            idata.AnalysisCollection = this;

            if (ac.SpectrumIdentification != null && ac.SpectrumIdentification.Count > 0)
            {
                SpectrumIdentifications = new IdentDataList <SpectrumIdentificationObj>();
                foreach (var si in ac.SpectrumIdentification)
                {
                    SpectrumIdentifications.Add(new SpectrumIdentificationObj(si, IdentData));
                }
            }
            if (ac.ProteinDetection != null)
            {
                ProteinDetection = new ProteinDetectionObj(ac.ProteinDetection, IdentData);
            }
        }