/** * Gets a file span over the data immediately following this span. * @return The a pointer to data immediately following this span. */ @Override public SAMFileSpan getContentsFollowing() { if(chunks.isEmpty()) throw new SAMException("Unable to get the file pointer following this one: no data present."); validateSorted(); return new BAMFileSpan(new Chunk(chunks.get(chunks.size()-1).getChunkEnd(),Long.MAX_VALUE)); }
/** * Gets a file span over the data immediately following this span. * @return The a pointer to data immediately following this span. */ @Override public SAMFileSpan getContentsFollowing() { if(chunks.isEmpty()) throw new SAMException("Unable to get the file pointer following this one: no data present."); validateSorted(); return new BAMFileSpan(new Chunk(chunks.get(chunks.size()-1).getChunkEnd(),Long.MAX_VALUE)); }
/** * Gets a file span over the data immediately following this span. * @return The a pointer to data immediately following this span. */ public SAMFileSpan getContentsFollowing() { if(chunks.isEmpty()) throw new SAMException("Unable to get the file pointer following this one: no data present."); validateSorted(); return new BAMFileSpan(new Chunk(chunks.get(chunks.size()-1).getChunkEnd(),Long.MAX_VALUE)); }
/** * The list of chunks is often represented as an array of * longs where every even-numbered index is a start coordinate * and every odd-numbered index is a stop coordinate. Convert * from that format back to a list of chunks. * @param coordinateArray List of chunks to convert. * @return A list of chunks. */ protected static SAMFileSpan toChunkList(final long[] coordinateArray) { if(coordinateArray.length % 2 != 0) throw new SAMException("Data supplied does not appear to be in coordinate array format."); final BAMFileSpan chunkList = new BAMFileSpan(); for(int i = 0; i < coordinateArray.length; i += 2) chunkList.add(new Chunk(coordinateArray[i],coordinateArray[i+1])); chunkList.validateSorted(); return chunkList; }
/** * The list of chunks is often represented as an array of * longs where every even-numbered index is a start coordinate * and every odd-numbered index is a stop coordinate. Convert * from that format back to a list of chunks. * @param coordinateArray List of chunks to convert. * @return A list of chunks. */ protected static SAMFileSpan toChunkList(final long[] coordinateArray) { if(coordinateArray.length % 2 != 0) throw new SAMException("Data supplied does not appear to be in coordinate array format."); final BAMFileSpan chunkList = new BAMFileSpan(); for(int i = 0; i < coordinateArray.length; i += 2) chunkList.add(new Chunk(coordinateArray[i],coordinateArray[i+1])); chunkList.validateSorted(); return chunkList; }
/** * The list of chunks is often represented as an array of * longs where every even-numbered index is a start coordinate * and every odd-numbered index is a stop coordinate. Convert * from that format back to a list of chunks. * @param coordinateArray List of chunks to convert. * @return A list of chunks. */ protected static SAMFileSpan toChunkList(final long[] coordinateArray) { if(coordinateArray.length % 2 != 0) throw new SAMException("Data supplied does not appear to be in coordinate array format."); final BAMFileSpan chunkList = new BAMFileSpan(); for(int i = 0; i < coordinateArray.length; i += 2) chunkList.add(new Chunk(coordinateArray[i],coordinateArray[i+1])); chunkList.validateSorted(); return chunkList; }
return clone(); validateSorted();
return clone(); validateSorted();
return clone(); validateSorted();
return clone(); validateSorted();
return clone(); validateSorted();