Data Integrator (Python API)
Public Member Functions | List of all members
cls.GlobalLDBlocks.CLDBlock Class Reference

Helper class for intervals/ranges/blocks. More...

Public Member Functions

def __init__ (s, begin, end, identifier=None)
 Constructor. More...
 
def __str__ (s)
 Stringify. More...
 
def GetBegin (s)
 Get begin of interval. More...
 
def GetEnd (s)
 Get end of interval. More...
 
def GetID (s)
 Get unique interval identifier. More...
 
def Covers (s, point1, point2=None)
 Does the interval include this point/interval? More...
 
def Overlaps (s, begin, end)
 Does the interval overlap with this interval? More...
 

Detailed Description

Helper class for intervals/ranges/blocks.

Constructor & Destructor Documentation

◆ __init__()

def cls.GlobalLDBlocks.CLDBlock.__init__ (   s,
  begin,
  end,
  identifier = None 
)

Constructor.

    @param begin  Start position (@c Int) of the interval.
    @param end    End position (@c Int) of the interval.
    @param identifier  A unique ID for this LD block. It is in the duty of
    the caller to provide a unique ID and that the ID is consistent
    between runs of applications. For example, the line number of a file,
    where LD information is stored, can be used.

Member Function Documentation

◆ __str__()

def cls.GlobalLDBlocks.CLDBlock.__str__ (   s)

Stringify.

Returns
String.

◆ Covers()

def cls.GlobalLDBlocks.CLDBlock.Covers (   s,
  point1,
  point2 = None 
)

Does the interval include this point/interval?

    @param point1  Point index on chromosome (@c Int)
    @param point2  (@c Int) If provided, a check for interval overlap will
     be done. point1 > point2 is allowed.
    @return @c True if the point is contained in the close interval, @c
     False if not.

◆ GetBegin()

def cls.GlobalLDBlocks.CLDBlock.GetBegin (   s)

Get begin of interval.

◆ GetEnd()

def cls.GlobalLDBlocks.CLDBlock.GetEnd (   s)

Get end of interval.

◆ GetID()

def cls.GlobalLDBlocks.CLDBlock.GetID (   s)

Get unique interval identifier.

◆ Overlaps()

def cls.GlobalLDBlocks.CLDBlock.Overlaps (   s,
  begin,
  end 
)

Does the interval overlap with this interval?

    @param begin  Start of interval (@c Int).
    @param end    End of interval (@ Int).
    @return Like @c Covers.

The documentation for this class was generated from the following file: