public BaselineComparison(ProteinProphetResult ppr, int numMS2, int ddaNum) { proteinsIdentifiedByNoExclusion = ppr.getProteinsIdentified(); numProteinsIdentifiedNaiveExperiment = proteinsIdentifiedByNoExclusion.Count; totalResourcesNaiveExperiment = numMS2; this.ddaNum = ddaNum; }
private void setProteinsIdentified(ProteinProphetResult ppr, List <String> proteinsIdentifiedByNoExclusion) { if (ppr != null) { List <String> proteinsIdentified = ppr.getProteinsIdentified(); int intersect = compareProteins(proteinsIdentifiedByNoExclusion, proteinsIdentified); ChangeValue(Header.NumProteinsIdentified, proteinsIdentified.Count); ChangeValue(Header.ProteinsIdentifiedInLimitedDDA, intersect); } }
public static String DoJob(ProteinProphetResult ppr, ExclusionProfile exclusionProfile, int experimentNum) { String outputFile = Path.Combine(InputFileOrganizer.OutputFolderOfTheRun, "NumberOfPeptidesPerIdentifiedProtein_" + experimentNum + ".txt"); StreamWriter sw = new StreamWriter(outputFile); sw.WriteLine("Accession\tNumberOfPeptides\tSpectralCount"); List <String> confidentlyIdentifiedProts = ppr.getProteinsIdentified(); foreach (String accession in confidentlyIdentifiedProts) { Protein prot = exclusionProfile.getDatabase().getProtein(accession); HashSet <String> peptidesObserved = new HashSet <String>(); foreach (PeptideScore pepEvidence in prot.getPeptideScore()) { peptidesObserved.Add(pepEvidence.getPeptideSequence()); } sw.WriteLine("{0}\t{1}\t{2}", accession, peptidesObserved.Count, prot.getPeptideScore().Count); } sw.Close(); return(outputFile); }
public static void DoJob() { StreamWriter sw = new StreamWriter(Path.Combine(InputFileOrganizer.OutputFolderOfTheRun, "ExcludedProteinComparison.txt")); String ExcludedProteinFile = "C:\\Coding\\2019LavalleeLab\\temp2\\Output\\Gold_MLGE_nonCheat.txt_output\\ExcludedProteinList.txt"; StreamReader sr = new StreamReader(ExcludedProteinFile); List <String> inProgramConfidentlyIdentified = new List <String>(); String line = sr.ReadLine(); while (line != null) { inProgramConfidentlyIdentified.Add(line); line = sr.ReadLine(); } String proteinProphetFile = "C:\\Coding\\2019LavalleeLab\\GitProjectRealTimeMS\\TestData\\PreComputedFiles\\MS_QC_120min_interact.prot.xml"; ProteinProphetResult ppr = ProteinProphetEvaluator.getProteinProphetResult(proteinProphetFile); List <String> realConfidentIdentified = ppr.getProteinsIdentified(); List <String> intersection = ListUtil.FindIntersection(inProgramConfidentlyIdentified, realConfidentIdentified); sw.WriteLine("In-Program excluded: {0}", inProgramConfidentlyIdentified.Count); sw.WriteLine("Real confidently identified: {0}", realConfidentIdentified.Count); sw.WriteLine("Intersection: {0}", intersection.Count); sw.Close(); }