# Path: hifive/hic_data.py
# class HiCData(object):
#     def __init__(self, filename, mode='r', silent=False):
#     def __getitem__(self, key):
#     def __setitem__(self, key, value):
#     def save(self):
#     def load(self):
#     def _find_cut_sites(self):
#     def load_data_from_raw(self, fendfilename, filelist, maxinsert, skip_duplicate_filtering=False):
#     def load_data_from_bam(self, fendfilename, filelist, maxinsert, skip_duplicate_filtering=False):
#     def load_data_from_mat(self, fendfilename, filename, basefend=0):
#     def _load_binned_data_from_mat(self, filename):
#     def load_binned_data_from_matrices(self, fendfilename, filename, format=None):
#     def _load_txt_matrices(self, data, filename, chroms, bins, bin_indices):
#     def _load_hdf5_npz_matrices(self, data, filename, chroms, bins, bin_indices, format):
#     def _find_fend_pairs(self, data, fend_pairs, skip_duplicate_filtering=False):
#     def _find_bin_pairs(self, data, bin_pairs, skip_duplicate_filtering=False):
#     def _clean_fend_pairs(self, fend_pairs):
#     def _parse_fend_pairs(self, fend_pairs):
#     def _parse_binned_fend_pairs(self, fend_pairs):
#     def export_to_mat(self, outfilename):
#                         N = pos1.shape[0]
#                         N = (-0.5 + (0.25 + 2 * tempdata.shape[0]))
#                         N = (0.5 + (0.25 + 2 * tempdata.shape[0]))
#                     N, M = tempdata.shape


import os
import sys
import subprocess
import unittest
import numpy
    import pysam
import h5py
from operator import mul
from hifive import hic_data
#!/usr/bin/env python


try:
except:
    pass



class HiCData(unittest.TestCase):
    def setUp(self):
        self.mat_data = h5py.File('test/data/test_import_mat.hcd', 'r')
        self.raw_data = h5py.File('test/data/test_import_raw.hcd', 'r')
        self.bam_data = h5py.File('test/data/test_import_bam.hcd', 'r')
        self.bin_mat_data = h5py.File('test/data/test_import_bin_mat.hcd', 'r')
        self.bin_raw_data = h5py.File('test/data/test_import_bin_raw.hcd', 'r')
        self.bin_bam_data = h5py.File('test/data/test_import_bin_bam.hcd', 'r')
        self.matrix_data = h5py.File('test/data/test_import_matrix.hcd', 'r')
        self.fend_fname = 'test/data/test.fends'
        self.binned_fend_fname = 'test/data/test_binned.fends'
        self.mat_fname = 'test/data/test.mat'
        self.raw_fname = 'test/data/test.raw'
        self.bam_fname1 = 'test/data/test_hic_1.bam'
        self.bam_fname2 = 'test/data/test_hic_2.bam'
        self.matrix_fname = 'test/data/*.test.matrix'

    def test_hic_raw_data_creation(self):

# Path: hifive/hic_data.py
# class HiCData(object):
#     def __init__(self, filename, mode='r', silent=False):
#     def __getitem__(self, key):
#     def __setitem__(self, key, value):
#     def save(self):
#     def load(self):
#     def _find_cut_sites(self):
#     def load_data_from_raw(self, fendfilename, filelist, maxinsert, skip_duplicate_filtering=False):
#     def load_data_from_bam(self, fendfilename, filelist, maxinsert, skip_duplicate_filtering=False):
#     def load_data_from_mat(self, fendfilename, filename, basefend=0):
#     def _load_binned_data_from_mat(self, filename):
#     def load_binned_data_from_matrices(self, fendfilename, filename, format=None):
#     def _load_txt_matrices(self, data, filename, chroms, bins, bin_indices):
#     def _load_hdf5_npz_matrices(self, data, filename, chroms, bins, bin_indices, format):
#     def _find_fend_pairs(self, data, fend_pairs, skip_duplicate_filtering=False):
#     def _find_bin_pairs(self, data, bin_pairs, skip_duplicate_filtering=False):
#     def _clean_fend_pairs(self, fend_pairs):
#     def _parse_fend_pairs(self, fend_pairs):
#     def _parse_binned_fend_pairs(self, fend_pairs):
#     def export_to_mat(self, outfilename):
#                         N = pos1.shape[0]
#                         N = (-0.5 + (0.25 + 2 * tempdata.shape[0]))
#                         N = (0.5 + (0.25 + 2 * tempdata.shape[0]))
#                     N, M = tempdata.shape


# Path: test/test_hic_data.py
import os
import sys
import subprocess
import unittest
import numpy
    import pysam
import h5py
from operator import mul
from hifive import hic_data

#!/usr/bin/env python


try:
except:
    pass



class HiCData(unittest.TestCase):
    def setUp(self):
        self.mat_data = h5py.File('test/data/test_import_mat.hcd', 'r')
        self.raw_data = h5py.File('test/data/test_import_raw.hcd', 'r')
        self.bam_data = h5py.File('test/data/test_import_bam.hcd', 'r')
        self.bin_mat_data = h5py.File('test/data/test_import_bin_mat.hcd', 'r')
        self.bin_raw_data = h5py.File('test/data/test_import_bin_raw.hcd', 'r')
        self.bin_bam_data = h5py.File('test/data/test_import_bin_bam.hcd', 'r')
        self.matrix_data = h5py.File('test/data/test_import_matrix.hcd', 'r')
        self.fend_fname = 'test/data/test.fends'
        self.binned_fend_fname = 'test/data/test_binned.fends'
        self.mat_fname = 'test/data/test.mat'
        self.raw_fname = 'test/data/test.raw'
        self.bam_fname1 = 'test/data/test_hic_1.bam'
        self.bam_fname2 = 'test/data/test_hic_2.bam'
        self.matrix_fname = 'test/data/*.test.matrix'

    def test_hic_raw_data_creation(self):

        subprocess.call("./bin/hifive hic-data -q -R %s -i 500 %s test/data/test_temp.hcd" %