protected override void WriteTransition(TextWriter writer, XmlFastaSequence sequence, XmlPeptide peptide, XmlTransition transition) { char separator = TextUtil.GetCsvSeparator(_cultureInfo); writer.Write(transition.PrecursorMz.ToString(_cultureInfo)); writer.Write(separator); writer.Write(transition.ProductMz.ToString(_cultureInfo)); writer.Write(separator); writer.Write(Math.Round(transition.CollisionEnergy, 1).ToString(_cultureInfo)); writer.Write(separator); if (MethodType == ExportMethodType.Scheduled) { if (!transition.StartRT.HasValue || !transition.StopRT.HasValue) { throw new InvalidOperationException(Resources.XmlThermoMassListExporter_WriteTransition_Attempt_to_write_scheduling_parameters_failed); } writer.Write(transition.StartRT.Value.ToString(_cultureInfo)); writer.Write(separator); writer.Write(transition.StopRT.Value.ToString(_cultureInfo)); writer.Write(separator); writer.Write('1'); // Not L10N writer.Write(separator); } writer.Write(peptide.Sequence); writer.Write(separator); writer.Write(sequence.Name); writer.WriteLine(); }
protected override void WriteTransition(TextWriter writer, XmlFastaSequence sequence, XmlPeptide peptide, XmlTransition transition) { char separator = TextUtil.GetCsvSeparator(_cultureInfo); writer.Write(transition.PrecursorMz.ToString(_cultureInfo)); writer.Write(separator); writer.Write(transition.ProductMz.ToString(_cultureInfo)); writer.Write(separator); if (MethodType == ExportMethodType.Standard) { writer.Write(Math.Round(DwellTime, 2).ToString(_cultureInfo)); } else { if (!peptide.PredictedRetentionTime.HasValue) { throw new InvalidOperationException(Resources.XmlThermoMassListExporter_WriteTransition_Attempt_to_write_scheduling_parameters_failed); } writer.Write(peptide.PredictedRetentionTime.Value.ToString(_cultureInfo)); } writer.Write(separator); // Write special ID for ABI software var fastaSequence = new FastaSequence(sequence.Name, sequence.Description, null, peptide.Sequence); var newPeptide = new Peptide(fastaSequence, peptide.Sequence, 0, peptide.Sequence.Length, peptide.MissedCleavages); var nodePep = new PeptideDocNode(newPeptide); string modifiedPepSequence = AbiMassListExporter.GetSequenceWithModsString(nodePep, _document.Settings); // Not L10N; string extPeptideId = string.Format("{0}.{1}.{2}.{3}", // Not L10N sequence.Name, modifiedPepSequence, GetTransitionName(transition), "light"); // Not L10N : file format writer.WriteDsvField(extPeptideId, separator); writer.Write(separator); writer.Write(Math.Round(transition.DeclusteringPotential ?? 0, 1).ToString(_cultureInfo)); writer.Write(separator); writer.Write(Math.Round(transition.CollisionEnergy, 1).ToString(_cultureInfo)); writer.WriteLine(); }
protected override void WriteTransition(TextWriter writer, XmlFastaSequence sequence, XmlPeptide peptide, XmlTransition transition) { char separator = TextUtil.GetCsvSeparator(_cultureInfo); writer.Write(transition.PrecursorMz.ToString(_cultureInfo)); writer.Write(separator); writer.Write(transition.ProductMz.ToString(_cultureInfo)); writer.Write(separator); if (MethodType == ExportMethodType.Standard) writer.Write(Math.Round(DwellTime, 2).ToString(_cultureInfo)); else { if (!peptide.PredictedRetentionTime.HasValue) throw new InvalidOperationException(Resources.XmlThermoMassListExporter_WriteTransition_Attempt_to_write_scheduling_parameters_failed); writer.Write(peptide.PredictedRetentionTime.Value.ToString(_cultureInfo)); } writer.Write(separator); // Write special ID for ABI software var fastaSequence = new FastaSequence(sequence.Name, sequence.Description, null, peptide.Sequence); var newPeptide = new Peptide(fastaSequence, peptide.Sequence, 0, peptide.Sequence.Length, peptide.MissedCleavages); var nodePep = new PeptideDocNode(newPeptide); string modifiedPepSequence = AbiMassListExporter.GetSequenceWithModsString(nodePep, _document.Settings); // Not L10N; string extPeptideId = string.Format("{0}.{1}.{2}.{3}", // Not L10N sequence.Name, modifiedPepSequence, GetTransitionName(transition), "light"); // Not L10N : file format writer.WriteDsvField(extPeptideId, separator); writer.Write(separator); writer.Write(Math.Round(transition.DeclusteringPotential ?? 0, 1).ToString(_cultureInfo)); writer.Write(separator); writer.Write(Math.Round(transition.CollisionEnergy, 1).ToString(_cultureInfo)); writer.WriteLine(); }
private static string GetTransitionName(XmlTransition transition) { return(AbiMassListExporter.GetTransitionName(Adduct.FromChargeProtonated(transition.PrecursorCharge), transition.FragmentType.ToString().ToLower() + transition.FragmentOrdinal, Adduct.FromChargeProtonated(transition.ProductCharge))); }
protected abstract void WriteTransition(TextWriter writer, XmlFastaSequence sequence, XmlPeptide peptide, XmlTransition transition);
private static string GetTransitionName(XmlTransition transition) { return AbiMassListExporter.GetTransitionName(transition.PrecursorCharge, transition.FragmentType.ToString().ToLower() + transition.FragmentOrdinal, transition.ProductCharge); }
protected override void WriteTransition(TextWriter writer, XmlFastaSequence sequence, XmlPeptide peptide, XmlTransition transition) { char separator = TextUtil.GetCsvSeparator(_cultureInfo); writer.Write(transition.PrecursorMz.ToString(_cultureInfo)); writer.Write(separator); writer.Write(transition.ProductMz.ToString(_cultureInfo)); writer.Write(separator); writer.Write(Math.Round(transition.CollisionEnergy, 1).ToString(_cultureInfo)); writer.Write(separator); if (MethodType == ExportMethodType.Scheduled) { if (!transition.StartRT.HasValue || !transition.StopRT.HasValue) throw new InvalidOperationException(Resources.XmlThermoMassListExporter_WriteTransition_Attempt_to_write_scheduling_parameters_failed); writer.Write(transition.StartRT.Value.ToString(_cultureInfo)); writer.Write(separator); writer.Write(transition.StopRT.Value.ToString(_cultureInfo)); writer.Write(separator); writer.Write('1'); // Not L10N writer.Write(separator); } writer.Write(peptide.Sequence); writer.Write(separator); writer.Write(sequence.Name); writer.WriteLine(); }
protected abstract void WriteTransition(TextWriter writer, XmlFastaSequence sequence, XmlPeptide peptide, XmlTransition transition);
public XmlPeptide(PepV01 peptide, XmlTransition[] transitions) { Begin = peptide.Begin; End = peptide.End; Sequence = peptide.Sequence; PrevAA = peptide.PrevAA; NextAA = peptide.NextAA; NeutralMass = SequenceMassCalc.PersistentNeutral(peptide.MassH); MissedCleavages = peptide.MissedCleavages; if (peptide.PredictedRetentionTime.HasValue) PredictedRetentionTime = Math.Round(peptide.PredictedRetentionTime.Value, 2); Transitions = transitions; }