public Protein(BinaryReader reader) { sequence = AASequence.Read(reader).ToString(); sequenceData = new Sequence(sequence); accession = FileUtil.ReadString(reader); description = FileUtil.ReadString(reader); molecularWeight = reader.ReadDouble(); }
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); }