Ejemplo n.º 1
0
        /// <summary>
        /// constructor
        /// </summary>
        public CompressedSequenceWriter(string path, List <ReferenceMetadata> referenceMetadataList,
                                        ICytogeneticBands genomeCytobands, GenomeAssembly genomeAssembly)
        {
            _stream                = FileUtilities.GetCreateStream(path);
            _writer                = new ExtendedBinaryWriter(_stream);
            _refSeqIndex           = new List <SequenceIndexEntry>();
            _twoBitSequence        = new TwoBitSequence();
            _sequenceCompressor    = new SequenceCompressor();
            _refSeqMaskedIntervals = new List <List <MaskedEntry> >();

            WriteHeader(referenceMetadataList, genomeCytobands, genomeAssembly);
        }
Ejemplo n.º 2
0
        private void Dispose(bool disposing)
        {
            if (disposing)
            {
                WriteReferenceSequenceIndex();
                WriteMaskedIntervals();
                WriteEofTag();
                _stream.Dispose();
            }

            _refSeqIndex           = null;
            _refSeqMaskedIntervals = null;
            _twoBitSequence        = null;
            _sequenceCompressor    = null;

            _headerDataOffset      = 0L;
            _indexOffset           = 0L;
            _maskedIntervalsOffset = 0L;
        }