Mercurial > repos > crs4 > conifer3
changeset 9:ab730530065a draft
Uploaded
author | crs4 |
---|---|
date | Fri, 17 Mar 2017 10:09:03 -0400 |
parents | 1993dd87698b |
children | ea4dd37824ca |
files | conifer3/conifer_functions.py |
diffstat | 1 files changed, 5 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/conifer3/conifer_functions.py Fri Mar 17 10:08:48 2017 -0400 +++ b/conifer3/conifer_functions.py Fri Mar 17 10:09:03 2017 -0400 @@ -145,9 +145,9 @@ import operator import locale exon_set = rpkm_data.exons - genomic_coords = np.array(map(operator.itemgetter("start"),exon_set)) + genomic_coords = np.array(list(map(operator.itemgetter("start"),exon_set))) - ticks = range(0,len(exon_set),len(exon_set)/5) + ticks = list(range(0,len(exon_set),len(exon_set)/5)) ticks[-1] -= 1 # the last tick is going to be off the chart, so we estimate it as the second to last genomic coord. labels = [locale.format("%d", genomic_coords[i], grouping=True) for i in ticks if i < len(genomic_coords)] @@ -177,7 +177,7 @@ return [] out_calls = [] - calls=np.array(calls)[np.argsort(np.array(map(operator.itemgetter("start"),calls),dtype=np.int))] + calls=np.array(calls)[np.argsort(np.array(list(map(operator.itemgetter("start"),calls)),dtype=np.int))] pstart = calls[0]["start"] pstop = calls[0]["stop"] for d in calls: @@ -202,7 +202,7 @@ def smooth(self, window = 15, padded = False): #todo, fix the padding here if self.isGenotype: - print "Warning: the data in this rpkm_data container are single genotype values. Smoothing will have no effect!" + print("Warning: the data in this rpkm_data container are single genotype values. Smoothing will have no effect!") return self.rpkm if window > 0: @@ -249,7 +249,7 @@ """Initialize an rpkm_reader instance. Specify the location of the data file""" if rpkm_fn == None: - print "Must specify RPKM HDF5 file!" + print("Must specify RPKM HDF5 file!") return 0 # set up file access self.h5file = openFile(rpkm_fn, mode='r')