private void GetPsmScore( SpectrumIdentificationItemType item, out double score, out string type, out Peptide.ConfidenceType confidence ) { score = -1.0; type = "N/A"; confidence = item.passThreshold ? Peptide.ConfidenceType.PassThreshold : Peptide.ConfidenceType.NoThreshold; if( item.Items == null ) return; foreach( AbstractParamType param in item.Items ) { if( !(param is CVParamType) ) continue; CVParamType cv = param as CVParamType; if( cv.accession == "MS:1001155" ) { score = double.Parse(cv.value, m_Format); type = "ProteomeDiscoverer/SEQUEST Confidence XCorr"; if( score >= m_GreenTh[item.chargeState-1] ) confidence = Peptide.ConfidenceType.Green; else if( score >= m_YellowTh[item.chargeState-1] ) confidence = Peptide.ConfidenceType.Yellow; else confidence = Peptide.ConfidenceType.Red; break; } else if( cv.accession == "MS:1001172" ) { score = double.Parse(cv.value, m_Format); type = "Mascot expectation value"; break; } else if( cv.accession == "MS:1001330" ) { score = double.Parse( cv.value, m_Format ); type = "X!Tandem expect"; break; } } }
protected bool CheckPsm( bool passThreshold, int rank, Peptide.ConfidenceType confidence, double score, string type ) { if( RequirePassTh && !passThreshold ) return false; if( RankThreshold != 0 && (rank == 0 || rank > RankThreshold) ) return false; if( Type >= SourceType.mzIdentML110 && Type <= SourceType.mzIdentML120 && (int)confidence < (int)SeqThreshold ) return false; if( type == "Mascot expectation value" && score > MascotThreshold ) return false; if( type == "X!Tandem expect" && score > XTandemThreshold ) return false; return true; }
/// <summary> /// Default constructor /// </summary> public Mapper( Software sw ) { m_Software = sw; Proteins = new List<Protein>(); Peptides = new List<Peptide>(); Spectra = new List<Spectrum>(); m_Stats = new StatsStruct(); m_Format = new System.Globalization.NumberFormatInfo(); m_Format.NumberDecimalSeparator = "."; m_Run = 0; m_Type = SourceType.Unknown; LengthThreshold = 0; PlgsThreshold = Peptide.ConfidenceType.NoThreshold; SeqThreshold = Peptide.ConfidenceType.NoThreshold; XTandemThreshold = 0.05; XTandemAvailable = false; MascotThreshold = 0.05; MascotAvailable = false; RequirePassTh = true; RankThreshold = 0; FilterDecoys = true; RunsThreshold = 1; m_InputFiles = new List<string>(); }