Example #1
0
        private void RebuildSearchDatabaseList()
        {
            _searchDbIdCounter = 0;
            _searchDatabases.Clear();

            foreach (var dbSeq in IdentData.SequenceCollection.DBSequences)
            {
                if (_searchDatabases.Any(item => item.Equals(dbSeq.SearchDatabase)))
                {
                    continue;
                }

                dbSeq.SearchDatabase.Id = "SearchDB_" + _searchDbIdCounter;
                _searchDbIdCounter++;
                _searchDatabases.Add(dbSeq.SearchDatabase);
            }

            foreach (var specId in IdentData.AnalysisCollection.SpectrumIdentifications)
            {
                foreach (var dbSeq in specId.SearchDatabases)
                {
                    if (_searchDatabases.Any(item => item.Equals(dbSeq.SearchDatabase)))
                    {
                        continue;
                    }

                    dbSeq.SearchDatabase.Id = "SearchDB_" + _searchDbIdCounter;
                    _searchDbIdCounter++;
                    _searchDatabases.Add(dbSeq.SearchDatabase);
                }
            }
        }
Example #2
0
        private void RebuildSpectraDataList()
        {
            _specDataIdCounter = 0;
            _spectraDataList.Clear();

            foreach (var sil in IdentData.DataCollection.AnalysisData.SpectrumIdentificationList)
            {
                foreach (var spectraData in sil.SpectrumIdentificationResults)
                {
                    if (_spectraDataList.Any(item => item.Equals(spectraData.SpectraData)))
                    {
                        continue;
                    }

                    spectraData.SpectraData.Id = "SID_" + _specDataIdCounter;
                    _specDataIdCounter++;
                    _spectraDataList.Add(spectraData.SpectraData);
                }
            }

            foreach (var specId in IdentData.AnalysisCollection.SpectrumIdentifications)
            {
                foreach (var spectraData in specId.InputSpectra)
                {
                    if (_spectraDataList.Any(item => item.Equals(spectraData.SpectraData)))
                    {
                        continue;
                    }

                    spectraData.SpectraData.Id = "SID_" + _specDataIdCounter;
                    _specDataIdCounter++;
                    _spectraDataList.Add(spectraData.SpectraData);
                }
            }
        }
Example #3
0
        private void RebuildPeptideList()
        {
            _pepIdCounter = 0;
            _peptides.Clear();

            foreach (var sil in IdentData.DataCollection.AnalysisData.SpectrumIdentificationList)
            {
                foreach (var sir in sil.SpectrumIdentificationResults)
                {
                    foreach (var sii in sir.SpectrumIdentificationItems)
                    {
                        if (_peptides.Any(item => item.Equals(sii.Peptide)))
                        {
                            continue;
                        }

                        sii.Peptide.Id = "Pep_" + _pepIdCounter;
                        _pepIdCounter++;
                        _peptides.Add(sii.Peptide);
                    }
                }
            }

            foreach (var pepEv in _peptideEvidences)
            {
                if (_peptides.Any(item => item.Equals(pepEv.Peptide)))
                {
                    continue;
                }

                pepEv.Peptide.Id = "Pep_" + _pepIdCounter;
                _pepIdCounter++;
                _peptides.Add(pepEv.Peptide);
            }
        }
Example #4
0
        /// <summary>
        ///     Create an object using the contents of the corresponding MzIdentML object
        /// </summary>
        /// <param name="si"></param>
        /// <param name="idata"></param>
        public SpectrumIdentificationObj(SpectrumIdentificationType si, IdentDataObj idata)
            : base(si, idata)
        {
            SpectrumIdentificationProtocolRef = si.spectrumIdentificationProtocol_ref;
            SpectrumIdentificationListRef     = si.spectrumIdentificationList_ref;

            _inputSpectra    = null;
            _searchDatabases = null;

            if ((si.InputSpectra != null) && (si.InputSpectra.Count > 0))
            {
                InputSpectra = new IdentDataList <InputSpectraRefObj>();
                foreach (var ispec in si.InputSpectra)
                {
                    InputSpectra.Add(new InputSpectraRefObj(ispec, IdentData));
                }
            }
            if ((si.SearchDatabaseRef != null) && (si.SearchDatabaseRef.Count > 0))
            {
                SearchDatabases = new IdentDataList <SearchDatabaseRefObj>();
                foreach (var sd in si.SearchDatabaseRef)
                {
                    SearchDatabases.Add(new SearchDatabaseRefObj(sd, IdentData));
                }
            }
        }
