/// <summary> /// reads the translation from the binary writer /// </summary> public static Translation Read(ExtendedBinaryReader reader, string[] peptideSeqs) { var codingRegion = CdnaCoordinateMap.Read(reader); var proteinId = CompactId.Read(reader); var proteinVersion = reader.ReadByte(); var peptideIndex = reader.ReadOptInt32(); return(new Translation(codingRegion, proteinId, proteinVersion, peptideSeqs[peptideIndex])); }
private static CdnaCoordinateMap[] ReadCdnaMaps(ExtendedBinaryReader reader) { int numItems = reader.ReadOptInt32(); var items = new CdnaCoordinateMap[numItems]; for (int i = 0; i < numItems; i++) { items[i] = CdnaCoordinateMap.Read(reader); } return(items); }