public SequenceStructureDatasetIterator(DataInputIterator data_input_iterator, DataType data_type, boolean upper_only) { this.upperOnly = upper_only; this.type = data_type; this.dataInputIterator = data_input_iterator; // set the lambda expressions if (type == DataType.TEST) { this.hasNext = () -> this.dataInputIterator.hasNextTestData(); this.dataInputIteratorNext = () -> this.dataInputIterator.nextTestData(); } if (type == DataType.TRAIN) { this.hasNext = () -> this.dataInputIterator.hasNextTrainData(); this.dataInputIteratorNext = () -> this.dataInputIterator.nextTrainData(); } // Set the desired randomized region size try { randomizedRegionSize = Configuration.getParameters().getInt("Experiment.randomizedRegionSize"); } catch (NoSuchElementException e) { AptaLogger.log(Level.SEVERE, this.getClass(), e); AptaLogger.log(Level.SEVERE, this.getClass(), "No randomized region size was specified. Please check your configuration file."); System.exit(1); } // Set the channel index mappings this.pairsToChannelIndex.put((byte)'A', new TByteIntHashMap()); this.pairsToChannelIndex.put((byte)'C', new TByteIntHashMap()); this.pairsToChannelIndex.put((byte)'G', new TByteIntHashMap()); this.pairsToChannelIndex.put((byte)'T', new TByteIntHashMap()); this.pairsToChannelIndex.get((byte)'A').put((byte)'A', 0); this.pairsToChannelIndex.get((byte)'A').put((byte)'C', 1); this.pairsToChannelIndex.get((byte)'A').put((byte)'G', 2); this.pairsToChannelIndex.get((byte)'A').put((byte)'T', 3); this.pairsToChannelIndex.get((byte)'C').put((byte)'A', 4); this.pairsToChannelIndex.get((byte)'C').put((byte)'C', 5); this.pairsToChannelIndex.get((byte)'C').put((byte)'G', 6); this.pairsToChannelIndex.get((byte)'C').put((byte)'T', 7); this.pairsToChannelIndex.get((byte)'G').put((byte)'A', 8); this.pairsToChannelIndex.get((byte)'G').put((byte)'C', 9); this.pairsToChannelIndex.get((byte)'G').put((byte)'G', 10); this.pairsToChannelIndex.get((byte)'G').put((byte)'T', 11); this.pairsToChannelIndex.get((byte)'T').put((byte)'A', 12); this.pairsToChannelIndex.get((byte)'T').put((byte)'C', 13); this.pairsToChannelIndex.get((byte)'T').put((byte)'G', 14); this.pairsToChannelIndex.get((byte)'T').put((byte)'T', 15); }
public AutoDeltaBoolIntMap() { this.changes = new ArrayList<>(5); this.container = new TByteIntHashMap(); this.baselineCommandCount = 0; }
public AutoDeltaByteIntMap() { this.changes = new ArrayList<>(5); this.container = new TByteIntHashMap(); this.baselineCommandCount = 0; }