public void WriteTransition(AbstractMassListExporter exporter, PeptideGroupDocNode seq, PeptideDocNode peptide, TransitionGroupDocNode group, TransitionGroupDocNode groupPrimary, TransitionDocNode transition, int step) { if (!HasFile) { throw new IOException(Resources.FileIterator_WriteTransition_Unexpected_failure_writing_transitions); } exporter.WriteTransition(_writer, seq, peptide, group, groupPrimary, transition, step); // If not full-scan, count transtions if (!_isPrecursorLimited) { TransitionCount++; } // Otherwise, count precursors else if (!ReferenceEquals(_nodeGroupLast, group)) { TransitionCount++; _nodeGroupLast = group; } }
private static void VerifyExportRoundTrip(AbstractMassListExporter exporter, SrmDocument docFasta) { var docImport = AssertEx.RoundTripTransitionList(exporter); int countProteinTermTran, countProteinTerm; VerifyMultiLabelContent(docFasta, docImport, out countProteinTerm, out countProteinTermTran); }
public void WriteRequiredTransitions(AbstractMassListExporter exporter, RequiredPeptideSet requiredPeptides) { foreach (var requiredPeptide in requiredPeptides.Peptides) { var seq = requiredPeptide.PeptideGroupNode; var peptide = requiredPeptide.PeptideNode; foreach (var group in peptide.TransitionGroups) { foreach (var transition in group.Transitions) { WriteTransition(exporter, seq, peptide, group, null, transition, 0); } } } }
public static SrmDocument RoundTripTransitionList(AbstractMassListExporter exporter) { exporter.Export(null); // Reverse the output lines and import into a new document var docExport = exporter.Document; var docImport = new SrmDocument(docExport.Settings); string transitionList = exporter.MemoryOutput.Values.ToArray()[0].ToString(); IdentityPath pathAdded; var inputs = new MassListInputs(DuplicateAndReverseLines(transitionList, exporter.HasHeaders), CultureInfo.InvariantCulture, TextUtil.SEPARATOR_CSV); docImport = docImport.ImportMassList(inputs, IdentityPath.ROOT, out pathAdded); IsDocumentState(docImport, 1, docExport.MoleculeGroupCount, docExport.MoleculeCount, docExport.MoleculeTransitionGroupCount, docExport.MoleculeTransitionCount); return(docImport); }
private static void VerifyExportRoundTrip(AbstractMassListExporter exporter, SrmDocument docFasta) { var docImport = AssertEx.RoundTripTransitionList(exporter); int countProteinTermTran, countProteinTerm; VerifyMultiLabelContent(docFasta, docImport, out countProteinTerm, out countProteinTermTran); }