this.isLowToHigh = isLowToHigh; fileOffset = this.leafHitItem.getDataOffset(); dataBlockSize = this.leafHitItem.geDataSize(); byte[] buffer = new byte[(int) dataBlockSize];
this.isLowToHigh = isLowToHigh; fileOffset = this.leafHitItem.getDataOffset(); dataBlockSize = this.leafHitItem.geDataSize(); byte[] buffer = new byte[(int) dataBlockSize];
byte[] buffer = new byte[(int) dataBlockSize]; fileOffset = this.leafHitItem.getDataOffset();
byte[] buffer = new byte[(int) dataBlockSize]; fileOffset = this.leafHitItem.getDataOffset();
byte[] buffer = new byte[(int) dataBlockSize]; fileOffset = this.leafHitItem.getDataOffset();
public BigWigDataBlock(SeekableStream fis, RPTreeLeafNodeItem leafHitItem, HashMap<Integer, String> chromosomeMap, boolean isLowToHigh, int uncompressBufSize){ this.leafHitItem = leafHitItem; this.chromosomeMap = chromosomeMap; this.isLowToHigh = isLowToHigh; fileOffset = this.leafHitItem.getDataOffset(); leafDataSize = this.leafHitItem.geDataSize(); byte[] buffer = new byte[(int) leafDataSize]; // read Wig data block into a buffer try { fis.seek(fileOffset); fis.readFully(buffer); // decompress if necessary - the buffer size is 0 for uncompressed data // Note: BBFile Table C specifies a decompression buffer size if(uncompressBufSize > 0) wigBuffer = BBCompressionUtils.decompress(buffer, uncompressBufSize); else wigBuffer = buffer; // use uncompressed read buffer directly }catch(IOException ex) { log.error("Error reading Wig section for leaf item ", ex); String error = String.format("Error reading Wig section for leaf item %d\n"); throw new RuntimeException(error, ex); } // initialize unread data size remDataSize = wigBuffer.length; // use getWigData to extract data block items }
this.isLowToHigh = isLowToHigh; fileOffset = this.leafHitItem.getDataOffset(); dataBlockSize = this.leafHitItem.geDataSize(); byte[] buffer = new byte[(int) dataBlockSize];
public BigWigDataBlock(SeekableStream fis, RPTreeLeafNodeItem leafHitItem, HashMap<Integer, String> chromosomeMap, boolean isLowToHigh, int uncompressBufSize){ this.leafHitItem = leafHitItem; this.chromosomeMap = chromosomeMap; this.isLowToHigh = isLowToHigh; fileOffset = this.leafHitItem.getDataOffset(); leafDataSize = this.leafHitItem.geDataSize(); byte[] buffer = new byte[(int) leafDataSize]; // read Wig data block into a buffer try { fis.seek(fileOffset); fis.readFully(buffer); // decompress if necessary - the buffer size is 0 for uncompressed data // Note: BBFile Table C specifies a decompression buffer size if(uncompressBufSize > 0) wigBuffer = BBCompressionUtils.decompress(buffer, uncompressBufSize); else wigBuffer = buffer; // use uncompressed read buffer directly }catch(IOException ex) { log.error("Error reading Wig section for leaf item ", ex); String error = String.format("Error reading Wig section for leaf item %d\n"); throw new RuntimeException(error, ex); } // initialize unread data size remDataSize = wigBuffer.length; // use getWigData to extract data block items }
public BigWigDataBlock(SeekableStream fis, RPTreeLeafNodeItem leafHitItem, Map<Integer, String> chromosomeMap, boolean isLowToHigh, int uncompressBufSize){ this.leafHitItem = leafHitItem; this.chromosomeMap = chromosomeMap; this.isLowToHigh = isLowToHigh; fileOffset = this.leafHitItem.getDataOffset(); leafDataSize = this.leafHitItem.geDataSize(); byte[] buffer = new byte[(int) leafDataSize]; // read Wig data block into a buffer try { fis.seek(fileOffset); fis.readFully(buffer); // decompress if necessary - the buffer size is 0 for uncompressed data // Note: BBFile Table C specifies a decompression buffer size if(uncompressBufSize > 0) wigBuffer = (new CompressionUtils()).decompress(buffer, uncompressBufSize); else wigBuffer = buffer; // use uncompressed read buffer directly }catch(IOException ex) { log.error("Error reading Wig section for leaf item ", ex); String error = String.format("Error reading Wig section for leaf item %d\n"); throw new RuntimeException(error, ex); } // initialize unread data size remDataSize = wigBuffer.length; // use getWigData to extract data block items }