coolbox 0.3.8__py3-none-any.whl → 0.3.9__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of coolbox might be problematic. Click here for more details.
- coolbox/__init__.py +1 -1
- coolbox/cli.py +0 -2
- coolbox/core/coverage/__init__.py +1 -1
- coolbox/core/coverage/highlights.py +4 -4
- coolbox/core/frame/frame.py +16 -6
- coolbox/core/track/__init__.py +2 -1
- coolbox/core/track/arcs/plot.py +6 -2
- coolbox/core/track/bed/__init__.py +0 -1
- coolbox/core/track/bed/base.py +93 -85
- coolbox/core/track/bed/bed.py +37 -16
- coolbox/core/track/bed/fetch.py +1 -1
- coolbox/core/track/bed/plot.py +71 -221
- coolbox/core/track/gtf.py +11 -9
- coolbox/core/track/hicmat/base.py +12 -9
- coolbox/core/track/hicmat/cool.py +4 -4
- coolbox/core/track/hicmat/dothic.py +2 -2
- coolbox/core/track/hicmat/plot.py +12 -6
- coolbox/core/track/hist/__init__.py +10 -3
- coolbox/core/track/hist/bigwig.py +0 -16
- coolbox/core/track/hist/plot.py +13 -5
- coolbox/core/track/ideogram.py +19 -10
- coolbox/core/track/pseudo.py +6 -2
- coolbox/core/track/tad.py +237 -0
- coolbox/utilities/bed.py +1 -1
- coolbox/utilities/hic/wrap.py +24 -16
- {coolbox-0.3.8.dist-info → coolbox-0.3.9.dist-info}/METADATA +19 -11
- {coolbox-0.3.8.dist-info → coolbox-0.3.9.dist-info}/RECORD +31 -31
- {coolbox-0.3.8.dist-info → coolbox-0.3.9.dist-info}/WHEEL +1 -1
- coolbox/core/track/bed/tad.py +0 -18
- {coolbox-0.3.8.data → coolbox-0.3.9.data}/scripts/coolbox +0 -0
- {coolbox-0.3.8.dist-info → coolbox-0.3.9.dist-info}/LICENSE +0 -0
- {coolbox-0.3.8.dist-info → coolbox-0.3.9.dist-info}/top_level.txt +0 -0
coolbox/core/track/ideogram.py
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import pandas as pd
|
|
2
|
-
|
|
2
|
+
import matplotlib.pyplot as plt
|
|
3
3
|
|
|
4
4
|
from coolbox.utilities import (
|
|
5
5
|
get_logger, GenomeRange, file_to_intervaltree, hex2rgb,
|
|
@@ -24,7 +24,7 @@ class Ideogram(Track):
|
|
|
24
24
|
color_scheme : dict, optional
|
|
25
25
|
Color scheme of ideogram, default: Ideogram.DEFAULT_COLOR_SCHEME
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
show_band_name : bool, optional
|
|
28
28
|
Show band name or not. default True.
|
|
29
29
|
|
|
30
30
|
font_size : int, optional
|
|
@@ -55,7 +55,7 @@ class Ideogram(Track):
|
|
|
55
55
|
properties_dict = {
|
|
56
56
|
'file': file_,
|
|
57
57
|
'color_scheme': Ideogram.DEFAULT_COLOR_SCHEME,
|
|
58
|
-
'
|
|
58
|
+
'show_band_name': True,
|
|
59
59
|
'font_size': Ideogram.DEFAULT_FONT_SIZE,
|
|
60
60
|
'border_color': '#000000',
|
|
61
61
|
'border_width': Ideogram.DEFAULT_BORDER_WIDTH,
|
|
@@ -83,7 +83,7 @@ class Ideogram(Track):
|
|
|
83
83
|
start, end = itv.begin, itv.end
|
|
84
84
|
band_name, band_type = itv.data[:2]
|
|
85
85
|
rows.append([gr.chrom, start, end, band_name, band_type])
|
|
86
|
-
fields = ['chrom', 'start', 'end', '
|
|
86
|
+
fields = ['chrom', 'start', 'end', 'band_name', 'band_type']
|
|
87
87
|
return pd.DataFrame(rows, columns=fields)
|
|
88
88
|
|
|
89
89
|
def plot(self, ax, gr: GenomeRange, **kwargs):
|
|
@@ -101,19 +101,28 @@ class Ideogram(Track):
|
|
|
101
101
|
self.properties['show_band_name'] != 'no'
|
|
102
102
|
and gr.length < 80_000_000
|
|
103
103
|
):
|
|
104
|
-
self.plot_text(band_name, start, end, band_color)
|
|
105
|
-
coll =
|
|
106
|
-
|
|
107
|
-
|
|
104
|
+
self.plot_text(band_name, start, end, gr, band_color)
|
|
105
|
+
coll = plt.broken_barh(
|
|
106
|
+
xranges, (0, band_height), facecolors=colors,
|
|
107
|
+
linewidth=self.properties['border_width'],
|
|
108
|
+
edgecolor=self.properties['border_color'])
|
|
108
109
|
ax.add_collection(coll)
|
|
109
110
|
ax.set_ylim(-0.1, band_height + 0.1)
|
|
110
111
|
ax.set_xlim(gr.start, gr.end)
|
|
111
112
|
self.plot_label()
|
|
112
113
|
|
|
113
|
-
def plot_text(self, band_name, start, end, band_color):
|
|
114
|
+
def plot_text(self, band_name, start, end, gr, band_color):
|
|
114
115
|
band_height = self.properties['height']
|
|
115
116
|
x_pos = start + (end - start) * 0.15
|
|
117
|
+
if x_pos < gr.start:
|
|
118
|
+
x_pos = gr.start + 0.5 * (end - gr.start)
|
|
119
|
+
if (end - gr.start) < gr.length * 0.10:
|
|
120
|
+
return
|
|
121
|
+
elif x_pos > gr.end:
|
|
122
|
+
x_pos = start + 0.5 * (gr.end - start)
|
|
123
|
+
if (gr.end - start) < gr.length * 0.10:
|
|
124
|
+
return
|
|
116
125
|
y_pos = band_height / 2
|
|
117
126
|
rgb = hex2rgb(band_color) if isinstance(band_color, str) else band_color
|
|
118
|
-
color = '#e2e2e2' if sum(rgb) <
|
|
127
|
+
color = '#e2e2e2' if sum(rgb) < 200 else '#000000'
|
|
119
128
|
self.ax.text(x_pos, y_pos, band_name, fontsize=self.properties['font_size'], color=color)
|
coolbox/core/track/pseudo.py
CHANGED
|
@@ -128,11 +128,15 @@ class XAxis(Track):
|
|
|
128
128
|
|
|
129
129
|
ax.set_xlim(gr.start, gr.end)
|
|
130
130
|
ticks = ax.get_xticks()
|
|
131
|
-
|
|
131
|
+
|
|
132
|
+
if ticks[-1] - ticks[1] <= 1000:
|
|
133
|
+
labels = ["{:.0f}".format((x))
|
|
134
|
+
for x in ticks]
|
|
135
|
+
labels[-2] += " bp"
|
|
136
|
+
elif ticks[-1] - ticks[1] <= 1e5:
|
|
132
137
|
labels = ["{:,.0f}".format((x / 1e3))
|
|
133
138
|
for x in ticks]
|
|
134
139
|
labels[-2] += " Kb"
|
|
135
|
-
|
|
136
140
|
elif 1e5 < ticks[-1] - ticks[1] < 4e6:
|
|
137
141
|
labels = ["{:,.0f}".format((x / 1e3))
|
|
138
142
|
for x in ticks]
|
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
import numpy as np
|
|
2
|
+
import pandas as pd
|
|
3
|
+
|
|
4
|
+
from coolbox.utilities import (
|
|
5
|
+
get_logger
|
|
6
|
+
)
|
|
7
|
+
from coolbox.utilities.genome import GenomeRange
|
|
8
|
+
from .bed.base import BedBase
|
|
9
|
+
from .bed.fetch import FetchBed
|
|
10
|
+
|
|
11
|
+
log = get_logger(__name__)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class PlotTAD(object):
|
|
15
|
+
def __init__(self):
|
|
16
|
+
self.init_colormap()
|
|
17
|
+
self.cache_gr = None
|
|
18
|
+
self.cache_res = None
|
|
19
|
+
|
|
20
|
+
def fetch_plot_data(self, gr: GenomeRange, **kwargs):
|
|
21
|
+
if gr == self.cache_gr:
|
|
22
|
+
return self.cache_res
|
|
23
|
+
else:
|
|
24
|
+
self.cache_gr = gr
|
|
25
|
+
self.cache_res = self.fetch_data(gr, **kwargs)
|
|
26
|
+
return self.cache_res
|
|
27
|
+
|
|
28
|
+
def get_depth_ratio(self, gr=None):
|
|
29
|
+
if 'depth_ratio' not in self.properties:
|
|
30
|
+
return 1.0
|
|
31
|
+
dr = self.properties['depth_ratio']
|
|
32
|
+
if dr == 'full':
|
|
33
|
+
return 1.0
|
|
34
|
+
if dr == 'auto':
|
|
35
|
+
assert gr is not None
|
|
36
|
+
min_dr = 0.1
|
|
37
|
+
tads = self.fetch_plot_data(gr)
|
|
38
|
+
tads = tads[(tads['start'] >= gr.start) & (tads['end'] <= gr.end)]
|
|
39
|
+
if tads.shape[0] > 0:
|
|
40
|
+
dr = (tads['end'] - tads['start']).max() / (gr.end - gr.start)
|
|
41
|
+
return max(dr, min_dr)
|
|
42
|
+
else:
|
|
43
|
+
return min_dr
|
|
44
|
+
return dr
|
|
45
|
+
|
|
46
|
+
def get_track_height(self, frame_width, gr):
|
|
47
|
+
height = frame_width * 0.5
|
|
48
|
+
height *= self.get_depth_ratio(gr)
|
|
49
|
+
return height
|
|
50
|
+
|
|
51
|
+
def plot_tads(self, ax, gr: GenomeRange, tads: pd.DataFrame):
|
|
52
|
+
"""
|
|
53
|
+
Plots the boundaries as triangles in the given ax.
|
|
54
|
+
"""
|
|
55
|
+
self.set_colormap(tads)
|
|
56
|
+
depth = (gr.end - gr.start) / 2
|
|
57
|
+
ymax = (gr.end - gr.start)
|
|
58
|
+
if 'track' in self.__dict__:
|
|
59
|
+
from coolbox.core.track.hicmat import HicMatBase
|
|
60
|
+
assert isinstance(self.track, HicMatBase), f"The parent track should be instance of {HicMatBase}"
|
|
61
|
+
|
|
62
|
+
hicmat_tri_style = (HicMatBase.STYLE_WINDOW, HicMatBase.STYLE_TRIANGULAR)
|
|
63
|
+
hicmat_ma_style = (HicMatBase.STYLE_MATRIX,)
|
|
64
|
+
|
|
65
|
+
hictrack = self.track
|
|
66
|
+
hicmat_style = hictrack.properties['style']
|
|
67
|
+
|
|
68
|
+
# TODO Should we add plotting in BigWig, BedGraph, ABCCompartment, Arcs support?(The original codes supports)
|
|
69
|
+
for region in tads.itertuples():
|
|
70
|
+
if hicmat_style in hicmat_tri_style:
|
|
71
|
+
self.plot_triangular(ax, gr, region, ymax, depth)
|
|
72
|
+
elif hicmat_style in hicmat_ma_style:
|
|
73
|
+
self.plot_box(ax, gr, region)
|
|
74
|
+
else:
|
|
75
|
+
raise ValueError(f"unsupported hicmat style {hicmat_style}")
|
|
76
|
+
else:
|
|
77
|
+
for region in tads.itertuples():
|
|
78
|
+
self.plot_triangular(ax, gr, region, ymax, depth)
|
|
79
|
+
dr = self.get_depth_ratio(gr)
|
|
80
|
+
if self.properties['orientation'] == 'inverted':
|
|
81
|
+
ax.set_ylim(depth * dr, 0)
|
|
82
|
+
else:
|
|
83
|
+
ax.set_ylim(0, depth * dr)
|
|
84
|
+
ax.set_xlim(gr.start, gr.end)
|
|
85
|
+
|
|
86
|
+
if len(tads) == 0:
|
|
87
|
+
log.debug("No regions found for Coverage {}.".format(self.properties['name']))
|
|
88
|
+
|
|
89
|
+
def plot_triangular(self, ax, gr, region, ymax, depth):
|
|
90
|
+
"""
|
|
91
|
+
/\
|
|
92
|
+
/ \
|
|
93
|
+
/ \
|
|
94
|
+
_____________________
|
|
95
|
+
x1 x2 x3
|
|
96
|
+
"""
|
|
97
|
+
|
|
98
|
+
from matplotlib.patches import Polygon
|
|
99
|
+
x1 = region.start
|
|
100
|
+
x2 = x1 + float(region.end - region.start) / 2
|
|
101
|
+
x3 = region.end
|
|
102
|
+
y1 = 0
|
|
103
|
+
y2 = (region.end - region.start)
|
|
104
|
+
|
|
105
|
+
y = (y2 / ymax) * depth
|
|
106
|
+
|
|
107
|
+
rgb, edgecolor = self.get_rgb_and_edge_color(region)
|
|
108
|
+
|
|
109
|
+
triangle = Polygon(np.array([[x1, y1], [x2, y], [x3, y1]]), closed=True,
|
|
110
|
+
facecolor=rgb, edgecolor=edgecolor,
|
|
111
|
+
alpha=self.properties['alpha'],
|
|
112
|
+
linestyle=self.properties['border_style'],
|
|
113
|
+
linewidth=self.properties['border_width'])
|
|
114
|
+
ax.add_artist(triangle)
|
|
115
|
+
self.plot_score(ax, gr, region, 'triangular', ymax, depth)
|
|
116
|
+
|
|
117
|
+
def plot_box(self, ax, gr, region):
|
|
118
|
+
from matplotlib.patches import Rectangle
|
|
119
|
+
|
|
120
|
+
x1 = region.start
|
|
121
|
+
x2 = region.end
|
|
122
|
+
x = y = x1
|
|
123
|
+
w = h = (x2 - x1)
|
|
124
|
+
|
|
125
|
+
rgb, edgecolor = self.get_rgb_and_edge_color(region)
|
|
126
|
+
|
|
127
|
+
fill = self.properties['border_only'] == 'no'
|
|
128
|
+
|
|
129
|
+
rec = Rectangle((x, y), w, h,
|
|
130
|
+
fill=fill,
|
|
131
|
+
facecolor=rgb,
|
|
132
|
+
edgecolor=edgecolor,
|
|
133
|
+
alpha=self.properties['alpha'],
|
|
134
|
+
linestyle=self.properties['border_style'],
|
|
135
|
+
linewidth=self.properties['border_width'])
|
|
136
|
+
ax.add_patch(rec)
|
|
137
|
+
self.plot_score(ax, gr, region, 'box')
|
|
138
|
+
|
|
139
|
+
def plot_score(self, ax, gr, region, style, ymax=None, depth=None):
|
|
140
|
+
properties = self.properties
|
|
141
|
+
|
|
142
|
+
if properties['show_score'] != 'yes':
|
|
143
|
+
return
|
|
144
|
+
bed = region
|
|
145
|
+
score = bed.score
|
|
146
|
+
if not isinstance(score, (float, int)):
|
|
147
|
+
# score is not number not plot
|
|
148
|
+
return
|
|
149
|
+
region_length = region.end - region.start
|
|
150
|
+
if region_length / gr.length < 0.05:
|
|
151
|
+
# region too small not plot score
|
|
152
|
+
return
|
|
153
|
+
font_size = properties['score_font_size']
|
|
154
|
+
if font_size == 'auto':
|
|
155
|
+
# inference the font size
|
|
156
|
+
from math import log2
|
|
157
|
+
base_size = 18
|
|
158
|
+
s_ = (region_length / gr.length) * 10
|
|
159
|
+
s_ = int(log2(s_))
|
|
160
|
+
font_size = base_size + s_
|
|
161
|
+
ratio = properties['score_height_ratio']
|
|
162
|
+
color = properties['score_font_color']
|
|
163
|
+
if style == 'box':
|
|
164
|
+
x1 = region.start
|
|
165
|
+
x2 = region.end
|
|
166
|
+
w = x2 - x1
|
|
167
|
+
x = x2 - w * ratio
|
|
168
|
+
y = x1 + w * ratio
|
|
169
|
+
else: # triangular
|
|
170
|
+
x = region.begin + region_length * 0.4
|
|
171
|
+
y = (region_length / ymax) * depth * ratio
|
|
172
|
+
ax.text(x, y, "{0:.3f}".format(score), fontsize=font_size, color=color)
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
class TAD(BedBase, PlotTAD, FetchBed):
|
|
176
|
+
"""
|
|
177
|
+
Tad tack from bed file
|
|
178
|
+
|
|
179
|
+
Parameters
|
|
180
|
+
----------
|
|
181
|
+
border_style: str, optional
|
|
182
|
+
Border style of tad. (Default: 'solid')
|
|
183
|
+
|
|
184
|
+
border_width: int, optional
|
|
185
|
+
Border width of tad. (Default: '2.0')
|
|
186
|
+
|
|
187
|
+
show_score : bool
|
|
188
|
+
Show bed score or not.
|
|
189
|
+
default False.
|
|
190
|
+
|
|
191
|
+
score_font_size : {'auto', int}
|
|
192
|
+
Score text font size.
|
|
193
|
+
default 'auto'
|
|
194
|
+
|
|
195
|
+
score_font_color : str
|
|
196
|
+
Score text color.
|
|
197
|
+
default '#000000'
|
|
198
|
+
|
|
199
|
+
score_height_ratio : float
|
|
200
|
+
(text tag height) / (TAD height). used for adjust the position of Score text.
|
|
201
|
+
default 0.5
|
|
202
|
+
|
|
203
|
+
border_only : bool
|
|
204
|
+
Only show border, default False
|
|
205
|
+
|
|
206
|
+
depth_ratio : {float, 'auto', 'full'}
|
|
207
|
+
Depth ratio of triangular, use 'full' for full depth, use 'auto' for calculate depth by current genome_range. default 'auto'.
|
|
208
|
+
|
|
209
|
+
orientation : {'normal', 'inverted'}
|
|
210
|
+
Invert y-axis or not, default 'normal'
|
|
211
|
+
|
|
212
|
+
"""
|
|
213
|
+
|
|
214
|
+
DEFAULT_PROPERTIES = {
|
|
215
|
+
'alpha': 0.3,
|
|
216
|
+
'border_style': "--",
|
|
217
|
+
'border_width': 2.0,
|
|
218
|
+
"show_score": False,
|
|
219
|
+
"score_font_size": 'auto',
|
|
220
|
+
"score_font_color": "#000000",
|
|
221
|
+
"score_height_ratio": 0.4,
|
|
222
|
+
"border_only": False,
|
|
223
|
+
"depth_ratio": 'auto',
|
|
224
|
+
"orientation": 'inverted',
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
def __init__(self, file, **kwargs):
|
|
228
|
+
properties = TAD.DEFAULT_PROPERTIES.copy()
|
|
229
|
+
properties.update(kwargs)
|
|
230
|
+
super().__init__(file, **properties)
|
|
231
|
+
PlotTAD.__init__(self)
|
|
232
|
+
|
|
233
|
+
def plot(self, ax, gr: GenomeRange, **kwargs):
|
|
234
|
+
self.ax = ax
|
|
235
|
+
ov_intervals: pd.DataFrame = self.fetch_plot_data(gr, **kwargs)
|
|
236
|
+
self.plot_tads(ax, gr, ov_intervals)
|
|
237
|
+
self.plot_label()
|
coolbox/utilities/bed.py
CHANGED
|
@@ -170,7 +170,7 @@ class ReadBed(object):
|
|
|
170
170
|
"""
|
|
171
171
|
fields = self.get_no_comment_line(iter=file_iter, count=False)
|
|
172
172
|
fields = to_string(fields)
|
|
173
|
-
line_values = fields.split()
|
|
173
|
+
line_values = fields.split("\t")
|
|
174
174
|
|
|
175
175
|
if len(line_values) == 3:
|
|
176
176
|
self.file_type = 'bed3'
|
coolbox/utilities/hic/wrap.py
CHANGED
|
@@ -35,7 +35,7 @@ class StrawWrap(object):
|
|
|
35
35
|
self.chromosomes, self.resolutions, self.masterindex, self.genome, self.metadata = self.__info()
|
|
36
36
|
self.fetched_binsize = None
|
|
37
37
|
|
|
38
|
-
def fetch(self,
|
|
38
|
+
def fetch(self, gr1, gr2=None):
|
|
39
39
|
"""
|
|
40
40
|
Return
|
|
41
41
|
------
|
|
@@ -43,26 +43,34 @@ class StrawWrap(object):
|
|
|
43
43
|
"""
|
|
44
44
|
from coolbox.utilities.genome import GenomeRange
|
|
45
45
|
|
|
46
|
-
|
|
47
|
-
genome_range2 = genome_range1
|
|
48
|
-
genome_range1 = to_gr(genome_range1)
|
|
49
|
-
genome_range2 = to_gr(genome_range2)
|
|
46
|
+
flip = False
|
|
50
47
|
|
|
51
|
-
if
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
48
|
+
if gr2 is None:
|
|
49
|
+
gr2 = gr1
|
|
50
|
+
gr1 = to_gr(gr1)
|
|
51
|
+
gr2 = to_gr(gr2)
|
|
52
|
+
if gr2.start < gr1.start:
|
|
53
|
+
flip = True
|
|
54
|
+
gr1, gr2 = gr2, gr1
|
|
55
55
|
|
|
56
|
-
if
|
|
57
|
-
|
|
58
|
-
if
|
|
59
|
-
|
|
56
|
+
if isinstance(gr1, str):
|
|
57
|
+
gr1 = GenomeRange(gr1)
|
|
58
|
+
if isinstance(gr2, str):
|
|
59
|
+
gr2 = GenomeRange(gr2)
|
|
60
60
|
|
|
61
|
-
|
|
61
|
+
if gr1.chrom.startswith("chr"):
|
|
62
|
+
gr1.change_chrom_names()
|
|
63
|
+
if gr2.chrom.startswith("chr"):
|
|
64
|
+
gr2.change_chrom_names()
|
|
65
|
+
|
|
66
|
+
binsize = self.infer_binsize(gr1)
|
|
62
67
|
self.fetched_binsize = binsize # expose fetched binsize
|
|
63
68
|
|
|
64
|
-
straw_iter = self.__fetch_straw_iter(
|
|
65
|
-
|
|
69
|
+
straw_iter = self.__fetch_straw_iter(gr1, gr2, binsize)
|
|
70
|
+
mat = self.__straw_to_matrix(straw_iter, gr1, gr2, binsize)
|
|
71
|
+
if flip:
|
|
72
|
+
mat = mat.T
|
|
73
|
+
return mat
|
|
66
74
|
|
|
67
75
|
def infer_binsize(self, genome_range):
|
|
68
76
|
from .tools import infer_resolution
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
2
|
Name: coolbox
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.9
|
|
4
4
|
Summary: Jupyter notebook based genomic data visulization toolkit.
|
|
5
5
|
Home-page: https://github.com/GangCaoLab/CoolBox
|
|
6
6
|
Author: Weize Xu
|
|
7
7
|
Author-email: vet.xwz@gmail.com
|
|
8
8
|
License: GPLv3
|
|
9
9
|
Keywords: genomics,bioinformatics,visualization,Jupyter
|
|
10
|
-
Platform: UNKNOWN
|
|
11
10
|
Classifier: Development Status :: 3 - Alpha
|
|
12
11
|
Classifier: Operating System :: POSIX
|
|
13
12
|
Classifier: Programming Language :: Python
|
|
@@ -20,18 +19,19 @@ Classifier: Intended Audience :: Science/Research
|
|
|
20
19
|
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
|
|
21
20
|
Classifier: Topic :: Scientific/Engineering :: Visualization
|
|
22
21
|
Requires-Python: >=3.7, <4
|
|
23
|
-
|
|
22
|
+
License-File: LICENSE
|
|
23
|
+
Requires-Dist: scipy>=1.0.0
|
|
24
24
|
Requires-Dist: numpy
|
|
25
|
-
Requires-Dist: pandas
|
|
25
|
+
Requires-Dist: pandas>=1.0.0
|
|
26
26
|
Requires-Dist: statsmodels
|
|
27
|
-
Requires-Dist: matplotlib
|
|
28
|
-
Requires-Dist: jupyter
|
|
29
|
-
Requires-Dist: ipywidgets
|
|
27
|
+
Requires-Dist: matplotlib>=3.8.4
|
|
28
|
+
Requires-Dist: jupyter>=1.0.0
|
|
29
|
+
Requires-Dist: ipywidgets>=7.5.1
|
|
30
30
|
Requires-Dist: nbformat
|
|
31
31
|
Requires-Dist: voila
|
|
32
32
|
Requires-Dist: svgutils
|
|
33
33
|
Requires-Dist: intervaltree
|
|
34
|
-
Requires-Dist:
|
|
34
|
+
Requires-Dist: dna_features_viewer
|
|
35
35
|
Requires-Dist: h5py
|
|
36
36
|
Requires-Dist: cooler
|
|
37
37
|
Requires-Dist: pybbi
|
|
@@ -39,7 +39,15 @@ Requires-Dist: numpydoc
|
|
|
39
39
|
Requires-Dist: fire
|
|
40
40
|
Requires-Dist: pytest
|
|
41
41
|
Requires-Dist: strawC
|
|
42
|
+
Dynamic: author
|
|
43
|
+
Dynamic: author-email
|
|
44
|
+
Dynamic: classifier
|
|
45
|
+
Dynamic: description
|
|
46
|
+
Dynamic: home-page
|
|
47
|
+
Dynamic: keywords
|
|
48
|
+
Dynamic: license
|
|
49
|
+
Dynamic: requires-dist
|
|
50
|
+
Dynamic: requires-python
|
|
51
|
+
Dynamic: summary
|
|
42
52
|
|
|
43
53
|
See https://github.com/GangCaoLab/CoolBox
|
|
44
|
-
|
|
45
|
-
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
coolbox/__init__.py,sha256
|
|
1
|
+
coolbox/__init__.py,sha256=gbDwVXQgqJCrp_LBD8s-Ao23kHOWEZvGI_dULd1w5y8,22
|
|
2
2
|
coolbox/api.py,sha256=kFF91EQBjVhJt0_TWzOea9_K15lORsqpwS6lB33hMec,1371
|
|
3
|
-
coolbox/cli.py,sha256=
|
|
3
|
+
coolbox/cli.py,sha256=ZnnuBlLQIn-SfSnpO8s5XKwEbNBv1fGfLx7F1seyfwU,13032
|
|
4
4
|
coolbox/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
5
|
coolbox/core/feature.py,sha256=uS_lxkSY5XiEDV3Sy7kvSptZSLKjUXyGYdqU0jItK1Y,4783
|
|
6
6
|
coolbox/core/browser/__init__.py,sha256=sSnKCwXPqLX8Lj349CWohF6zt6ORYjl68EtXNPev85c,1188
|
|
@@ -10,53 +10,53 @@ coolbox/core/browser/widgets/base.py,sha256=7JqUcbm6JiEKGAV7tTgS9dxdv5iLy5VTNkfg
|
|
|
10
10
|
coolbox/core/browser/widgets/full.py,sha256=tTzIpGqi3zDdkHkDk8T7V03HO8q1wsr_iURZn271ZBc,1380
|
|
11
11
|
coolbox/core/browser/widgets/navigation.py,sha256=uZaspuG_ihYo1fijUE9GT1qxUlQTbf14F_NO11XaqzY,10329
|
|
12
12
|
coolbox/core/browser/widgets/simple.py,sha256=edMR5ATFyNfeZ9vF0WgfdbkfV1cOivQ7vdhsCqJslko,858
|
|
13
|
-
coolbox/core/coverage/__init__.py,sha256=
|
|
13
|
+
coolbox/core/coverage/__init__.py,sha256=kbnMBT9CmUnHCNLxE4avQSkPHoQ-HYUooRs5YZzlSBo,629
|
|
14
14
|
coolbox/core/coverage/base.py,sha256=hybOLXk0H0Btz7zJ308i0mrx7YaG8lFA4INp8KNVQdc,6075
|
|
15
|
-
coolbox/core/coverage/highlights.py,sha256=
|
|
15
|
+
coolbox/core/coverage/highlights.py,sha256=elXU0In66521Cg2hM-TvbxhtuCqtFfcccdlxoyW5OSI,6294
|
|
16
16
|
coolbox/core/coverage/hlines.py,sha256=f-v54Mgz82peaJAZ3qsrqASo_0PiUzSNI9CvHCEfoaY,1744
|
|
17
17
|
coolbox/core/coverage/vlines.py,sha256=6JPrFdkyHgmiGFMHLTJCAfpXGtJHv09pwJo-1Rt28xQ,3798
|
|
18
18
|
coolbox/core/frame/__init__.py,sha256=uNle3cyOXuSsoneUzr0Zu8v6YNVSaKLRkR1D6Xic1Ts,59
|
|
19
19
|
coolbox/core/frame/base.py,sha256=TOd-X_Cs6zQbC-xgGXMmqGjx6Vh2F9pIxdLHDwJyJpg,10645
|
|
20
|
-
coolbox/core/frame/frame.py,sha256=
|
|
20
|
+
coolbox/core/frame/frame.py,sha256=Ltrsty0xj_iSMDkNqVEZL8dCT6Trrol3P7VvpfTLkFw,7823
|
|
21
21
|
coolbox/core/frame/superframe/__init__.py,sha256=GmuujYuf1O9Dy9LcU_Q774cCK_GV1R9R9rGIY82qYQk,33
|
|
22
22
|
coolbox/core/frame/superframe/base.py,sha256=eX-Vx6_bjREyFJzlx7wcIxH64c2PF8hebiX5k1bvIYc,2270
|
|
23
23
|
coolbox/core/frame/superframe/jointview.py,sha256=lTD20hOgl_bCo8H6Jlzm9OAFtXtBKMv0AXGJO7cRYec,9474
|
|
24
|
-
coolbox/core/track/__init__.py,sha256=
|
|
24
|
+
coolbox/core/track/__init__.py,sha256=GNsVAhhq3kcJtWdanlJo1IQaI4JkMQo8tO3FnVKtU4s,465
|
|
25
25
|
coolbox/core/track/bam.py,sha256=eLFpbIjNXql81GBJDI8KW-ZoeRmoW5RKOwMKzEJMeiY,3297
|
|
26
26
|
coolbox/core/track/base.py,sha256=UA21GuqrbWGIO4LxvGbrMViMlSzAHrWevHysLtrF0k8,8027
|
|
27
|
-
coolbox/core/track/gtf.py,sha256=
|
|
28
|
-
coolbox/core/track/ideogram.py,sha256=
|
|
29
|
-
coolbox/core/track/pseudo.py,sha256=
|
|
27
|
+
coolbox/core/track/gtf.py,sha256=ZgmL_Pjvb2FuznGikbRJJ9_X8MI1voFrDZvkj70mlUk,5341
|
|
28
|
+
coolbox/core/track/ideogram.py,sha256=vbdIi3_Yp6kP-uwAR7HQ1KxZnJLB0cw_nMfv_orva5M,4522
|
|
29
|
+
coolbox/core/track/pseudo.py,sha256=qyBpD2PqEKJoQivZ2QaKN5XJJpzLvH_cOXc_Iuzmls0,4969
|
|
30
|
+
coolbox/core/track/tad.py,sha256=P7hhqWjACW47qszDzjnA4TuBJU-79lY7rIotp_qYdyo,7791
|
|
30
31
|
coolbox/core/track/arcs/__init__.py,sha256=rdZHnRJ11jC2Sp1fwx29gNMteUoqkeNvS7MsN0hWIIw,553
|
|
31
32
|
coolbox/core/track/arcs/base.py,sha256=kIZR-vEPGZ7ygUHDA2HGqdWVK0-2lL-sa_QzKrsPuSU,3147
|
|
32
33
|
coolbox/core/track/arcs/bedpe.py,sha256=bxyXjD3a6lui4y-5lkPzjPtqF_pp1VR7gFLnuGF1wfs,2628
|
|
33
34
|
coolbox/core/track/arcs/fetch.py,sha256=_VE_Aixx9Kx0s0mP50stika0d5yx7UKYBxBG_dCsvIc,660
|
|
34
35
|
coolbox/core/track/arcs/hicpeaks.py,sha256=XZWU9L1MM36EN2Zvg5dWZGcxoLgChMMae-Im4y6bZTY,540
|
|
35
36
|
coolbox/core/track/arcs/pairs.py,sha256=j8xNMBBGbLzEfuQMVBDeBWCKprJ6ALLhiDRtLN7TmpE,1316
|
|
36
|
-
coolbox/core/track/arcs/plot.py,sha256=
|
|
37
|
-
coolbox/core/track/bed/__init__.py,sha256=
|
|
38
|
-
coolbox/core/track/bed/base.py,sha256=
|
|
39
|
-
coolbox/core/track/bed/bed.py,sha256=
|
|
40
|
-
coolbox/core/track/bed/fetch.py,sha256=
|
|
41
|
-
coolbox/core/track/bed/plot.py,sha256=
|
|
42
|
-
coolbox/core/track/bed/tad.py,sha256=RUK371ljvanrktc1tY9PLwDyqEFlrYd7185j8Mx7DTI,371
|
|
37
|
+
coolbox/core/track/arcs/plot.py,sha256=nJk9OM3QmScA2kKpNQgooBzZW37cZmerMN8td1eox08,8402
|
|
38
|
+
coolbox/core/track/bed/__init__.py,sha256=Jfr1EhUYCTpJdepIFq-89bk83Fr8LDaP1twiUWrFCQI,46
|
|
39
|
+
coolbox/core/track/bed/base.py,sha256=dNioGhgFCOLeoiu3mhv8ExokonHGL6CrkNzf6KLKpro,5486
|
|
40
|
+
coolbox/core/track/bed/bed.py,sha256=7tSL25mU3_1heg1ftdXs-3kn79trv7faQbR3t1t4KIw,1739
|
|
41
|
+
coolbox/core/track/bed/fetch.py,sha256=IR2wAeCUS1YS0qEkelkwhZNI33fjKR4e9IepAGcyK9Q,2019
|
|
42
|
+
coolbox/core/track/bed/plot.py,sha256=07lnIh0-xclFbBVMyDeUmCtfSIUDveGCnWv436KDS0s,17190
|
|
43
43
|
coolbox/core/track/hicmat/__init__.py,sha256=JHuqWKQ3icSRvN1DUiROizvGrGHdEfHZlokQoQRCWc0,146
|
|
44
|
-
coolbox/core/track/hicmat/base.py,sha256=
|
|
45
|
-
coolbox/core/track/hicmat/cool.py,sha256=
|
|
46
|
-
coolbox/core/track/hicmat/dothic.py,sha256=
|
|
44
|
+
coolbox/core/track/hicmat/base.py,sha256=vIoTfqXneugynhw0wkNCqob6Ptt4IVTkPdSWUQiUhJk,5693
|
|
45
|
+
coolbox/core/track/hicmat/cool.py,sha256=FGs6JsHjG2Iy4vDjETzfhticctEaOuprzgHTyk4OBcg,2668
|
|
46
|
+
coolbox/core/track/hicmat/dothic.py,sha256=M7gD85juT1vQOmbkFuoCXGF9RWI_iFyo6cfYsG7yO-0,2741
|
|
47
47
|
coolbox/core/track/hicmat/hicmat.py,sha256=ZOnCN3sFJxILW11Qcw2JIU7phIjOhsbvWd9Trq7unSI,814
|
|
48
|
-
coolbox/core/track/hicmat/plot.py,sha256=
|
|
48
|
+
coolbox/core/track/hicmat/plot.py,sha256=STFiEJEo8scg9GcJiVr4fgrt8DbDY0hUlyDvHl4t4OM,9411
|
|
49
49
|
coolbox/core/track/hicmat/process.py,sha256=ETl2dufEVyrejcsSjyyqMvhhMLh28eV_fSMGaEY_J4g,5672
|
|
50
50
|
coolbox/core/track/hicmat/hicdiff/__init__.py,sha256=7Ce79XaFBTrpG9isJykt3e7dM5p5IXJgGe1OeJKAAn0,55
|
|
51
51
|
coolbox/core/track/hicmat/hicdiff/diff.py,sha256=Xu6kON7rhTurmhn7hUgnmSaEjQT-OOWWzrZyfigL1Ys,2818
|
|
52
52
|
coolbox/core/track/hicmat/hicdiff/selfish.py,sha256=HRaeemZwO4MyBZAx4R4Z_NaNlwmZ1qhZwD5dlmD8USY,5184
|
|
53
|
-
coolbox/core/track/hist/__init__.py,sha256=
|
|
53
|
+
coolbox/core/track/hist/__init__.py,sha256=GzKbiXG9kR7dfr_NZlM2EmWXl5GzzKPEcNZlzrii7FE,1090
|
|
54
54
|
coolbox/core/track/hist/bam.py,sha256=tskPKPX2LdrNuuNcbxw4qcKAQJF6V3sOGNtQarNpN_E,1111
|
|
55
55
|
coolbox/core/track/hist/base.py,sha256=3l34G8pGtVDHJEf_gGCQpYz75-25emUV_c3uSzYq6UY,4408
|
|
56
56
|
coolbox/core/track/hist/bedgraph.py,sha256=5JCXE3pjgv_Pu4HFhaAY3Q01-nmOFZxKP_cWjbLbJCc,1609
|
|
57
|
-
coolbox/core/track/hist/bigwig.py,sha256=
|
|
57
|
+
coolbox/core/track/hist/bigwig.py,sha256=ZwFJAUrB9w4mTpPB3LZadtfFzGo6aGUOPi2Fp6RZjJI,3343
|
|
58
58
|
coolbox/core/track/hist/hicfeature.py,sha256=d9EyUU3GNvsjzyf9hS3J-22qtdc5hfu6fbu2Q7O3-mw,9371
|
|
59
|
-
coolbox/core/track/hist/plot.py,sha256=
|
|
59
|
+
coolbox/core/track/hist/plot.py,sha256=RkN2lzhV-z6cQYIezBLUUF_KXzKCF2Zjk21vFAR4XaU,8199
|
|
60
60
|
coolbox/core/track/hist/snp.py,sha256=iSn7r4CowSZMDkJ2zfRwavfQYDJhRinP5cwZVnoNLZY,3354
|
|
61
61
|
coolbox/genome/hg19.txt,sha256=IdcU4R0MhT9t4wC0GyvXMiJmZAHizjPpHOzdPzyjy70,423
|
|
62
62
|
coolbox/genome/hg38.txt,sha256=8LUJl2Mc9PDszabammK1DRV7Wpf7PDBvMiRjBdOHJtg,423
|
|
@@ -64,7 +64,7 @@ coolbox/genome/mm10.txt,sha256=vzWeqUgcJwoWaKFMO-p2vEQJi-Sp1C5CWhquvpu6H44,372
|
|
|
64
64
|
coolbox/genome/mm9.txt,sha256=Hdpx0s3MmDbahX1lIuO8FEMZ5BlnrgpGZ9IG6RDT8Ho,372
|
|
65
65
|
coolbox/utilities/__init__.py,sha256=yH4OKxaB2CC2KMMESC_8VswEPa60jb-QBSOLp_d2FFg,2411
|
|
66
66
|
coolbox/utilities/bam.py,sha256=qR9Gey4sk2m8KjYw4jFlTKn_hYKIjyaRwE4EkehoDH4,2338
|
|
67
|
-
coolbox/utilities/bed.py,sha256=
|
|
67
|
+
coolbox/utilities/bed.py,sha256=s0KSgC2vXjKTzFPI3klGiyigcF14d0PGshEZH46SEz0,17804
|
|
68
68
|
coolbox/utilities/doctool.py,sha256=ZfC6jLBhkATJR6iO8ghpdW3C8th7Gv7QNokfh5mo5FQ,4413
|
|
69
69
|
coolbox/utilities/figtools.py,sha256=3SmHIyP8hQBHaBSVt2jgTAEtBwY9JptR6D4Z8utPcQU,4664
|
|
70
70
|
coolbox/utilities/filetool.py,sha256=aEqqa7VBMZyqHtct48Qn8WizGmU65EIVi-zv9k4M9gY,2378
|
|
@@ -74,10 +74,10 @@ coolbox/utilities/logtools.py,sha256=-AY2Hb_RPv7Qydlb6ShwAknDqDPFKwXKq867AF8E99A
|
|
|
74
74
|
coolbox/utilities/hic/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
75
75
|
coolbox/utilities/hic/straw.py,sha256=OccMxjTnvR6_tmdQajRzDSWhubdKUka_mbMA-YH0AYk,30655
|
|
76
76
|
coolbox/utilities/hic/tools.py,sha256=d2jYcrMVSVp7Ft7MholvFmdMlFzPJYagI_Od5ewH4Tk,1818
|
|
77
|
-
coolbox/utilities/hic/wrap.py,sha256=
|
|
78
|
-
coolbox-0.3.
|
|
79
|
-
coolbox-0.3.
|
|
80
|
-
coolbox-0.3.
|
|
81
|
-
coolbox-0.3.
|
|
82
|
-
coolbox-0.3.
|
|
83
|
-
coolbox-0.3.
|
|
77
|
+
coolbox/utilities/hic/wrap.py,sha256=Kq_EsP78gt3sT7oFqgzb7j19G395geMoXOAu87CtUFQ,12492
|
|
78
|
+
coolbox-0.3.9.data/scripts/coolbox,sha256=82rDcSSoAUZ8YUiahT-lSv77QZho8FCr1xPpbN_dK_c,67
|
|
79
|
+
coolbox-0.3.9.dist-info/LICENSE,sha256=jOtLnuWt7d5Hsx6XXB2QxzrSe2sWWh3NgMfFRetluQM,35147
|
|
80
|
+
coolbox-0.3.9.dist-info/METADATA,sha256=FAMWtEhJF3eJN11hbMbV-HbwieoB4dkELvoOMKCdA_A,1635
|
|
81
|
+
coolbox-0.3.9.dist-info/WHEEL,sha256=jB7zZ3N9hIM9adW7qlTAyycLYW9npaWKLRzaoVcLKcM,91
|
|
82
|
+
coolbox-0.3.9.dist-info/top_level.txt,sha256=0n3TkrhoWU8tLVxqBDHrQNeqiV2IelFbwI4UIZC7R14,8
|
|
83
|
+
coolbox-0.3.9.dist-info/RECORD,,
|
coolbox/core/track/bed/tad.py
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
from .bed import BED
|
|
2
|
-
from .base import BedBase
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
class TAD(BED):
|
|
6
|
-
"""
|
|
7
|
-
Tad tack from bed file
|
|
8
|
-
"""
|
|
9
|
-
|
|
10
|
-
DEFAULT_PROPERTIES = {
|
|
11
|
-
'style': BedBase.STYLE_TAD,
|
|
12
|
-
'alpha': 0.3,
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
def __init__(self, file, **kwargs):
|
|
16
|
-
properties = TAD.DEFAULT_PROPERTIES.copy()
|
|
17
|
-
properties.update(kwargs)
|
|
18
|
-
super().__init__(file, **properties)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|