Chromatin functions

showDomains(domains, linespec='-', **kwargs)[source]

A convenient function that can be used to visualize Hi-C structural domains. kwargs will be passed to matplotlib.pyplot.plot().

Parameters:domains (numpy.ndarray) – a 2D array of Hi-C domains, such as [[start1, end1], [start2, end2], ...].
showEmbedding(modes, labels=None, trace=True, headtail=True, cmap='prism')[source]

Visualizes Laplacian embedding of Hi-C data.

Parameters:modes – modes in which loci are embedded. It can only have 2 or 3 modes for the purpose

of visualization. :type modes: ModeSet

Parameters:
  • labels (list) – a list of integers indicating the segmentation of the sequence.
  • trace (bool) – if True then the trace of the sequence will be indicated by a grey dashed line.
  • headtail – if True then a star and a closed circle will indicate the head and the tail

of the sequence respectively. :type headtail: bool

Parameters:cmap (str) – the color map used to render the labels.
getDomainList(labels)[source]

Returns a list of domain separations. The list has two columns: the first is for the domain starts and the second is for the domain ends.