Ejemplo n.º 1
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));
        }
Ejemplo n.º 2
0
        public static IGene Read(IExtendedBinaryReader reader, IDictionary <ushort, IChromosome> indexToChromosome)
        {
            ushort referenceIndex  = reader.ReadOptUInt16();
            int    start           = reader.ReadOptInt32();
            int    end             = reader.ReadOptInt32();
            bool   onReverseStrand = reader.ReadBoolean();
            string symbol          = reader.ReadAsciiString();
            int    hgncId          = reader.ReadOptInt32();
            var    entrezId        = CompactId.Read(reader);
            var    ensemblId       = CompactId.Read(reader);

            return(new Gene(indexToChromosome[referenceIndex], start, end, onReverseStrand, symbol, hgncId, entrezId, ensemblId));
        }