public Di4B(string workingDirectory, string sectionTitle, Memory Memory, HDDPerformance hddPerformance, IndexType indexType, CacheOptions cacheOptions, ISerializer <C> CSerializer, IComparer <C> CComparer) { this.CSerializer = CSerializer; this.CComparer = CComparer; genome = new Genome <C, I, M>(workingDirectory, sectionTitle, Memory, hddPerformance, indexType, cacheOptions, CSerializer, CComparer); }
public Genome( string workingDirectory, string sectionTitle, Memory memory, HDDPerformance hddPerformance, IndexType indexType, CacheOptions cacheOptions, ISerializer <C> CSerializer, IComparer <C> CComparer) { _memory = memory; _hddPerformance = hddPerformance; _CSerializer = CSerializer; _CComparer = CComparer; _sectionTitle = sectionTitle; _cacheOptions = cacheOptions; _indexType = indexType; _stpWtch = new Stopwatch(); _config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None); _settings = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None).AppSettings.Settings; if (_memory == Memory.RAM) { chrs = new Dictionary <string, Dictionary <char, Di4 <C, I, M> > >(); } else if (_memory == Memory.HDD && _hddPerformance == HDDPerformance.Fastest) { chrs = new Dictionary <string, Dictionary <char, Di4 <C, I, M> > >(); _chrSection = (ChrSection)ConfigurationManager.GetSection(_sectionTitle); if (_chrSection == null) { _chrSection = new ChrSection(); } ConfigurationManager.RefreshSection(_sectionTitle); foreach (ChrConfigElement element in _chrSection.genomeChrs) { if (!chrs.ContainsKey(element.chr)) { chrs.Add(element.chr, new Dictionary <char, Di4 <C, I, M> >()); } if (!chrs[element.chr].ContainsKey(element.strand)) { chrs[element.chr].Add(element.strand, new Di4 <C, I, M>(GetDi4Options(element.index))); } } } }