lib5c.writers.wustl module

Module for writing WashU Epigenome Browser-style interaction data files.

lib5c.writers.wustl.main()[source]
lib5c.writers.wustl.write_wustl(counts, outfile, pixelmap)[source]

Writes a WashU Epigenome Browser-style interaction data file.

Parameters
  • counts (dict of 2d arrays) – The counts to be written. The keys are the region names. The values are the arrays of counts values for that region. These arrays should be square and symmetric.

  • outfile (str) – String reference to the file to write counts to.

  • pixelmap (dict of lists of dicts) –

    The keys of the outer dict are region names. The values are lists, where the i th entry represents the i th bin in that region. Bins are represented as dicts with the following structure:

    {
        'chrom': str,
        'start': int,
        'end'  : int,
        'name' : str
    }
    

    See lib5c.parsers.get_pixelmap().