public GeneDatabaseWriter(Stream stream, ISupplementaryAnnotationHeader header, bool leaveOpen = false) { _leaveOpen = leaveOpen; _stream = stream; _writer = new ExtendedBinaryWriter(stream, new UTF8Encoding(false, true), _leaveOpen); WriteHeader(header); }
private void WriteHeader(ISupplementaryAnnotationHeader header) { _writer.Write(SaDataBaseCommon.DataHeader); _writer.Write(SaDataBaseCommon.DataVersion); _writer.Write(SaDataBaseCommon.SchemaVersion); _writer.Write((byte)header.GenomeAssembly); _writer.Write(DateTime.Now.Ticks); var dataSourceVersions = header.DataSourceVersions.ToList(); _writer.WriteOpt(dataSourceVersions.Count); foreach (var version in dataSourceVersions) { version.Write(_writer); } _writer.Write(SaDataBaseCommon.GuardInt); }
private static SaWriter GetSaWriter(string saPath, ISupplementaryAnnotationHeader header, List <ISupplementaryInterval> smallVariantIntervals, List <ISupplementaryInterval> svIntervals, List <ISupplementaryInterval> allVariantIntervals, List <(int, string)> globalMajorAlleleInRefMinors)