Example #5
0
        /// <summary>
        ///     Create an object using the contents of the corresponding MzIdentML object
        /// </summary>
        /// <param name="i"></param>
        /// <param name="idata"></param>
        public InputsObj(InputsType i, IdentDataObj idata)
            : base(idata)
        {
            _sourceFiles     = null;
            _searchDatabases = null;
            _spectraDataList = null;

            if ((i.SourceFile != null) && (i.SourceFile.Count > 0))
            {
                SourceFiles = new IdentDataList <SourceFileInfo>();
                foreach (var sf in i.SourceFile)
                {
                    SourceFiles.Add(new SourceFileInfo(sf, IdentData));
                }
            }
            if ((i.SearchDatabase != null) && (i.SearchDatabase.Count > 0))
            {
                SearchDatabases = new IdentDataList <SearchDatabaseInfo>();
                foreach (var sd in i.SearchDatabase)
                {
                    SearchDatabases.Add(new SearchDatabaseInfo(sd, IdentData));
                }
            }
            if ((i.SpectraData != null) && (i.SpectraData.Count > 0))
            {
                SpectraDataList = new IdentDataList <SpectraDataObj>();
                foreach (var sd in i.SpectraData)
                {
                    SpectraDataList.Add(new SpectraDataObj(sd, IdentData));
                }
            }
        }
Example #6
0
        /// <summary>
        ///     Create an object using the contents of the corresponding MzIdentML object
        /// </summary>
        /// <param name="sc"></param>
        /// <param name="idata"></param>
        public SequenceCollectionObj(SequenceCollectionType sc, IdentDataObj idata)
            : base(idata)
        {
            _dBSequences      = null;
            _peptides         = null;
            _peptideEvidences = null;

            idata.SequenceCollection = this;

            if ((sc.DBSequence != null) && (sc.DBSequence.Count > 0))
            {
                DBSequences = new IdentDataList <DbSequenceObj>();
                foreach (var dbs in sc.DBSequence)
                {
                    DBSequences.Add(new DbSequenceObj(dbs, IdentData));
                }
            }
            if ((sc.Peptide != null) && (sc.Peptide.Count > 0))
            {
                Peptides = new IdentDataList <PeptideObj>();
                foreach (var p in sc.Peptide)
                {
                    Peptides.Add(new PeptideObj(p, IdentData));
                }
            }
            if ((sc.PeptideEvidence != null) && (sc.PeptideEvidence.Count > 0))
            {
                PeptideEvidences = new IdentDataList <PeptideEvidenceObj>();
                foreach (var pe in sc.PeptideEvidence)
                {
                    PeptideEvidences.Add(new PeptideEvidenceObj(pe, IdentData));
                }
            }
        }
Example #7
0
        /// <summary>
        ///     Create an object using the contents of the corresponding MzIdentML object
        /// </summary>
        /// <param name="s"></param>
        /// <param name="idata"></param>
        public SampleObj(SampleType s, IdentDataObj idata)
            : base(s, idata)
        {
            Id   = s.id;
            Name = s.name;

            _contactRoles = null;
            _subSamples   = null;

            if ((s.ContactRole != null) && (s.ContactRole.Count > 0))
            {
                ContactRoles = new IdentDataList <ContactRoleObj>();
                foreach (var cr in s.ContactRole)
                {
                    ContactRoles.Add(new ContactRoleObj(cr, IdentData));
                }
            }
            if ((s.SubSample != null) && (s.SubSample.Count > 0))
            {
                SubSamples = new IdentDataList <SubSampleObj>();
                foreach (var ss in s.SubSample)
                {
                    SubSamples.Add(new SubSampleObj(ss, IdentData));
                }
            }
        }
