Examples of seekForward()


Examples of org.apache.hadoop.io.simpleseekableformat.SimpleSeekableFormatInputStream.seekForward()

      }

      SimpleSeekableFormatInputStream in = new SimpleSeekableFormatInputStream(fileForRead);
      DataInputStream dataIn = new DataInputStream(in);

      long seekedPosition = in.seekForward();
      {
        // We should not be at the beginning of the stream any more.
        InterleavedInputStream interleavedIn = in.getInterleavedIn();
        long blocks = interleavedIn.getRawOffset() / interleavedIn.getCompleteBlockSize();
        long blocksAvailable = (availableBytes - interleavedIn.getMetaDataBlockSize()) / interleavedIn.getCompleteBlockSize();
View Full Code Here

Examples of org.broadinstitute.gatk.engine.refdata.utils.LocationAwareSeekableRODIterator.seekForward()

            // grab the ROD iterator from the data source, and compute the first location in this shard, forwarding
            // the iterator to immediately before it, so that it can be added to the merging iterator primed for
            // next() to return the first real ROD in this shard
            LocationAwareSeekableRODIterator it = dataSource.seek(provider.getLocus());
            it.seekForward(genomeLocParser.createGenomeLoc(loc.getContig(), loc.getStart()-1));

            states.add(new ReferenceOrderedDataState(dataSource,it));           

            // we need to special case the interval so we don't always think there's a rod at the first location
            if ( dataSource.getName().equals(INTERVAL_ROD_NAME) ) {
View Full Code Here

Examples of org.broadinstitute.gatk.engine.refdata.utils.LocationAwareSeekableRODIterator.seekForward()

        Assert.assertEquals(iteratorPool.numIterators(), 2, "Number of iterators in the pool is incorrect");
        Assert.assertEquals(iteratorPool.numAvailableIterators(), 0, "Number of available iterators in the pool is incorrect");

        // Test out-of-order access: first iterator2, then iterator1.
        // Ugh...first call to a region needs to be a seek.
        TableFeature datum = (TableFeature)iterator2.seekForward(testSite2).get(0).getUnderlyingObject();
        assertTrue(datum.getLocation().equals(testSite2));
        assertTrue(datum.get("COL1").equals("C"));
        assertTrue(datum.get("COL2").equals("D"));
        assertTrue(datum.get("COL3").equals("E"));
View Full Code Here

Examples of org.broadinstitute.gatk.engine.refdata.utils.LocationAwareSeekableRODIterator.seekForward()

        // Make sure that the previously acquired iterator was reused.
        Assert.assertEquals(iteratorPool.numIterators(), 1, "Number of iterators in the pool is incorrect");
        Assert.assertEquals(iteratorPool.numAvailableIterators(), 0, "Number of available iterators in the pool is incorrect");

        datum = (TableFeature)iterator.seekForward(testSite3).get(0).getUnderlyingObject();
        assertTrue(datum.getLocation().equals(testSite3));
        assertTrue(datum.get("COL1").equals("F"));
        assertTrue(datum.get("COL2").equals("G"));
        assertTrue(datum.get("COL3").equals("H"));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.