<commit_before>#!/usr/bin/env python
#(c) 2014 <NAME> (<EMAIL>)

"""
This is a module contains scripts for generating plots from compact and full
matrices of interaction data.

Input data
----------

These functions take either compact or full 3d data matrices.

Concepts
--------

Data can either be arranged in compact or complete arrays. Compact arrays
are N x M, where N is the number of fends or bins, and M is the maximum
distance between fends or bins. This is useful for working with sets of short
interactions. Data can be raw, fend-corrected, distance-dependence removed,
or enrichment values. Arrays are 3-dimensional with observed values in the
first layer of d3, expected values in the second layer of d3.

-----------------------------------------------------------------------------

API documentation
-----------------



"""

import os
import sys
from math import log, exp

import h5py
import numpy
try:
    from PIL import Image
except:
    pass
try:
    import pyx
except:
    pass


def plot_compact_array(data, maxscore=None, minscore=None, symmetricscaling=True, logged=True,
                       min_color=(0.0, 0.0, 1.0), mid_color=(1.0, 1.0, 1.0), max_color=(1.0, 0.0, 0.0)):
    """
    plot_compact_array method

    Rescale and fill in bitmap from a HiC compact array.
<commit_msg>fixed pyx import statement in plotting.py<commit_after>#!/usr/bin/env python
#(c) 2014 <NAME> (<EMAIL>)

"""
This is a module contains scripts for generating plots from compact and full
matrices of interaction data.

Input data
----------

These functions take either compact or full 3d data matrices.

Concepts
--------

Data can either be arranged in compact or complete arrays. Compact arrays
are N x M, where N is the number of fends or bins, and M is the maximum
distance between fends or bins. This is useful for working with sets of short
interactions. Data can be raw, fend-corrected, distance-dependence removed,
or enrichment values. Arrays are 3-dimensional with observed values in the
first layer of d3, expected values in the second layer of d3.

-----------------------------------------------------------------------------

API documentation
-----------------



"""

import os
import sys
from math import log, exp

import h5py
import numpy
try:
    from PIL import Image
except:
    pass
try:
    from pyx import *
except:
    pass


def plot_compact_array(data, maxscore=None, minscore=None, symmetricscaling=True, logged=True,
                       min_color=(0.0, 0.0, 1.0), mid_color=(1.0, 1.0, 1.0), max_color=(1.0, 0.0, 0.0)):
    """
    plot_compact_array method

    Rescale and fill in bitmap from a HiC compact array.

{'fraction_non_alphanumeric': 0.14979299962363568, 'fraction_numerical': 0.020323673315769664, 'mean_word_length': 2.5205298013245034, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2934952', 'n_tokens_mistral': 792, 'n_tokens_neox': 728, 'n_words': 336}