Example #8
0
        /// <summary>
        ///     Create an object using the contents of the corresponding MzIdentML object
        /// </summary>
        /// <param name="sil"></param>
        /// <param name="idata"></param>
        public SpectrumIdentificationListObj(SpectrumIdentificationListType sil, IdentDataObj idata)
            : base(sil, idata)
        {
            Id   = sil.id;
            Name = sil.name;
            _numSequencesSearched         = sil.numSequencesSearched;
            NumSequencesSearchedSpecified = sil.numSequencesSearchedSpecified;

            _fragmentationTables           = null;
            _spectrumIdentificationResults = null;

            if ((sil.FragmentationTable != null) && (sil.FragmentationTable.Count > 0))
            {
                FragmentationTables = new IdentDataList <MeasureObj>();
                foreach (var f in sil.FragmentationTable)
                {
                    FragmentationTables.Add(new MeasureObj(f, IdentData));
                }
            }
            if ((sil.SpectrumIdentificationResult != null) && (sil.SpectrumIdentificationResult.Count > 0))
            {
                SpectrumIdentificationResults = new IdentDataList <SpectrumIdentificationResultObj>();
                foreach (var sir in sil.SpectrumIdentificationResult)
                {
                    SpectrumIdentificationResults.Add(new SpectrumIdentificationResultObj(sir, IdentData));
                }
            }
        }
Example #9
0
        /// <summary>
        ///     Create an object using the contents of the corresponding MzIdentML object
        /// </summary>
        /// <param name="mt"></param>
        /// <param name="idata"></param>
        public MassTableObj(MassTableType mt, IdentDataObj idata)
            : base(mt, idata)
        {
            Id   = mt.id;
            Name = mt.name;

            _residues          = null;
            _ambiguousResidues = null;
            MsLevels           = null;

            if ((mt.Residue != null) && (mt.Residue.Count > 0))
            {
                Residues = new IdentDataList <ResidueObj>();
                foreach (var r in mt.Residue)
                {
                    Residues.Add(new ResidueObj(r, IdentData));
                }
            }
            if ((mt.AmbiguousResidue != null) && (mt.AmbiguousResidue.Count > 0))
            {
                AmbiguousResidues = new IdentDataList <AmbiguousResidueObj>();
                foreach (var ar in mt.AmbiguousResidue)
                {
                    AmbiguousResidues.Add(new AmbiguousResidueObj(ar, IdentData));
                }
            }
            if (mt.msLevel != null)
            {
                MsLevels = new List <string>(mt.msLevel);
            }
        }
Example #10
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 #11
0
        /// <summary>
        ///     Create an object using the contents of the corresponding MzIdentML object
        /// </summary>
        /// <param name="pl"></param>
        /// <param name="idata"></param>
        public ParamListObj(ParamListType pl, IdentDataObj idata)
            : base(idata)
        {
            _items = null;

            if (pl != null && pl.Items.Count > 0)
            {
                Items = new IdentDataList <ParamBaseObj>();
                foreach (var p in pl.Items)
                {
                    if (p is CVParamType)
                    {
                        Items.Add(new CVParamObj(p as CVParamType, IdentData));
                    }
                    else if (p is UserParamType)
                    {
                        Items.Add(new UserParamObj(p as UserParamType, IdentData));
                    }
                }
            }
        }
Example #12
0
        /// <summary>
        ///     Create an object using the contents of the corresponding MzIdentML object
        /// </summary>
        /// <param name="pg"></param>
        /// <param name="idata"></param>
        public ParamGroupObj(IParamGroup pg, IdentDataObj idata)
            : base(pg, idata)
        {
            _userParams = null;

            if (pg.userParam != null && pg.userParam.Count > 0)
            {
                UserParams = new IdentDataList <UserParamObj>();
                foreach (var up in pg.userParam)
                {
                    UserParams.Add(new UserParamObj(up, IdentData));
                }
            }
        }
Example #13
0
        /// <summary>
        ///     Create an object using the contents of the corresponding MzIdentML object
        /// </summary>
        /// <param name="cvpg"></param>
        /// <param name="idata"></param>
        public CVParamGroupObj(ICVParamGroup cvpg, IdentDataObj idata)
            : base(idata)
        {
            _cvParams = null;

            if (cvpg.cvParam != null && cvpg.cvParam.Count > 0)
            {
                CVParams = new IdentDataList <CVParamObj>();
                foreach (var cvp in cvpg.cvParam)
                {
                    CVParams.Add(new CVParamObj(cvp, IdentData));
                }
            }
        }
