public static Peptide Read(BinaryReader reader) { Peptide result = new Peptide(); result.sequence = AASequence.Read(reader); if (result.sequence == null) { return(null); } result.monoIsotopicMass = reader.ReadDouble(); int nproteins = reader.ReadInt32(); for (int i = 0; i < nproteins; i++) { result.proteinIndices.Add(reader.ReadInt32()); result.proteinOffsets.Add(reader.ReadInt32()); result.residueBefore.Add(reader.ReadByte()); result.residueAfter.Add(reader.ReadByte()); } result.fixedModifications = PeptideModificationState.Read(reader); return(result); }
public ModifiedPeptide(Peptide peptide, int peptideIndex) { this.peptideIndex = peptideIndex; modifications = new PeptideModificationState(peptide.Sequence.Length); mass = peptide.MonoIsotopicMass; }