private void advanceToReference(final String sequenceName) { if (indexBuilder != null) { indexContents.add(indexBuilder.generateIndexContent()); } // If sequence dictionary is provided, BinningIndexBuilder can reduce size of array it allocates. final int sequenceLength; if (sequenceDictionary != null) { sequenceLength = sequenceDictionary.getSequence(sequenceName).getSequenceLength(); } else { sequenceLength = 0; } indexBuilder = new BinningIndexBuilder(sequenceNames.size(), sequenceLength); sequenceNames.add(sequenceName); currentSequenceName = sequenceName; sequenceNamesSeen.add(sequenceName); }
private void advanceToReference(final String sequenceName) { if (indexBuilder != null) { indexContents.add(indexBuilder.generateIndexContent()); } // If sequence dictionary is provided, BinningIndexBuilder can reduce size of array it allocates. final int sequenceLength; if (sequenceDictionary != null) { sequenceLength = sequenceDictionary.getSequence(sequenceName).getSequenceLength(); } else { sequenceLength = 0; } indexBuilder = new BinningIndexBuilder(sequenceNames.size(), sequenceLength); sequenceNames.add(sequenceName); currentSequenceName = sequenceName; sequenceNamesSeen.add(sequenceName); }
private void advanceToReference(final String sequenceName) { if (indexBuilder != null) { indexContents.add(indexBuilder.generateIndexContent()); } // If sequence dictionary is provided, BinningIndexBuilder can reduce size of array it allocates. final int sequenceLength; if (sequenceDictionary != null) { sequenceLength = sequenceDictionary.getSequence(sequenceName).getSequenceLength(); } else { sequenceLength = 0; } indexBuilder = new BinningIndexBuilder(sequenceNames.size(), sequenceLength); sequenceNames.add(sequenceName); currentSequenceName = sequenceName; sequenceNamesSeen.add(sequenceName); }
/** * reinitialize all data structures when the reference changes */ void startNewReference() { ++currentReference; // I'm not crazy about recycling this object, but that is the way it was originally written and // it helps keep track of no-coordinate read count (which shouldn't be stored in this class anyway). indexStats.newReference(); binningIndexBuilder = new BinningIndexBuilder(currentReference, sequenceDictionary.getSequence(currentReference).getSequenceLength()); } }
/** * reinitialize all data structures when the reference changes */ void startNewReference() { ++currentReference; // I'm not crazy about recycling this object, but that is the way it was originally written and // it helps keep track of no-coordinate read count (which shouldn't be stored in this class anyway). indexStats.newReference(); binningIndexBuilder = new BinningIndexBuilder(currentReference, sequenceDictionary.getSequence(currentReference).getSequenceLength()); } }
/** * reinitialize all data structures when the reference changes */ void startNewReference() { ++currentReference; // I'm not crazy about recycling this object, but that is the way it was originally written and // it helps keep track of no-coordinate read count (which shouldn't be stored in this class anyway). indexStats.newReference(); binningIndexBuilder = new BinningIndexBuilder(currentReference, sequenceDictionary.getSequence(currentReference).getSequenceLength()); } }
/** * reinitialize all data structures when the reference changes */ void startNewReference(int reference) { currentReference = reference; // I'm not crazy about recycling this object, but that is the way it was originally written and // it helps keep track of no-coordinate read count (which shouldn't be stored in this class anyway). indexStats.newReference(); binningIndexBuilder = new BinningIndexBuilder(currentReference, sequenceDictionary.getSequence(currentReference).getSequenceLength()); } }
/** * reinitialize all data structures when the reference changes */ void startNewReference(int reference) { currentReference = reference; // I'm not crazy about recycling this object, but that is the way it was originally written and // it helps keep track of no-coordinate read count (which shouldn't be stored in this class anyway). indexStats.newReference(); binningIndexBuilder = new BinningIndexBuilder(currentReference, sequenceDictionary.getSequence(currentReference).getSequenceLength()); } }
@Test(dataProvider = "BinningFeatures") public void testFeatureAtOffsetZero( final List<MockIndexableFeature> mockFeatures, final List<Chunk> expectedChunks, final long[] expectedBins) { // use a sequence length that spans at least two (16k) binning blocks final BinningIndexBuilder bib = new BinningIndexBuilder(REFERNCE_SEQUENCE_INDEX, 40000); mockFeatures.forEach(bib::processFeature); final BinningIndexContent bic = bib.generateIndexContent(); Assert.assertEquals(expectedBins, bic.getLinearIndex().getIndexEntries()); Assert.assertEquals(expectedChunks, bic.getAllChunks()); }