Example #14
0
        /// <summary>
        ///     Create an object using the contents of the corresponding MzIdentML object
        /// </summary>
        /// <param name="ph"></param>
        /// <param name="idata"></param>
        public PeptideHypothesisObj(PeptideHypothesisType ph, IdentDataObj idata)
            : base(idata)
        {
            PeptideEvidenceRef = ph.peptideEvidence_ref;

            _spectrumIdentificationItems = null;

            if (ph.SpectrumIdentificationItemRef != null && ph.SpectrumIdentificationItemRef.Count > 0)
            {
                SpectrumIdentificationItems = new IdentDataList <SpectrumIdentificationItemRefObj>();
                foreach (var siir in ph.SpectrumIdentificationItemRef)
                {
                    SpectrumIdentificationItems.Add(new SpectrumIdentificationItemRefObj(siir, IdentData));
                }
            }
        }
Example #15
0
        /// <summary>
        ///     Create an object using the contents of the corresponding MzIdentML object
        /// </summary>
        /// <param name="pdl"></param>
        /// <param name="idata"></param>
        public ProteinDetectionListObj(ProteinDetectionListType pdl, IdentDataObj idata)
            : base(pdl, idata)
        {
            Id   = pdl.id;
            Name = pdl.name;

            _proteinAmbiguityGroups = null;

            if ((pdl.ProteinAmbiguityGroup != null) && (pdl.ProteinAmbiguityGroup.Count > 0))
            {
                ProteinAmbiguityGroups = new IdentDataList <ProteinAmbiguityGroupObj>();
                foreach (var pag in pdl.ProteinAmbiguityGroup)
                {
                    ProteinAmbiguityGroups.Add(new ProteinAmbiguityGroupObj(pag, IdentData));
                }
            }
        }
Example #16
0
        /// <summary>
        ///     Create an object using the contents of the corresponding MzIdentML object
        /// </summary>
        /// <param name="el"></param>
        /// <param name="idata"></param>
        public EnzymeListObj(EnzymesType el, IdentDataObj idata)
            : base(idata)
        {
            _independent         = el.independent;
            IndependentSpecified = el.independentSpecified;

            _enzymes = null;

            if ((el.Enzyme != null) && (el.Enzyme.Count > 0))
            {
                Enzymes = new IdentDataList <EnzymeObj>();
                foreach (var e in el.Enzyme)
                {
                    Enzymes.Add(new EnzymeObj(e, IdentData));
                }
            }
        }
Example #17
0
        /// <summary>
        ///     Create an object using the contents of the corresponding MzIdentML object
        /// </summary>
        /// <param name="pd"></param>
        /// <param name="idata"></param>
        public ProteinDetectionObj(ProteinDetectionType pd, IdentDataObj idata)
            : base(pd, idata)
        {
            ProteinDetectionListRef     = pd.proteinDetectionList_ref;
            ProteinDetectionProtocolRef = pd.proteinDetectionProtocol_ref;

            _inputSpectrumIdentifications = null;

            if ((pd.InputSpectrumIdentifications != null) && (pd.InputSpectrumIdentifications.Count > 0))
            {
                InputSpectrumIdentifications = new IdentDataList <InputSpectrumIdentificationsObj>();
                foreach (var isi in pd.InputSpectrumIdentifications)
                {
                    InputSpectrumIdentifications.Add(new InputSpectrumIdentificationsObj(isi, IdentData));
                }
            }
        }
Example #18
0
        internal void RebuildSIPList()
        {
            _idCounter = 0;
            _spectrumIdentificationProtocols.Clear();

            foreach (var specId in IdentData.AnalysisCollection.SpectrumIdentifications)
            {
                if (_spectrumIdentificationProtocols.Any(item => item.Equals(specId.SpectrumIdentificationProtocol)))
                {
                    continue;
                }

                specId.SpectrumIdentificationProtocol.Id = "SpecIdentProtocol_" + _idCounter;
                _idCounter++;
                _spectrumIdentificationProtocols.Add(specId.SpectrumIdentificationProtocol);
            }
        }
Example #19
0
        private void RebuildDbSequenceList()
        {
            _dBSeqIdCounter = 0;
            _dBSequences.Clear();

            foreach (var pepEv in _peptideEvidences)
            {
                if (_dBSequences.Any(item => item.Equals(pepEv.DBSequence)))
                {
                    continue;
                }

                pepEv.DBSequence.Id = "DBSeq_" + _dBSeqIdCounter;
                _dBSeqIdCounter++;
                _dBSequences.Add(pepEv.DBSequence);
            }
        }
