Exemplo n.º 1
0
        public static CompactId Read(IExtendedBinaryReader reader)
        {
            var id      = (IdType)reader.ReadByte();
            var version = reader.ReadByte();
            var info    = reader.ReadUInt32();

            return(new CompactId(id, version, info));
        }
Exemplo n.º 2
0
        /// <summary>
        /// reads the regulatory element data from the binary reader
        /// </summary>
        public static IRegulatoryRegion Read(IExtendedBinaryReader reader, IDictionary <ushort, IChromosome> chromosomeIndexDictionary)
        {
            var refIndex = reader.ReadOptUInt16();
            int start    = reader.ReadOptInt32();
            int end      = reader.ReadOptInt32();
            var type     = (RegulatoryRegionType)reader.ReadByte();
            var id       = CompactId.Read(reader);

            return(new RegulatoryRegion(chromosomeIndexDictionary[refIndex], start, end, id, type));
        }