/// <summary> /// Dispose field instances. /// </summary> /// <param name="disposeManaged">If disposeManaged equals true, clean all resources.</param> protected virtual void Dispose(bool disposeManaged) { if (disposeManaged) { if (this.scaffoldBuilder != null) { this.scaffoldBuilder.Dispose(); } this.graph = null; this.sequenceReads = null; this.danglingLinksPurger = null; this.redundantPathsPurger = null; this.contigBuilder = null; this.scaffoldBuilder = null; } }
/// <summary> /// Initializes the above defined fields. For each step in assembly /// we use a seperate class for implementation. This method assigns /// these variables to classes with desired implementation. /// </summary> private void InitializeDefaultGraphModifiers() { // Assign uninitialized fields to default values if (_danglingLinksPurger == null) { _danglingLinksPurger = new DanglingLinksPurger(); } if (_redundantPathsPurger == null) { _redundantPathsPurger = new RedundantPathsPurger(_redundantPathLengthThreshold); } if (_lowCoverageContigPurger == null) { _lowCoverageContigPurger = new SimplePathContigBuilder(); } }
/// <summary> /// Dispose field instances /// </summary> /// <param name="disposeManaged">If disposeManaged equals true, clean all resources</param> protected virtual void Dispose(bool disposeManaged) { if (disposeManaged) { if (_graph != null) { _graph.Dispose(); } if (_scaffoldBuilder != null) { _scaffoldBuilder.Dispose(); } _graph = null; _sequenceReads = null; _danglingLinksPurger = null; _redundantPathsPurger = null; _contigBuilder = null; _scaffoldBuilder = null; } }