From dc61a4a1e282f41cb2b6bec8e76fa6c1fb8d78d6 Mon Sep 17 00:00:00 2001 From: whuang022nccu Date: Mon, 25 Oct 2021 07:34:27 +0800 Subject: [PATCH] fix straw issue 74 (https://github.com/aidenlab/straw/issues/74) & pytorch device issue --- build/lib/hicplus/__init__.py | 4 + build/lib/hicplus/model.py | 115 +++++++++++++ build/lib/hicplus/pred_chromosome.py | 121 +++++++++++++ build/lib/hicplus/pred_genome.py | 67 ++++++++ build/lib/hicplus/testConvNet.py | 116 +++++++++++++ build/lib/hicplus/trainConvNet.py | 129 ++++++++++++++ build/lib/hicplus/train_models.py | 41 +++++ build/lib/hicplus/utils.py | 179 ++++++++++++++++++++ build/scripts-3.9/hicplus | 89 ++++++++++ dist/hicplus-1.1.0-py3.9.egg | Bin 0 -> 22545 bytes hicplus.egg-info/PKG-INFO | 16 ++ hicplus.egg-info/SOURCES.txt | 15 ++ hicplus.egg-info/dependency_links.txt | 1 + hicplus.egg-info/top_level.txt | 1 + hicplus/__pycache__/__init__.cpython-39.pyc | Bin 0 -> 206 bytes hicplus/pred_chromosome.py | 4 +- hicplus/utils.py | 30 +++- 17 files changed, 924 insertions(+), 4 deletions(-) create mode 100644 build/lib/hicplus/__init__.py create mode 100644 build/lib/hicplus/model.py create mode 100644 build/lib/hicplus/pred_chromosome.py create mode 100644 build/lib/hicplus/pred_genome.py create mode 100644 build/lib/hicplus/testConvNet.py create mode 100644 build/lib/hicplus/trainConvNet.py create mode 100644 build/lib/hicplus/train_models.py create mode 100644 build/lib/hicplus/utils.py create mode 100755 build/scripts-3.9/hicplus create mode 100644 dist/hicplus-1.1.0-py3.9.egg create mode 100644 hicplus.egg-info/PKG-INFO create mode 100644 hicplus.egg-info/SOURCES.txt create mode 100644 hicplus.egg-info/dependency_links.txt create mode 100644 hicplus.egg-info/top_level.txt create mode 100644 hicplus/__pycache__/__init__.cpython-39.pyc diff --git a/build/lib/hicplus/__init__.py b/build/lib/hicplus/__init__.py new file mode 100644 index 0000000..570076a --- /dev/null +++ b/build/lib/hicplus/__init__.py @@ -0,0 +1,4 @@ + +__version__='1.1.0' +__license__='GPLv3+' +Me = __file__ diff --git a/build/lib/hicplus/model.py b/build/lib/hicplus/model.py new file mode 100644 index 0000000..b5be299 --- /dev/null +++ b/build/lib/hicplus/model.py @@ -0,0 +1,115 @@ +import torch +from torch.autograd import Variable +import torch.nn as nn +import torch.nn.functional as F +import numpy as np +from torch.utils import data +import gzip +import sys +import torch.optim as optim +conv2d1_filters_numbers = 8 +conv2d1_filters_size = 9 +conv2d2_filters_numbers = 8 +conv2d2_filters_size = 1 +conv2d3_filters_numbers = 1 +conv2d3_filters_size = 5 + +class Net(nn.Module): + def __init__(self, D_in, D_out): + super(Net, self).__init__() + # 1 input image channel, 6 output channels, 5x5 square convolution + # kernel + self.conv1 = nn.Conv2d(1, conv2d1_filters_numbers, conv2d1_filters_size) + self.conv2 = nn.Conv2d(conv2d1_filters_numbers, conv2d2_filters_numbers, conv2d2_filters_size) + self.conv3 = nn.Conv2d(conv2d2_filters_numbers, 1, conv2d3_filters_size) + + def forward(self, x): + #print("start forwardingf") + x = self.conv1(x) + x = F.relu(x) + x = self.conv2(x) + x = F.relu(x) + x = self.conv3(x) + x = F.relu(x) + return x +''' + def num_flat_features(self, x): + size = x.size()[1:] # all dimensions except the batch dimension + num_features = 1 + for s in size: + num_features *= s + return num_features +''' +''' +net = Net(40, 24) + + + +#sys.exit() +#low_resolution_samples = low_resolution_samples.reshape((low_resolution_samples.shape[0], 40, 40)) +#print low_resolution_samples[0:1, :,: ,: ].shape +#low_resolution_samples = torch.from_numpy(low_resolution_samples[0:1, :,: ,: ]) +#X = Variable(low_resolution_samples) +#print X +#Y = Variable(torch.from_numpy(Y[0])) +#X = Variable(torch.randn(1, 1, 40, 40)) +#print X +optimizer = optim.SGD(net.parameters(), lr=0.0001, momentum=0.9) +criterion = nn.MSELoss() +for epoch in range(2): # loop over the dataset multiple times + print "epoch", epoch + + running_loss = 0.0 + for i, data in enumerate(train_loader, 0): + # get the inputs + inputs, labels = data + #print(inputs.size()) + #print(labels.size()) + #print type(inputs) + + # wrap them in Variable + inputs, labels = Variable(inputs), Variable(labels) + + # zero the parameter gradients + optimizer.zero_grad() + + # forward + backward + optimize + outputs = net(inputs) + #print outputs + loss = criterion(outputs, labels) + + loss.backward() + optimizer.step() + print i + # print statistics + #print type(loss) + #print loss + #print loss.data[0] + #print loss.data + #print type(data), len(data) + #print "the key is ", type(data[0]) + + + +print('Finished Training') + + +output = net(X) +print(output) +print type(output) + +loss = criterion(output, Y) + + +net.zero_grad() # zeroes the gradient buffers of all parameters + +print('conv1.bias.grad before backward') +print(net.conv1.bias.grad) + +loss.backward() + +print('conv1.bias.grad after backward') +print(net.conv1.weight.grad) + +''' + diff --git a/build/lib/hicplus/pred_chromosome.py b/build/lib/hicplus/pred_chromosome.py new file mode 100644 index 0000000..1e57445 --- /dev/null +++ b/build/lib/hicplus/pred_chromosome.py @@ -0,0 +1,121 @@ +import os,sys +from torch.utils import data +from hicplus import model +import torch +import torch.nn as nn +import torch.optim as optim +from torch.autograd import Variable +import straw +from scipy.sparse import csr_matrix, coo_matrix, vstack, hstack +from scipy import sparse +import numpy as np +from hicplus import utils +from time import gmtime, strftime +from datetime import datetime +import argparse + +startTime = datetime.now() + +use_gpu = 0 #opt.cuda +#if use_gpu and not torch.cuda.is_available(): +# raise Exception("No GPU found, please run without --cuda") + +def predict(M,N,inmodel): + + prediction_1 = np.zeros((N, N)) + + for low_resolution_samples, index in utils.divide(M): + + #print(index.shape) + + batch_size = low_resolution_samples.shape[0] #256 + + lowres_set = data.TensorDataset(torch.from_numpy(low_resolution_samples), torch.from_numpy(np.zeros(low_resolution_samples.shape[0]))) + try: + lowres_loader = torch.utils.data.DataLoader(lowres_set, batch_size=batch_size, shuffle=False) + except: + continue + + hires_loader = lowres_loader + + m = model.Net(40, 28) + m.load_state_dict(torch.load(inmodel, map_location=torch.device('cpu'))) + + if torch.cuda.is_available(): + m = m.cuda() + + for i, v1 in enumerate(lowres_loader): + _lowRes, _ = v1 + _lowRes = Variable(_lowRes).float() + if use_gpu: + _lowRes = _lowRes.cuda() + y_prediction = m(_lowRes) + + + y_predict = y_prediction.data.cpu().numpy() + + + # recombine samples + length = int(y_predict.shape[2]) + y_predict = np.reshape(y_predict, (y_predict.shape[0], length, length)) + + + for i in range(0, y_predict.shape[0]): + + x = int(index[i][1]) + y = int(index[i][2]) + #print np.count_nonzero(y_predict[i]) + prediction_1[x+6:x+34, y+6:y+34] = y_predict[i] + + return(prediction_1) + +def chr_pred(hicfile, chrN1, chrN2, binsize, inmodel): + M = utils.matrix_extract(chrN1, chrN2, binsize, hicfile) + #print(M.shape) + N = M.shape[0] + + chr_Mat = predict(M, N, inmodel) + + +# if Ncol > Nrow: +# chr_Mat = chr_Mat[:Ncol, :Nrow] +# chr_Mat = chr_Mat.T +# if Nrow > Ncol: +# chr_Mat = chr_Mat[:Nrow, :Ncol] +# print(dat.head()) + return(chr_Mat) + + + +def writeBed(Mat, outname,binsize, chrN1,chrN2): + with open(outname,'w') as chrom: + r, c = Mat.nonzero() + for i in range(r.size): + contact = int(round(Mat[r[i],c[i]])) + if contact == 0: + continue + #if r[i]*binsize > Len1 or (r[i]+1)*binsize > Len1: + # continue + #if c[i]*binsize > Len2 or (c[i]+1)*binsize > Len2: + # continue + line = [chrN1, r[i]*binsize, (r[i]+1)*binsize, + chrN2, c[i]*binsize, (c[i]+1)*binsize, contact] + chrom.write('chr'+str(line[0])+':'+str(line[1])+'-'+str(line[2])+ + '\t'+'chr'+str(line[3])+':'+str(line[4])+'-'+str(line[5])+'\t'+str(line[6])+'\n') + +def main(args): + chrN1, chrN2 = args.chrN + binsize = args.binsize + inmodel = args.model + hicfile = args.inputfile + #name = os.path.basename(inmodel).split('.')[0] + #outname = 'chr'+str(chrN1)+'_'+name+'_'+str(binsize//1000)+'pred.txt' + outname = args.outputfile + Mat = chr_pred(hicfile,chrN1,chrN2,binsize,inmodel) + print(Mat.shape) + writeBed(Mat, outname, binsize,chrN1, chrN2) + #print(enhM.shape) +if __name__ == '__main__': + main() + +print(datetime.now() - startTime) diff --git a/build/lib/hicplus/pred_genome.py b/build/lib/hicplus/pred_genome.py new file mode 100644 index 0000000..4695455 --- /dev/null +++ b/build/lib/hicplus/pred_genome.py @@ -0,0 +1,67 @@ +#!/usr/bin/env python +import os,sys +from torch.utils import data +from hicplus import model +import torch +import torch.nn as nn +import torch.optim as optim +from torch.autograd import Variable +import straw +from scipy.sparse import csr_matrix, coo_matrix, vstack, hstack +from scipy import sparse +import numpy as np +from hicplus import utils +from time import gmtime, strftime +from datetime import datetime +import argparse +from hicplus import pred_chromosome + +startTime = datetime.now() + +def pred_genome(hicfile, binsize, inmodel): + hic_info = utils.read_hic_header(hicfile) + chromindex = {} + i = 0 + for c, Len in hic_info['chromsizes'].items(): + chromindex[c] = i + i += 1 + print(hic_info) + + name = os.path.basename(inmodel).split('.')[0] + with open('genome.{}_{}.matrix.txt'.format(int(binsize/1000),name), 'w') as genome: + for c1, Len1 in hic_info['chromsizes'].items(): + for c2, Len2 in hic_info['chromsizes'].items(): + if chromindex[c1] > chromindex[c2]: + continue + if c1 == 'M' or c2 == 'M': + continue + try: + Mat = pred_chromosome.chr_pred(hicfile, c1, c2, binsize, inmodel) + r, c = Mat.nonzero() + for i in range(r.size): + contact = int(round(Mat[r[i],c[i]])) + if contact == 0: + continue + if r[i]*binsize > Len1 or (r[i]+1)*binsize > Len1: + continue + if c[i]*binsize > Len2 or (c[i]+1)*binsize > Len2: + continue + line = [c1, r[i]*binsize, (r[i]+1)*binsize, + c2, c[i]*binsize, (c[i]+1)*binsize, contact] + genome.write('chr'+str(line[0])+':'+str(line[1])+'-'+str(line[2])+ + '\t'+'chr'+str(line[3])+':'+str(line[4])+'-'+str(line[5])+'\t'+str(line[6])+'\n') + except: + pass + + + + +def main(args): + binsize = args.binsize + inmodel = args.model + hicfile = args.inputfile + pred_genome(hicfile, binsize, inmodel) + +if __name__ == '__main__': + main() + diff --git a/build/lib/hicplus/testConvNet.py b/build/lib/hicplus/testConvNet.py new file mode 100644 index 0000000..c436b6a --- /dev/null +++ b/build/lib/hicplus/testConvNet.py @@ -0,0 +1,116 @@ +# Author: Yan Zhang +# Email: zhangyan.cse (@) gmail.com + +import sys +import numpy as np +import matplotlib.pyplot as plt +import pickle +import os +import gzip +import model +from torch.utils import data +import torch +import torch.optim as optim +from torch.autograd import Variable +from time import gmtime, strftime +import sys +import torch.nn as nn + +use_gpu = 1 + +conv2d1_filters_numbers = 8 +conv2d1_filters_size = 9 +conv2d2_filters_numbers = 8 +conv2d2_filters_size = 1 +conv2d3_filters_numbers = 1 +conv2d3_filters_size = 5 + + +down_sample_ratio = 16 +epochs = 10 +HiC_max_value = 100 + + + +# This block is the actual training data used in the training. The training data is too large to put on Github, so only toy data is used. +# cell = "GM12878_replicate" +# chrN_range1 = '1_8' +# chrN_range = '1_8' + +# low_resolution_samples = np.load(gzip.GzipFile('/home/zhangyan/SRHiC_samples/'+cell+'down16_chr'+chrN_range+'.npy.gz', "r")).astype(np.float32) * down_sample_ratio +# high_resolution_samples = np.load(gzip.GzipFile('/home/zhangyan/SRHiC_samples/original10k/'+cell+'_original_chr'+chrN_range+'.npy.gz', "r")).astype(np.float32) + +# low_resolution_samples = np.minimum(HiC_max_value, low_resolution_samples) +# high_resolution_samples = np.minimum(HiC_max_value, high_resolution_samples) + + +low_resolution_samples = np.load(gzip.GzipFile('../../data/GM12878_replicate_down16_chr19_22.npy.gz', "r")).astype(np.float32) * down_sample_ratio + +low_resolution_samples = np.minimum(HiC_max_value, low_resolution_samples) + +batch_size = low_resolution_samples.shape[0] + +# Reshape the high-quality Hi-C sample as the target value of the training. +sample_size = low_resolution_samples.shape[-1] +padding = conv2d1_filters_size + conv2d2_filters_size + conv2d3_filters_size - 3 +half_padding = padding / 2 +output_length = sample_size - padding + + +print(low_resolution_samples.shape) + +lowres_set = data.TensorDataset(torch.from_numpy(low_resolution_samples), torch.from_numpy(np.zeros(low_resolution_samples.shape[0]))) +lowres_loader = torch.utils.data.DataLoader(lowres_set, batch_size=batch_size, shuffle=False) + +production = False +try: + high_resolution_samples = np.load(gzip.GzipFile('../../data/GM12878_replicate_original_chr19_22.npy.gz', "r")).astype(np.float32) + high_resolution_samples = np.minimum(HiC_max_value, high_resolution_samples) + Y = [] + for i in range(high_resolution_samples.shape[0]): + no_padding_sample = high_resolution_samples[i][0][half_padding:(sample_size-half_padding) , half_padding:(sample_size - half_padding)] + Y.append(no_padding_sample) + Y = np.array(Y).astype(np.float32) + hires_set = data.TensorDataset(torch.from_numpy(Y), torch.from_numpy(np.zeros(Y.shape[0]))) + hires_loader = torch.utils.data.DataLoader(hires_set, batch_size=batch_size, shuffle=False) +except: + production = True + hires_loader = lowres_loader + +Net = model.Net(40, 28) +Net.load_state_dict(torch.load('../model/pytorch_model_12000')) +if use_gpu: + Net = Net.cuda() + +_loss = nn.MSELoss() + + +running_loss = 0.0 +running_loss_validate = 0.0 +reg_loss = 0.0 + + +for i, (v1, v2) in enumerate(zip(lowres_loader, hires_loader)): + _lowRes, _ = v1 + _highRes, _ = v2 + + + _lowRes = Variable(_lowRes) + _highRes = Variable(_highRes) + + + if use_gpu: + _lowRes = _lowRes.cuda() + _highRes = _highRes.cuda() + y_prediction = Net(_lowRes) + if (not production): + loss = _loss(y_prediction, _highRes) + + + running_loss += loss.data[0] + +print('-------', i, running_loss, strftime("%Y-%m-%d %H:%M:%S", gmtime())) + +y_prediction = y_prediction.data.cpu().numpy() + +print(y_prediction.shape) diff --git a/build/lib/hicplus/trainConvNet.py b/build/lib/hicplus/trainConvNet.py new file mode 100644 index 0000000..aec543f --- /dev/null +++ b/build/lib/hicplus/trainConvNet.py @@ -0,0 +1,129 @@ +# Author: Yan Zhang +# Email: zhangyan.cse (@) gmail.com + +import sys +import numpy as np +#import matplotlib.pyplot as plt +import pickle +import os +import gzip +from hicplus import model +from torch.utils import data +import torch +import torch.optim as optim +from torch.autograd import Variable +from time import gmtime, strftime +import sys +import torch.nn as nn +import argparse + +use_gpu = 1 + +conv2d1_filters_numbers = 8 +conv2d1_filters_size = 9 +conv2d2_filters_numbers = 8 +conv2d2_filters_size = 1 +conv2d3_filters_numbers = 1 +conv2d3_filters_size = 5 + + +down_sample_ratio = 16 +epochs = 10 +HiC_max_value = 100 +batch_size = 512 + + +# This block is the actual training data used in the training. The training data is too large to put on Github, so only toy data is used. +# cell = "GM12878_replicate" +# chrN_range1 = '1_8' +# chrN_range = '1_8' + +# low_resolution_samples = np.load(gzip.GzipFile('/home/zhangyan/SRHiC_samples/'+cell+'down16_chr'+chrN_range+'.npy.gz', "r")).astype(np.float32) * down_sample_ratio +# high_resolution_samples = np.load(gzip.GzipFile('/home/zhangyan/SRHiC_samples/original10k/'+cell+'_original_chr'+chrN_range+'.npy.gz', "r")).astype(np.float32) + +# low_resolution_samples = np.minimum(HiC_max_value, low_resolution_samples) +# high_resolution_samples = np.minimum(HiC_max_value, high_resolution_samples) + + +#low_resolution_samples = np.load(gzip.GzipFile('../../data/GM12878_replicate_down16_chr19_22.npy.gz', "r")).astype(np.float32) * down_sample_ratio +#high_resolution_samples = np.load(gzip.GzipFile('../../data/GM12878_replicate_original_chr19_22.npy.gz', "r")).astype(np.float32) + +#low_resolution_samples = np.load(gzip.GzipFile('/home/zhangyan/SRHiC_samples/IMR90_down_HINDIII16_chr1_8.npy.gz', "r")).astype(np.float32) * down_sample_ratio +#high_resolution_samples = np.load(gzip.GzipFile('/home/zhangyan/SRHiC_samples/original10k/_IMR90_HindIII_original_chr1_8.npy.gz', "r")).astype(np.float32) + +def train(lowres,highres, outModel): + low_resolution_samples = lowres.astype(np.float32) * down_sample_ratio + + high_resolution_samples = highres.astype(np.float32) + + low_resolution_samples = np.minimum(HiC_max_value, low_resolution_samples) + high_resolution_samples = np.minimum(HiC_max_value, high_resolution_samples) + + + + # Reshape the high-quality Hi-C sample as the target value of the training. + sample_size = low_resolution_samples.shape[-1] + padding = conv2d1_filters_size + conv2d2_filters_size + conv2d3_filters_size - 3 + half_padding = padding // 2 + output_length = sample_size - padding + Y = [] + for i in range(high_resolution_samples.shape[0]): + no_padding_sample = high_resolution_samples[i][0][half_padding:(sample_size-half_padding) , half_padding:(sample_size - half_padding)] + Y.append(no_padding_sample) + Y = np.array(Y).astype(np.float32) + + print(low_resolution_samples.shape, Y.shape) + + lowres_set = data.TensorDataset(torch.from_numpy(low_resolution_samples), torch.from_numpy(np.zeros(low_resolution_samples.shape[0]))) + lowres_loader = torch.utils.data.DataLoader(lowres_set, batch_size=batch_size, shuffle=False) + + hires_set = data.TensorDataset(torch.from_numpy(Y), torch.from_numpy(np.zeros(Y.shape[0]))) + hires_loader = torch.utils.data.DataLoader(hires_set, batch_size=batch_size, shuffle=False) + + + Net = model.Net(40, 28) + + if use_gpu: + Net = Net.cuda() + + optimizer = optim.SGD(Net.parameters(), lr = 0.00001) + _loss = nn.MSELoss() + Net.train() + + running_loss = 0.0 + running_loss_validate = 0.0 + reg_loss = 0.0 + + # write the log file to record the training process + with open('HindIII_train.txt', 'w') as log: + for epoch in range(0, 3500): + for i, (v1, v2) in enumerate(zip(lowres_loader, hires_loader)): + if (i == len(lowres_loader) - 1): + continue + _lowRes, _ = v1 + _highRes, _ = v2 + + _lowRes = Variable(_lowRes) + _highRes = Variable(_highRes).unsqueeze(1) + + if use_gpu: + _lowRes = _lowRes.cuda() + _highRes = _highRes.cuda() + optimizer.zero_grad() + y_prediction = Net(_lowRes) + + loss = _loss(y_prediction, _highRes) + loss.backward() + optimizer.step() + + running_loss += loss.item() + + print('-------', i, epoch, running_loss/i, strftime("%Y-%m-%d %H:%M:%S", gmtime())) + + log.write(str(epoch) + ', ' + str(running_loss/i,) +', '+ strftime("%Y-%m-%d %H:%M:%S", gmtime())+ '\n') + running_loss = 0.0 + running_loss_validate = 0.0 + # save the model every 100 epoches + if (epoch % 100 == 0): + torch.save(Net.state_dict(), outModel + str(epoch) + str('.model')) + pass diff --git a/build/lib/hicplus/train_models.py b/build/lib/hicplus/train_models.py new file mode 100644 index 0000000..b54c7c5 --- /dev/null +++ b/build/lib/hicplus/train_models.py @@ -0,0 +1,41 @@ +from __future__ import print_function +import argparse as ap +from math import log10 + +#import torch +#import torch.nn as nn +#import torch.optim as optim +#from torch.autograd import Variable +#from torch.utils.data import DataLoader +from hicplus import utils +#import model +import argparse +from hicplus import trainConvNet +import numpy as np + +chrs_length = [249250621,243199373,198022430,191154276,180915260,171115067,159138663,146364022,141213431,135534747,135006516,133851895,115169878,107349540,102531392,90354753,81195210,78077248,59128983,63025520,48129895,51304566] + +#chrN = 21 +#scale = 16 + +def main(args): + + highres = utils.train_matrix_extract(args.chromosome, 10000, args.inputfile) + + print('dividing, filtering and downsampling files...') + + highres_sub, index = utils.train_divide(highres) + + print(highres_sub.shape) + #np.save(infile+"highres",highres_sub) + + lowres = utils.genDownsample(highres,1/float(args.scalerate)) + lowres_sub,index = utils.train_divide(lowres) + print(lowres_sub.shape) + #np.save(infile+"lowres",lowres_sub) + + print('start training...') + trainConvNet.train(lowres_sub,highres_sub,args.outmodel) + + + print('finished...') diff --git a/build/lib/hicplus/utils.py b/build/lib/hicplus/utils.py new file mode 100644 index 0000000..7103825 --- /dev/null +++ b/build/lib/hicplus/utils.py @@ -0,0 +1,179 @@ +import numpy as np +#import matplotlib.pyplot as plt +import os,struct +import random +import straw +from scipy.sparse import csr_matrix, coo_matrix, vstack, hstack +from scipy import sparse +import numpy as np + +def readcstr(f): + buf = "" + while True: + b = f.read(1) + b = b.decode('utf-8', 'backslashreplace') + if b is None or b == '\0': + return str(buf) + else: + buf = buf + b + +def read_hic_header(hicfile): + + if not os.path.exists(hicfile): + return None # probably a cool URI + + req = open(hicfile, 'rb') + magic_string = struct.unpack('<3s', req.read(3))[0] + req.read(1) + if (magic_string != b"HIC"): + return None # this is not a valid .hic file + + info = {} + version = struct.unpack('= total_loci or j + subImage_size >= total_loci): + continue + subImage = HiCmatrix[i:i + subImage_size, j:j + subImage_size] + + result.append([subImage, ]) + tag = 'test' + index.append((tag, i, j)) + result = np.array(result) + #print(result.shape) + #result = result.astype(np.double) + index = np.array(index) + yield result, index + + +def train_divide(HiCmatrix): + subImage_size = 40 + step = 25 + result = [] + index = [] + #chrN = 21 ##need to change. + + total_loci = HiCmatrix.shape[0] + #print(HiCmatrix.shape) + for i in range(0, total_loci, step): + for j in range(0, total_loci, ): + if (abs(i-j)>201 or i + subImage_size >= total_loci or j + subImage_size >= total_loci): + continue + subImage = HiCmatrix[i:i + subImage_size, j:j + subImage_size] + + result.append([subImage, ]) + tag = 'test' + index.append((tag, i, j)) + result = np.array(result) + #print(result.shape) + result = result.astype(np.double) + index = np.array(index) + return result, index + +def genDownsample(original_sample, rate): + result = np.zeros(original_sample.shape).astype(float) + for i in range(0, original_sample.shape[0]): + for j in range(0, original_sample.shape[1]): + for k in range(0, int(original_sample[i][j])): + if (random.random() < rate): + result[i][j] += 1 + return result + + +if __name__ == "__main__": + main() diff --git a/build/scripts-3.9/hicplus b/build/scripts-3.9/hicplus new file mode 100755 index 0000000..74e18bc --- /dev/null +++ b/build/scripts-3.9/hicplus @@ -0,0 +1,89 @@ +#!/usr/bin/python3 +import argparse, sys +from hicplus import pred_chromosome, train_models, pred_genome +def getargs(): + ## Construct an ArgumentParser object for command-line arguments + parser = argparse.ArgumentParser(description='''Train CNN model with Hi-C data and make predictions for low resolution HiC data with the model. + ''', + formatter_class=argparse.ArgumentDefaultsHelpFormatter) + subparsers = parser.add_subparsers(dest='subcommands') + subtrain = subparsers.add_parser('train', + help='''Train CNN model per chromosome''') + subtrain.set_defaults(func=train_models.main) + subchrom = subparsers.add_parser('pred_chromosome', + help='''predict high resolution interaction frequencies for inter and intra chromosomes''') + subchrom.set_defaults(func=pred_chromosome.main) + subgen = subparsers.add_parser('pred_genome', + help='''predict high resolution interaction frequencies for genome''') + subgen.set_defaults(func=pred_genome.main) + + #subgen = subparsers.add_parser('score_genome', + # help='''prediction interaction frequencies for the whole genome''') + #subgen.set_defaults(func=score_genome.main) + + subs=[subtrain,subchrom, subgen] + #subpool.add_argument('-l','--lower', + # help = 'Lower bound of report in bp (20000)', + # type = int, default=20000) + #subpool.add_argument('-u','--upper', + # help = 'Upper bound of report in bp (300000)', + # type = int, default=300000) + for i in subs[:1]: + i.add_argument('-i', '--inputfile', + help = 'path to a .hic file.', type = str) + i.add_argument('-r', '--scalerate', + help = 'downsampling rate to generate the low resolution training file', + type = int, default = 16) + i.add_argument('-c', '--chromosome', + help = 'choose one chromosome to do the model training.', + type = int, default = 21) + i.add_argument('-o', '--outmodel', + help = 'output model name. default = model_epochnumber.model', + type = str, default = 'model') + i.add_argument('-l', '--log', + help = 'output log file. default = train_log.txt', + type = str, default = 'train_log' ) + for i in subs[1:-1]: + i.add_argument('-i', '--inputfile', + help = 'path to a .hic file.', type = str) + i.add_argument('-o', '--outputfile', + help = 'path to an output file.', type = str) + i.add_argument('-m', '--model', + help = 'path to a model file.', type = str) + i.add_argument('-b', '--binsize', + help = 'predicted resolustion, e.g.10kb, 25kb..., default=10000', + type = int, default = 10000) + i.add_argument('-c','--chrN', nargs=2, metavar=('chrN1','chrN2'), + type=str,required=True, help='chromosome number') + + + for i in subs[2:]: + i.add_argument('-i', '--inputfile', + help = 'path to a .hic file.', type = str) + i.add_argument('-m', '--model', + help = 'path to a model file.', type = str) + i.add_argument('-b', '--binsize', + help = 'predicted resolustion, e.g.10kb, 25kb..., default=10000', + type = int, default = 10000) + + + ## Parse the command-line arguments + commands = sys.argv[1:] + if ((not commands) or ((commands[0] in ['train', 'pred_chromosome','pred_genome']) + and len(commands) == 1)): + commands.append('-h') + args = parser.parse_args(commands) + + return args, commands + + +def run(): + # Parse Arguments + args, commands = getargs() + # Improve the performance if you don't want to run it + if commands[0] not in ['-h','--help']: + args.func(args) + + +if __name__ == '__main__': + run() diff --git a/dist/hicplus-1.1.0-py3.9.egg b/dist/hicplus-1.1.0-py3.9.egg new file mode 100644 index 0000000000000000000000000000000000000000..dcc2cdb7c72bdaffbad0d27b484b132f0c19c28d GI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>`pIRmCS`iJD#v$S?T6LjwQPUcZBn9>vpP}H*3yvFQe@B zpBCRXVPWR2aH;Ct(VvAgSSYS{vA{YG6N`X31ZHD|om*7Hpi`#<_Fb4^k3U=T!pG}( zi+$I)`{s>yI(YkTeFt20zR#(af@DgvvNvZ^OR-eTp-u)OUw0Q|OcEm{kR{uURCW*u>pzO?Sl z+0E@HA*}B>uO=7Uz~y6hAqD;ukYpEcmYVpGw2bvy`fIc39#mWp&N^#9cwr|p@m)}N zH6g7Go8z;~o1tH>sHe;`>WW;X$tpA65ot8M-^6v*G3=Db%O%l?T&)rgOneRF`N|^7t&? z>XkRtR-I*ro|X>X*Ux42$XSO7V9^@$X{@<10&!!wh)H#nKN0TZim+&k1$M1(ej;23McaHAG|D!t^AB^8`d<>@I z{WJJa-N*P;{ASH#Di8mksrXy!_cRTkkKfI5%!h&g!vAA$3qBjaj(f~*J2dJ2=~kcI zf`4B(e%axe?I!gv?2}vb?{NI{p<_6o!e8J=TlVj8`~>?LuBiNH_@C14+iJvzMVDX7 P40?i)!*4E-U%&nX-0J`^ literal 0 HcmV?d00001 diff --git a/hicplus.egg-info/PKG-INFO b/hicplus.egg-info/PKG-INFO new file mode 100644 index 0000000..c47fdbf --- /dev/null +++ b/hicplus.egg-info/PKG-INFO @@ -0,0 +1,16 @@ +Metadata-Version: 1.1 +Name: hicplus +Version: 1.1.0 +Summary: UNKNOWN +Home-page: UNKNOWN +Author: UNKNOWN +Author-email: UNKNOWN +License: UNKNOWN +Description: test description +Platform: UNKNOWN +Classifier: Programming Language :: Python :: 3.6 +Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+) +Classifier: Operating System :: POSIX +Classifier: Development Status :: 3 - Alpha +Classifier: Intended Audience :: Science/Research +Classifier: Topic :: Scientific/Engineering :: Bio-Informatics diff --git a/hicplus.egg-info/SOURCES.txt b/hicplus.egg-info/SOURCES.txt new file mode 100644 index 0000000..98b8e0f --- /dev/null +++ b/hicplus.egg-info/SOURCES.txt @@ -0,0 +1,15 @@ +README.md +setup.py +hicplus/__init__.py +hicplus/model.py +hicplus/pred_chromosome.py +hicplus/pred_genome.py +hicplus/testConvNet.py +hicplus/trainConvNet.py +hicplus/train_models.py +hicplus/utils.py +hicplus.egg-info/PKG-INFO +hicplus.egg-info/SOURCES.txt +hicplus.egg-info/dependency_links.txt +hicplus.egg-info/top_level.txt +scripts/hicplus \ No newline at end of file diff --git a/hicplus.egg-info/dependency_links.txt b/hicplus.egg-info/dependency_links.txt new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/hicplus.egg-info/dependency_links.txt @@ -0,0 +1 @@ + diff --git a/hicplus.egg-info/top_level.txt b/hicplus.egg-info/top_level.txt new file mode 100644 index 0000000..174c6fc --- /dev/null +++ b/hicplus.egg-info/top_level.txt @@ -0,0 +1 @@ +hicplus diff --git a/hicplus/__pycache__/__init__.cpython-39.pyc b/hicplus/__pycache__/__init__.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..089d10be738000953c3098629fc6c7ee9d00fda5 GIT binary patch literal 206 zcmYe~<>g`k0;W@?i55WmF^Gc<7=auIATAaF5-AK(3@MCJjHygf%qdL444TYUtcH4q zdInW&?g2h!#@c?GEVsDh