Example #20
0
        /// <summary>
        ///     Create an object using the contents of the corresponding MzIdentML object
        /// </summary>
        /// <param name="pag"></param>
        /// <param name="idata"></param>
        public ProteinAmbiguityGroupObj(ProteinAmbiguityGroupType pag, IdentDataObj idata)
            : base(pag, idata)
        {
            Id   = pag.id;
            Name = pag.name;

            _proteinDetectionHypotheses = null;

            if ((pag.ProteinDetectionHypothesis != null) && (pag.ProteinDetectionHypothesis.Count > 0))
            {
                ProteinDetectionHypotheses = new IdentDataList <ProteinDetectionHypothesisObj>();
                foreach (var pdh in pag.ProteinDetectionHypothesis)
                {
                    ProteinDetectionHypotheses.Add(new ProteinDetectionHypothesisObj(pdh, IdentData));
                }
            }
        }
Example #21
0
        /// <summary>
        ///     Create an object using the contents of the corresponding MzIdentML object
        /// </summary>
        /// <param name="it"></param>
        /// <param name="idata"></param>
        public IonTypeObj(IonTypeType it, IdentDataObj idata)
            : base(idata)
        {
            Charge = it.charge;

            _fragmentArrays = null;
            _cvParam        = null;
            Index           = null;

            if (it.FragmentArray != null && it.FragmentArray.Count > 0)
            {
                FragmentArrays = new IdentDataList <FragmentArrayObj>();
                foreach (var f in it.FragmentArray)
                {
                    FragmentArrays.Add(new FragmentArrayObj(f, IdentData));
                }
            }
        }
Example #22
0
        /// <summary>
        ///     Create an object using the contents of the corresponding MzIdentML object
        /// </summary>
        /// <param name="sm"></param>
        /// <param name="idata"></param>
        public SearchModificationObj(SearchModificationType sm, IdentDataObj idata)
            : base(sm, idata)
        {
            FixedMod  = sm.fixedMod;
            MassDelta = sm.massDelta;
            Residues  = sm.residues;

            _specificityRules = null;

            if ((sm.SpecificityRules != null) && (sm.SpecificityRules.Count > 0))
            {
                SpecificityRules = new IdentDataList <SpecificityRulesListObj>();
                foreach (var sr in sm.SpecificityRules)
                {
                    SpecificityRules.Add(new SpecificityRulesListObj(sr, IdentData));
                }
            }
        }
Example #23
0
        /// <summary>
        ///     Create an object using the contents of the corresponding MzIdentML object
        /// </summary>
        /// <param name="p"></param>
        /// <param name="idata"></param>
        public PersonObj(PersonType p, IdentDataObj idata)
            : base(p, idata)
        {
            LastName    = p.lastName;
            FirstName   = p.firstName;
            MidInitials = p.midInitials;

            _affiliations = null;

            if ((p.Affiliation != null) && (p.Affiliation.Count > 0))
            {
                Affiliations = new IdentDataList <AffiliationObj>();
                foreach (var a in p.Affiliation)
                {
                    Affiliations.Add(new AffiliationObj(a, IdentData));
                }
            }
        }
Example #24
0
        /// <summary>
        ///     Create an object using the contents of the corresponding MzIdentML object
        /// </summary>
        /// <param name="sir"></param>
        /// <param name="idata"></param>
        public SpectrumIdentificationResultObj(SpectrumIdentificationResultType sir, IdentDataObj idata)
            : base(sir, idata)
        {
            Id             = sir.id;
            Name           = sir.name;
            SpectrumID     = sir.spectrumID;
            SpectraDataRef = sir.spectraData_ref;

            _spectrumIdentificationItems = null;

            if ((sir.SpectrumIdentificationItem != null) && (sir.SpectrumIdentificationItem.Count > 0))
            {
                SpectrumIdentificationItems = new IdentDataList <SpectrumIdentificationItemObj>();
                foreach (var sii in sir.SpectrumIdentificationItem)
                {
                    SpectrumIdentificationItems.Add(new SpectrumIdentificationItemObj(sii, IdentData));
                }
            }
        }
