methplotlib 0.23.1__py3-none-any.whl → 0.23.3__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.
- methplotlib/import_methylation.py +30 -7
- methplotlib/qc.py +0 -5
- methplotlib/utils.py +1 -1
- methplotlib/version.py +1 -1
- {methplotlib-0.23.1.dist-info → methplotlib-0.23.3.dist-info}/METADATA +1 -1
- methplotlib-0.23.3.dist-info/RECORD +19 -0
- methplotlib-0.23.1.dist-info/RECORD +0 -19
- {methplotlib-0.23.1.data → methplotlib-0.23.3.data}/scripts/allele_specific_modification +0 -0
- {methplotlib-0.23.1.data → methplotlib-0.23.3.data}/scripts/differential_modification +0 -0
- {methplotlib-0.23.1.dist-info → methplotlib-0.23.3.dist-info}/WHEEL +0 -0
- {methplotlib-0.23.1.dist-info → methplotlib-0.23.3.dist-info}/entry_points.txt +0 -0
- {methplotlib-0.23.1.dist-info → methplotlib-0.23.3.dist-info}/licenses/LICENSE +0 -0
- {methplotlib-0.23.1.dist-info → methplotlib-0.23.3.dist-info}/top_level.txt +0 -0
|
@@ -91,6 +91,7 @@ def parse_nanopolish(filename, file_type, name, window, smoothen=5):
|
|
|
91
91
|
raise
|
|
92
92
|
header = gzip.open(filename, "rt").readline().rstrip().split("\t")
|
|
93
93
|
table = pd.read_csv(tabix_stream.stdout, sep="\t", header=None, names=header)
|
|
94
|
+
check_tabix(tabix_stream, filename, window)
|
|
94
95
|
else:
|
|
95
96
|
logging.info(f"Reading {filename} slowly by splitting the file in chunks.")
|
|
96
97
|
sys.stderr.write(f"\nReading {filename} would be faster with bgzip and tabix.\n")
|
|
@@ -235,6 +236,19 @@ def no_records_warning(filename, window):
|
|
|
235
236
|
sys.stderr.write(f"\nWARNING: {message}\nThis dataset is skipped.\n")
|
|
236
237
|
|
|
237
238
|
|
|
239
|
+
def check_tabix(tabix_stream, filename, window):
|
|
240
|
+
"""
|
|
241
|
+
Exit if tabix failed, as a failing tabix also writes nothing to stdout,
|
|
242
|
+
which would otherwise be reported as a window without records.
|
|
243
|
+
Only call this after its stdout has been read.
|
|
244
|
+
"""
|
|
245
|
+
if tabix_stream.wait() != 0:
|
|
246
|
+
sys.exit(
|
|
247
|
+
f"\n\nERROR: tabix failed to read {window.chromosome}:{window.begin}-{window.end} "
|
|
248
|
+
f"from {filename}:\n{tabix_stream.stderr.read().decode()}"
|
|
249
|
+
)
|
|
250
|
+
|
|
251
|
+
|
|
238
252
|
def read_in_chunks(filename, window, sep, usecols, index_suggestion):
|
|
239
253
|
"""
|
|
240
254
|
Read a headerless file in chunks, keeping only the lines of the chromosome of interest.
|
|
@@ -303,6 +317,7 @@ def parse_bedgraph(filename, name, window):
|
|
|
303
317
|
names=colnames,
|
|
304
318
|
dtype={0: str},
|
|
305
319
|
)
|
|
320
|
+
check_tabix(tabix_stream, filename, window)
|
|
306
321
|
else:
|
|
307
322
|
table = read_in_chunks(
|
|
308
323
|
filename,
|
|
@@ -380,13 +395,21 @@ def parse_bedmethyl(filename, name, window, smoothen=5, flavor="modkit", mods_of
|
|
|
380
395
|
sys.stderr.write("\n\nERROR when opening a tabix stream.\n")
|
|
381
396
|
sys.stderr.write("Is tabix installed and on the PATH?.")
|
|
382
397
|
raise
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
398
|
+
try:
|
|
399
|
+
table = pd.read_csv(
|
|
400
|
+
tabix_stream.stdout,
|
|
401
|
+
sep=sep,
|
|
402
|
+
header=None,
|
|
403
|
+
usecols=usecols,
|
|
404
|
+
dtype={0: str},
|
|
405
|
+
).rename(columns=colnames)
|
|
406
|
+
except pd.errors.EmptyDataError:
|
|
407
|
+
table = None
|
|
408
|
+
check_tabix(tabix_stream, filename, window)
|
|
409
|
+
# tabix writes nothing if the window has no records or the chromosome is not in the index
|
|
410
|
+
if table is None:
|
|
411
|
+
no_records_warning(filename, window)
|
|
412
|
+
return []
|
|
390
413
|
else:
|
|
391
414
|
table = read_in_chunks(
|
|
392
415
|
filename,
|
methplotlib/qc.py
CHANGED
|
@@ -45,7 +45,6 @@ def num_sites_bar(meth_data):
|
|
|
45
45
|
layout = dict(title="Number of called positions")
|
|
46
46
|
return plotly.offline.plot(dict(data=[trace], layout=layout),
|
|
47
47
|
output_type="div",
|
|
48
|
-
show_link=False,
|
|
49
48
|
include_plotlyjs='cdn')
|
|
50
49
|
|
|
51
50
|
|
|
@@ -72,7 +71,6 @@ def pairwise_correlation_plot(full):
|
|
|
72
71
|
|
|
73
72
|
return plotly.offline.plot(dict(data=[trace], layout=layout),
|
|
74
73
|
output_type="div",
|
|
75
|
-
show_link=False,
|
|
76
74
|
include_plotlyjs='cdn')
|
|
77
75
|
|
|
78
76
|
|
|
@@ -99,7 +97,6 @@ def pca(full):
|
|
|
99
97
|
)
|
|
100
98
|
return plotly.offline.plot(dict(data=data, layout=layout),
|
|
101
99
|
output_type="div",
|
|
102
|
-
show_link=False,
|
|
103
100
|
include_plotlyjs='cdn')
|
|
104
101
|
|
|
105
102
|
|
|
@@ -110,7 +107,6 @@ def global_box(data):
|
|
|
110
107
|
x="dataset", y="freq", title="Global frequency of modification")
|
|
111
108
|
return plotly.offline.plot(fig,
|
|
112
109
|
output_type="div",
|
|
113
|
-
show_link=False,
|
|
114
110
|
include_plotlyjs='cdn')
|
|
115
111
|
|
|
116
112
|
|
|
@@ -129,5 +125,4 @@ def modified_fraction_histogram(full):
|
|
|
129
125
|
return plotly.offline.plot(dict(data=traces,
|
|
130
126
|
layout=layout),
|
|
131
127
|
output_type="div",
|
|
132
|
-
show_link=False,
|
|
133
128
|
include_plotlyjs='cdn')
|
methplotlib/utils.py
CHANGED
|
@@ -405,5 +405,5 @@ def create_browser_output(fig, outfile, window):
|
|
|
405
405
|
def write_html_output(fig, outfile):
|
|
406
406
|
with open(outfile, "w+") as output:
|
|
407
407
|
output.write(
|
|
408
|
-
plotly.offline.plot(fig, output_type="div",
|
|
408
|
+
plotly.offline.plot(fig, output_type="div", include_plotlyjs="cdn")
|
|
409
409
|
)
|
methplotlib/version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "0.23.
|
|
1
|
+
__version__ = "0.23.3"
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
methplotlib/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
+
methplotlib/annotation.py,sha256=c-b5bUlVTi2Mc0QDBzsKe4V7N0ETw8BEtvY-e0ZtCjQ,7541
|
|
3
|
+
methplotlib/helpers.py,sha256=D69CLM_M8D0wNoV4p-ODr81uatfeCBUUzYdifUmjL88,432
|
|
4
|
+
methplotlib/import_methylation.py,sha256=K9OvjwcjDyEmNBrtU31rllrDjp3CwnjEoJ4J8GgIKKk,23715
|
|
5
|
+
methplotlib/methplotlib.py,sha256=Gk07ODKVfDlA33SlzgIsqRLP0j1DYng24ku87DyYrXY,6264
|
|
6
|
+
methplotlib/plots.py,sha256=MPViIwPrrYn_gx_1VYs3ZECthll3OPrbcyoVAC00cLU,14757
|
|
7
|
+
methplotlib/qc.py,sha256=jvZnkl9KNiZGstcZRt17W3Bngr5z9BmkNPTxrEjJoW4,5350
|
|
8
|
+
methplotlib/utils.py,sha256=KKdb7R6l7i8oVuybnN5srDc2iB8KDjOPoDpXr6E8nrw,14519
|
|
9
|
+
methplotlib/version.py,sha256=HTz96uK4_QHPX5i3NrEcr4eXcxlyepsy_nU-3niBQe8,23
|
|
10
|
+
methplotlib/differential/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
11
|
+
methplotlib/differential/differential.py,sha256=YSWUAeMaI_yERj6oAdvyWM3vKn2laTtWp6Y8ZuwvLA4,1773
|
|
12
|
+
methplotlib-0.23.3.data/scripts/allele_specific_modification,sha256=PpBdGIiVm8M6OjM0m68OPWnsyDeXJZDnbSNCrH3CaHY,1403
|
|
13
|
+
methplotlib-0.23.3.data/scripts/differential_modification,sha256=SZ0odGaykx_cqIHh5tOKSVUCbXOdHR4PSv4Yv6V04Zw,1461
|
|
14
|
+
methplotlib-0.23.3.dist-info/licenses/LICENSE,sha256=qan9p7Fjhl7WzXuiZoaXCViH5si1PSKBNm9K2f0_51c,1073
|
|
15
|
+
methplotlib-0.23.3.dist-info/METADATA,sha256=58qJ6B-4UVk72VCdKEvvF8pod_mtaz9qavVJcRTeUtY,5718
|
|
16
|
+
methplotlib-0.23.3.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
|
|
17
|
+
methplotlib-0.23.3.dist-info/entry_points.txt,sha256=Tav-_W5yZc2G8ApYYuFLfVKU2QugXuEN8z_AjPZwORs,61
|
|
18
|
+
methplotlib-0.23.3.dist-info/top_level.txt,sha256=w1XBGUmKUyGeE0_ufRQ6Vi5lMIzDq6TwF587aofDxuQ,12
|
|
19
|
+
methplotlib-0.23.3.dist-info/RECORD,,
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
methplotlib/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
-
methplotlib/annotation.py,sha256=c-b5bUlVTi2Mc0QDBzsKe4V7N0ETw8BEtvY-e0ZtCjQ,7541
|
|
3
|
-
methplotlib/helpers.py,sha256=D69CLM_M8D0wNoV4p-ODr81uatfeCBUUzYdifUmjL88,432
|
|
4
|
-
methplotlib/import_methylation.py,sha256=XyI52b6GYPDlxm_JbUMFqeDkEMUu8Sg51BcT9a2aEm8,22728
|
|
5
|
-
methplotlib/methplotlib.py,sha256=Gk07ODKVfDlA33SlzgIsqRLP0j1DYng24ku87DyYrXY,6264
|
|
6
|
-
methplotlib/plots.py,sha256=MPViIwPrrYn_gx_1VYs3ZECthll3OPrbcyoVAC00cLU,14757
|
|
7
|
-
methplotlib/qc.py,sha256=1EvpxeU7xfwKcQeNflrO4pgsZbc9gbCTcMbShumB_Mo,5590
|
|
8
|
-
methplotlib/utils.py,sha256=ffRDe2ITycIj7_5JV2NBjU6XA4qYYIK3HuWUkqhfJLI,14536
|
|
9
|
-
methplotlib/version.py,sha256=EmtVqV41YmZp6Mj5pkm4iGXDMznVEE4GQEUYGGidq30,23
|
|
10
|
-
methplotlib/differential/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
11
|
-
methplotlib/differential/differential.py,sha256=YSWUAeMaI_yERj6oAdvyWM3vKn2laTtWp6Y8ZuwvLA4,1773
|
|
12
|
-
methplotlib-0.23.1.data/scripts/allele_specific_modification,sha256=PpBdGIiVm8M6OjM0m68OPWnsyDeXJZDnbSNCrH3CaHY,1403
|
|
13
|
-
methplotlib-0.23.1.data/scripts/differential_modification,sha256=SZ0odGaykx_cqIHh5tOKSVUCbXOdHR4PSv4Yv6V04Zw,1461
|
|
14
|
-
methplotlib-0.23.1.dist-info/licenses/LICENSE,sha256=qan9p7Fjhl7WzXuiZoaXCViH5si1PSKBNm9K2f0_51c,1073
|
|
15
|
-
methplotlib-0.23.1.dist-info/METADATA,sha256=-khfgkXsY0_Jr48VBRtkrn1YYX4r4_qYPZhzS-lGQuo,5718
|
|
16
|
-
methplotlib-0.23.1.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
|
|
17
|
-
methplotlib-0.23.1.dist-info/entry_points.txt,sha256=Tav-_W5yZc2G8ApYYuFLfVKU2QugXuEN8z_AjPZwORs,61
|
|
18
|
-
methplotlib-0.23.1.dist-info/top_level.txt,sha256=w1XBGUmKUyGeE0_ufRQ6Vi5lMIzDq6TwF587aofDxuQ,12
|
|
19
|
-
methplotlib-0.23.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|