Exemple #1
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 = new IdentDataList <SpectrumIdentificationItemRefObj>(1);

            if (ph.SpectrumIdentificationItemRef?.Count > 0)
            {
                SpectrumIdentificationItems.AddRange(ph.SpectrumIdentificationItemRef, spectrumIdItemRef => new SpectrumIdentificationItemRefObj(spectrumIdItemRef, IdentData));
            }
        }
Exemple #2
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));
                }
            }
        }
Exemple #3
0
	/// <summary>
	/// Builds a PDH for the current protein
	/// </summary>
	private PSIPIanalysisprocessProteinDetectionHypothesisType BuildHypothesis( Protein p, Protein.EvidenceType ev ) {
		PSIPIanalysisprocessProteinDetectionHypothesisType h = new PSIPIanalysisprocessProteinDetectionHypothesisType();
		h.id = "PDH_" + p.Accession;
		h.DBSequence_ref = p.DBRef;
		if( p.Evidence == Protein.EvidenceType.NonConclusive || p.Evidence == Protein.EvidenceType.Filtered )
			h.passThreshold = false;
		else
			h.passThreshold = true;
		List<PeptideHypothesisType> listPeptides = new List<PeptideHypothesisType>();
		foreach( Peptide f in p.Peptides ) {
			PeptideHypothesisType peptide = new PeptideHypothesisType();
			peptide.PeptideEvidence_Ref = f.Names[p.DBRef];
			listPeptides.Add( peptide );
		}
		if( listPeptides.Count > 0 )
			h.PeptideHypothesis = listPeptides.ToArray();
		h.cvParam = new FuGECommonOntologycvParamType[1];
        h.cvParam[0] = new FuGECommonOntologycvParamType(
        		"Protein Inference Confidence Category",
        		"MS:1001600", "PSI-MS" );
        h.cvParam[0].value = ParseConfidence( ev );
		return h;
	}