Chunk



Chunk

JavaScript is disabled on your browser.



  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, java.lang.Comparable<Chunk>

    public class Chunk
    extends java.lang.Object
    implements java.lang.Cloneable, java.io.Serializable, java.lang.Comparable<Chunk>

    A [start,stop) file pointer pairing into the BAM file, stored
    as a BAM file index. A chunk is represented as a single 64-bit
    value where the high-order 48 bits point to the location of the
    start of a compressed BGZF block within a BGZF file and the
    low-order 16 bits point to a position within the decompressed
    data in the BGZF block.

    See the SAM/BAM spec for more details.

    See Also:
    Serialized Form


    • Constructor Summary

      Constructors 
      Constructor and Description
      Chunk(long start,
      long end)
       



    • Method Summary



      • Methods inherited from class java.lang.Object

        finalize, getClass, notify, notifyAll, wait, wait, wait



    • Method Detail



      • clone

        public Chunk clone()
        Overrides:
        clone in class java.lang.Object















      • overlaps

        public boolean overlaps(Chunk other)

        Returns whether two chunks overlap.

        Parameters:
        other – Chunk to which this should be compared.
        Returns:
        True if the chunks overlap. Returns false if the two chunks abut or are disjoint.



      • isAdjacentTo

        public boolean isAdjacentTo(Chunk other)

        Returns whether two chunks overlap.

        Parameters:
        other – Chunk to which this should be compared.
        Returns:
        True if the two chunks are adjacent. Returns false if the chunks overlap or are discontinuous.



      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object





      • optimizeChunkList

        public static java.util.List<Chunk> optimizeChunkList(java.util.List<Chunk> chunks,
                                              long minimumOffset)
        Parameters:
        minimumOffset – Discard chunks that end before this file offset.
        Returns:
        sorted list of chunks in which adjacent chunks are coalesced.



Read more here: Source link