# Path: tools.py
# class Tracker(object):
# 	"""Tracks progress of task"""
# 	def __init__(self, name, size, currPercentage=0, count=0):
# 		self.name = name	#name of task
# 		self.size = size	#total size of task (e.g. number of lines in file)
# 		self.currPercentage = currPercentage	#current percentage of task complete
# 		self.count = count		#absolute amount of task complete (e.g. number of lines of file read)
# 	def increment(self):
# 		if self.size !=0 and self.size is not None:
# 			self.count += 1
# 			newPercentage = self.currPercentage + 1
# 			if float(self.count)/self.size >= float(newPercentage)/100:	#if at least X% of the file has been read, print percentage
# 				self.currPercentage = newPercentage
# 				print("{} {}% complete".format(self.name, self.currPercentage))	


import sys
import data_tools as dt
import simple_tad as tad
import heatmap as hm
import numpy as np
from tools import Tracker
sys.path.append("..")

def matFromDixon(path, chrom):
	"""Creates contact matrix from Dixon tsv data"""
	numBins = chrom.getLength()
	mat = np.zeros((numBins, numBins))

# Path: tools.py
# class Tracker(object):
# 	"""Tracks progress of task"""
# 	def __init__(self, name, size, currPercentage=0, count=0):
# 		self.name = name	#name of task
# 		self.size = size	#total size of task (e.g. number of lines in file)
# 		self.currPercentage = currPercentage	#current percentage of task complete
# 		self.count = count		#absolute amount of task complete (e.g. number of lines of file read)
# 	def increment(self):
# 		if self.size !=0 and self.size is not None:
# 			self.count += 1
# 			newPercentage = self.currPercentage + 1
# 			if float(self.count)/self.size >= float(newPercentage)/100:	#if at least X% of the file has been read, print percentage
# 				self.currPercentage = newPercentage
# 				print("{} {}% complete".format(self.name, self.currPercentage))	


# Path: scripts/fig1.py
import sys
import data_tools as dt
import simple_tad as tad
import heatmap as hm
import numpy as np
from tools import Tracker

sys.path.append("..")

def matFromDixon(path, chrom):
	"""Creates contact matrix from Dixon tsv data"""
	numBins = chrom.getLength()
	mat = np.zeros((numBins, numBins))

	tracker = Tracker("Reading " + path, chrom.size)