Example #25
0
        /// <summary>
        ///     Create an object using the contents of the corresponding MzIdentML object
        /// </summary>
        /// <param name="dt"></param>
        /// <param name="idata"></param>
        public DatabaseTranslationObj(DatabaseTranslationType dt, IdentDataObj idata)
            : base(idata)
        {
            _translationTables = null;
            Frames             = null;

            if ((dt.TranslationTable != null) && (dt.TranslationTable.Count > 0))
            {
                TranslationTables = new IdentDataList <TranslationTableObj>();
                foreach (var t in dt.TranslationTable)
                {
                    TranslationTables.Add(new TranslationTableObj(t, IdentData));
                }
            }
            if (dt.frames != null)
            {
                Frames = new List <int>(dt.frames);
            }
        }
Example #26
0
        /// <summary>
        ///     Create an object using the contents of the corresponding MzIdentML object
        /// </summary>
        /// <param name="ad"></param>
        /// <param name="idata"></param>
        public AnalysisDataObj(AnalysisDataType ad, IdentDataObj idata)
            : base(idata)
        {
            _spectrumIdentificationList = null;
            _proteinDetectionList       = null;

            if (ad.SpectrumIdentificationList != null && ad.SpectrumIdentificationList.Count > 0)
            {
                SpectrumIdentificationList = new IdentDataList <SpectrumIdentificationListObj>();
                foreach (var sil in ad.SpectrumIdentificationList)
                {
                    SpectrumIdentificationList.Add(new SpectrumIdentificationListObj(sil, IdentData));
                }
            }
            if (ad.ProteinDetectionList != null)
            {
                _proteinDetectionList = new ProteinDetectionListObj(ad.ProteinDetectionList, IdentData);
            }
        }
Example #27
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);
            }
        }
Example #28
0
        /// <summary>
        ///     Create an object using the contents of the corresponding MzIdentML object
        /// </summary>
        /// <param name="apc"></param>
        /// <param name="idata"></param>
        public AnalysisProtocolCollectionObj(AnalysisProtocolCollectionType apc, IdentDataObj idata)
            : base(idata)
        {
            _spectrumIdentificationProtocols = null;
            _proteinDetectionProtocol        = null;

            idata.AnalysisProtocolCollection = this;

            if (apc.SpectrumIdentificationProtocol != null && apc.SpectrumIdentificationProtocol.Count > 0)
            {
                SpectrumIdentificationProtocols = new IdentDataList <SpectrumIdentificationProtocolObj>();
                foreach (var sip in apc.SpectrumIdentificationProtocol)
                {
                    SpectrumIdentificationProtocols.Add(new SpectrumIdentificationProtocolObj(sip, IdentData));
                }
            }
            if (apc.ProteinDetectionProtocol != null)
            {
                _proteinDetectionProtocol = new ProteinDetectionProtocolObj(apc.ProteinDetectionProtocol, IdentData);
            }
        }
Example #29
0
        /// <summary>
        ///     Create an object using the contents of the corresponding MzIdentML object
        /// </summary>
        /// <param name="sii"></param>
        /// <param name="idata"></param>
        public SpectrumIdentificationItemObj(SpectrumIdentificationItemType sii, IdentDataObj idata)
            : base(sii, idata)
        {
            Id          = sii.id;
            Name        = sii.name;
            ChargeState = sii.chargeState;
            ExperimentalMassToCharge        = sii.experimentalMassToCharge;
            _calculatedMassToCharge         = sii.calculatedMassToCharge;
            CalculatedMassToChargeSpecified = sii.calculatedMassToChargeSpecified;
            _calculatedPI         = sii.calculatedPI;
            CalculatedPISpecified = sii.calculatedPISpecified;
            PeptideRef            = sii.peptide_ref;
            Rank          = sii.rank;
            PassThreshold = sii.passThreshold;
            MassTableRef  = sii.massTable_ref;
            SampleRef     = sii.sample_ref;

            _peptideEvidences = null;
            _fragmentations   = null;

            if ((sii.PeptideEvidenceRef != null) && (sii.PeptideEvidenceRef.Count > 0))
            {
                PeptideEvidences = new IdentDataList <PeptideEvidenceRefObj>();
                foreach (var pe in sii.PeptideEvidenceRef)
                {
                    PeptideEvidences.Add(new PeptideEvidenceRefObj(pe, IdentData));
                }
            }
            if ((sii.Fragmentation != null) && (sii.Fragmentation.Count > 0))
            {
                Fragmentations = new IdentDataList <IonTypeObj>();
                foreach (var f in sii.Fragmentation)
                {
                    Fragmentations.Add(new IonTypeObj(f, IdentData));
                }
            }
        }