<commit_before>#!/usr/bin/env python

"""A class for handling HiC fend information."""

import os
import sys

import numpy
import h5py
from reportlab.graphics.shapes import Drawing
from reportlab.graphics.charts.lineplots import LinePlot
from reportlab.lib.colors import Color


class Fend(object):

    """
    This class handles restriction enzyme digest-generated fragment data for HiC experiments.

    This class stores a list of chromosomes, a dictionary for converting from chromosome label to integer and back, fragment starts, stops, and chromosome number in an h5dict.
        
    .. note::
      This class is also available as hifive.Fend

    When initialized, this class creates an h5dict in which to store all data associated with this object.

    :param filename: The file name of the h5dict. This should end with the suffix '.hdf5'
    :type filename: str.
    :param mode: The mode to open the h5dict with. This should be 'w' for creating or overwriting an h5dict with name given in filename.
    :type mode: str.
    :param silent: Indicates whether to print information about function execution for this object.
    :type silent: bool.
    :returns: :class:`Fend <hifive.fend.Fend>` class object

    :attributes: * **file** (*str.*) - A string containing the name of the file passed during object creation for saving the object to.<commit_msg>Removed dependency on reportlab (working in progress to eliminate pyx)<commit_after>#!/usr/bin/env python

"""A class for handling HiC fend information."""

import os
import sys

import numpy
import h5py
#from reportlab.graphics.shapes import Drawing
#from reportlab.graphics.charts.lineplots import LinePlot
#from reportlab.lib.colors import Color


class Fend(object):

    """
    This class handles restriction enzyme digest-generated fragment data for HiC experiments.

    This class stores a list of chromosomes, a dictionary for converting from chromosome label to integer and back, fragment starts, stops, and chromosome number in an h5dict.
        
    .. note::
      This class is also available as hifive.Fend

    When initialized, this class creates an h5dict in which to store all data associated with this object.

    :param filename: The file name of the h5dict. This should end with the suffix '.hdf5'
    :type filename: str.
    :param mode: The mode to open the h5dict with. This should be 'w' for creating or overwriting an h5dict with name given in filename.
    :type mode: str.
    :param silent: Indicates whether to print information about function execution for this object.
    :type silent: bool.
    :returns: :class:`Fend <hifive.fend.Fend>` class object

    :attributes: * **file** (*str.*) - A string containing the name of the file passed during object creation for saving the object to.
{'fraction_non_alphanumeric': 0.06626074498567336, 'fraction_numerical': 0.00501432664756447, 'mean_word_length': 3.7179054054054053, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '2917948', 'n_tokens_mistral': 757, 'n_tokens_neox': 715, 'n_words': 368}