trackplot 0.5.0__tar.gz → 0.5.2__tar.gz
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.
- {trackplot-0.5.0 → trackplot-0.5.2}/PKG-INFO +4 -5
- {trackplot-0.5.0 → trackplot-0.5.2}/pyproject.toml +4 -4
- {trackplot-0.5.0 → trackplot-0.5.2}/trackplot/cli.py +1 -1
- {trackplot-0.5.0 → trackplot-0.5.2}/trackplot/file/Bam.py +1 -2
- {trackplot-0.5.0 → trackplot-0.5.2}/trackplot/plot.py +37 -17
- {trackplot-0.5.0 → trackplot-0.5.2}/trackplot/plot_func.py +11 -3
- trackplot-0.5.2/ui/assets/Home-RdVPWns6.js +1 -0
- trackplot-0.5.2/ui/assets/Plot-DiuFnwNK.js +25 -0
- trackplot-0.5.2/ui/assets/Plot-rbQz1TOM.css +1 -0
- trackplot-0.5.2/ui/assets/el-divider-BHm65SRq.css +1 -0
- trackplot-0.5.2/ui/assets/el-divider-eEJXnQD5.js +1 -0
- trackplot-0.5.2/ui/assets/index-CETGMNio.css +1 -0
- trackplot-0.5.2/ui/assets/index-Dd6Bavnk.js +26 -0
- {trackplot-0.5.0 → trackplot-0.5.2}/ui/index.html +2 -2
- {trackplot-0.5.0 → trackplot-0.5.2}/LICENSE +0 -0
- {trackplot-0.5.0 → trackplot-0.5.2}/README.md +0 -0
- {trackplot-0.5.0 → trackplot-0.5.2}/trackplot/__init__.py +0 -0
- {trackplot-0.5.0 → trackplot-0.5.2}/trackplot/anno/AxLabel.py +0 -0
- {trackplot-0.5.0 → trackplot-0.5.2}/trackplot/anno/__init__.py +0 -0
- {trackplot-0.5.0 → trackplot-0.5.2}/trackplot/anno/theme.py +0 -0
- {trackplot-0.5.0 → trackplot-0.5.2}/trackplot/base/CoordinateMap.py +0 -0
- {trackplot-0.5.0 → trackplot-0.5.2}/trackplot/base/GenomicLoci.py +0 -0
- {trackplot-0.5.0 → trackplot-0.5.2}/trackplot/base/Junction.py +0 -0
- {trackplot-0.5.0 → trackplot-0.5.2}/trackplot/base/Protein.py +0 -0
- {trackplot-0.5.0 → trackplot-0.5.2}/trackplot/base/ReadDepth.py +0 -0
- {trackplot-0.5.0 → trackplot-0.5.2}/trackplot/base/Readder.py +0 -0
- {trackplot-0.5.0 → trackplot-0.5.2}/trackplot/base/Stroke.py +0 -0
- {trackplot-0.5.0 → trackplot-0.5.2}/trackplot/base/Transcript.py +0 -0
- {trackplot-0.5.0 → trackplot-0.5.2}/trackplot/base/__init__.py +0 -0
- {trackplot-0.5.0 → trackplot-0.5.2}/trackplot/base/pyUniprot.py +0 -0
- {trackplot-0.5.0 → trackplot-0.5.2}/trackplot/conf/DomainSetting.py +0 -0
- {trackplot-0.5.0 → trackplot-0.5.2}/trackplot/conf/__init__.py +0 -0
- {trackplot-0.5.0 → trackplot-0.5.2}/trackplot/conf/config.py +0 -0
- {trackplot-0.5.0 → trackplot-0.5.2}/trackplot/conf/drawing.py +0 -0
- {trackplot-0.5.0 → trackplot-0.5.2}/trackplot/conf/ui.py +0 -0
- {trackplot-0.5.0 → trackplot-0.5.2}/trackplot/file/ATAC.py +0 -0
- {trackplot-0.5.0 → trackplot-0.5.2}/trackplot/file/Annotation.py +0 -0
- {trackplot-0.5.0 → trackplot-0.5.2}/trackplot/file/BedGraph.py +0 -0
- {trackplot-0.5.0 → trackplot-0.5.2}/trackplot/file/Bigwig.py +0 -0
- {trackplot-0.5.0 → trackplot-0.5.2}/trackplot/file/Depth.py +0 -0
- {trackplot-0.5.0 → trackplot-0.5.2}/trackplot/file/Fasta.py +0 -0
- {trackplot-0.5.0 → trackplot-0.5.2}/trackplot/file/File.py +0 -0
- {trackplot-0.5.0 → trackplot-0.5.2}/trackplot/file/HiCMatrixTrack.py +0 -0
- {trackplot-0.5.0 → trackplot-0.5.2}/trackplot/file/Junction.py +0 -0
- {trackplot-0.5.0 → trackplot-0.5.2}/trackplot/file/Motif.py +0 -0
- {trackplot-0.5.0 → trackplot-0.5.2}/trackplot/file/ReadSegments.py +0 -0
- {trackplot-0.5.0 → trackplot-0.5.2}/trackplot/file/__init__.py +0 -0
- {trackplot-0.5.0 → trackplot-0.5.2}/trackplot/plot_tests.py +0 -0
- {trackplot-0.5.0 → trackplot-0.5.2}/trackplot/server.py +0 -0
- {trackplot-0.5.0 → trackplot-0.5.2}/ui/assets/Home-DOO13BH7.js +0 -0
- {trackplot-0.5.0 → trackplot-0.5.2}/ui/assets/Home-QmeAKOl4.js +0 -0
- {trackplot-0.5.0 → trackplot-0.5.2}/ui/assets/Home-jSR0MsHI.css +0 -0
- {trackplot-0.5.0 → trackplot-0.5.2}/ui/assets/Plot-BmqHZ4QE.css +0 -0
- {trackplot-0.5.0 → trackplot-0.5.2}/ui/assets/Plot-Bvyo6ju9.css +0 -0
- {trackplot-0.5.0 → trackplot-0.5.2}/ui/assets/Plot-CTM-EDrj.js +0 -0
- {trackplot-0.5.0 → trackplot-0.5.2}/ui/assets/Plot-hvkDteAn.js +0 -0
- {trackplot-0.5.0 → trackplot-0.5.2}/ui/assets/el-divider-BuEUMHwE.css +0 -0
- {trackplot-0.5.0 → trackplot-0.5.2}/ui/assets/el-divider-SYT5K-ds.css +0 -0
- {trackplot-0.5.0 → trackplot-0.5.2}/ui/assets/el-divider-VYjL3C7L.js +0 -0
- {trackplot-0.5.0 → trackplot-0.5.2}/ui/assets/el-divider-u9f0bZWY.js +0 -0
- {trackplot-0.5.0 → trackplot-0.5.2}/ui/assets/index-Cexhr_fn.css +0 -0
- {trackplot-0.5.0 → trackplot-0.5.2}/ui/assets/index-CrzyEb9s.js +0 -0
- {trackplot-0.5.0 → trackplot-0.5.2}/ui/assets/index-D_Cw0sbX.js +0 -0
- {trackplot-0.5.0 → trackplot-0.5.2}/ui/assets/index-Sq2gI4sE.css +0 -0
- {trackplot-0.5.0 → trackplot-0.5.2}/ui/vite.svg +0 -0
|
@@ -1,24 +1,23 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: trackplot
|
|
3
|
-
Version: 0.5.
|
|
3
|
+
Version: 0.5.2
|
|
4
4
|
Summary: The trackplot is a tool for visualizing various next-generation sequencing (NGS) data, including DNA-seq, RNA-seq, single-cell RNA-seq and full-length sequencing datasets. https://sashimi.readthedocs.io/
|
|
5
5
|
License: BSD-3
|
|
6
6
|
Author: ygidtu
|
|
7
7
|
Author-email: ygidtu@gmail.com
|
|
8
|
-
Requires-Python: >=3.
|
|
8
|
+
Requires-Python: >=3.10,<3.13
|
|
9
9
|
Classifier: License :: Other/Proprietary License
|
|
10
10
|
Classifier: Programming Language :: Python :: 3
|
|
11
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
12
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
13
11
|
Classifier: Programming Language :: Python :: 3.10
|
|
14
12
|
Classifier: Programming Language :: Python :: 3.11
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
15
14
|
Requires-Dist: adjusttext (>=0.7.3,<0.8.0)
|
|
16
15
|
Requires-Dist: cairocffi (>=1.4.0,<2.0.0)
|
|
17
16
|
Requires-Dist: click (>=8.1.3,<9.0.0)
|
|
18
17
|
Requires-Dist: click-option-group (>=0.5.5,<0.6.0)
|
|
19
18
|
Requires-Dist: filetype (>=1.2.0,<2.0.0)
|
|
20
19
|
Requires-Dist: flask (>=2.3.2,<3.0.0)
|
|
21
|
-
Requires-Dist: hicmatrix (>=
|
|
20
|
+
Requires-Dist: hicmatrix (>=17,<18)
|
|
22
21
|
Requires-Dist: loguru (>=0.6.0,<0.7.0)
|
|
23
22
|
Requires-Dist: matplotlib (>=3.6.3,<4.0.0)
|
|
24
23
|
Requires-Dist: numpy (>=1.24.1,<2.0.0)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "trackplot"
|
|
3
|
-
version = "0.5.
|
|
3
|
+
version = "0.5.2"
|
|
4
4
|
description = "The trackplot is a tool for visualizing various next-generation sequencing (NGS) data, including DNA-seq, RNA-seq, single-cell RNA-seq and full-length sequencing datasets. https://sashimi.readthedocs.io/"
|
|
5
5
|
authors = ["ygidtu <ygidtu@gmail.com>"]
|
|
6
6
|
license = "BSD-3"
|
|
@@ -13,13 +13,13 @@ include = [
|
|
|
13
13
|
]
|
|
14
14
|
|
|
15
15
|
[tool.poetry.dependencies]
|
|
16
|
-
python = ">=3.
|
|
16
|
+
python = ">=3.10,<3.13"
|
|
17
17
|
adjusttext = "^0.7.3"
|
|
18
18
|
cairocffi = "^1.4.0"
|
|
19
19
|
click = "^8.1.3"
|
|
20
20
|
click-option-group = "^0.5.5"
|
|
21
21
|
filetype = "^1.2.0"
|
|
22
|
-
hicmatrix = "^
|
|
22
|
+
hicmatrix = "^17"
|
|
23
23
|
loguru = "^0.6.0"
|
|
24
24
|
matplotlib = "^3.6.3"
|
|
25
25
|
numpy = "^1.24.1"
|
|
@@ -34,7 +34,7 @@ flask = "^2.3.2"
|
|
|
34
34
|
|
|
35
35
|
[[tool.poetry.source]]
|
|
36
36
|
name = "mirrors"
|
|
37
|
-
url = "https://
|
|
37
|
+
url = "https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple/"
|
|
38
38
|
priority = "primary"
|
|
39
39
|
|
|
40
40
|
[[tool.poetry.source]]
|
|
@@ -161,8 +161,7 @@ class Bam(SingleCell):
|
|
|
161
161
|
spanned_junctions = kwargs.get("junctions", {})
|
|
162
162
|
included_junctions = kwargs.get("included_junctions", {})
|
|
163
163
|
remove_duplicate_umi = kwargs.get("remove_duplicate_umi", False)
|
|
164
|
-
spanned_junctions_plus =
|
|
165
|
-
spanned_junctions_minus = dict()
|
|
164
|
+
spanned_junctions_plus, spanned_junctions_minus = {}, {}
|
|
166
165
|
plus, minus = np.zeros(len(region), dtype=np.int32), np.zeros(len(region), dtype=np.int32)
|
|
167
166
|
site_plus, site_minus = np.zeros(len(region), dtype=np.int32), np.zeros(len(region), dtype=np.int32)
|
|
168
167
|
|
|
@@ -30,7 +30,7 @@ logging.getLogger('matplotlib.font_manager').setLevel(logging.ERROR)
|
|
|
30
30
|
faulthandler.enable()
|
|
31
31
|
|
|
32
32
|
|
|
33
|
-
__version__ = "0.5.
|
|
33
|
+
__version__ = "0.5.2"
|
|
34
34
|
__author__ = "ygidtu & Ran Zhou"
|
|
35
35
|
__email__ = "ygidtu@gmail.com"
|
|
36
36
|
|
|
@@ -1181,22 +1181,24 @@ class Plot(object):
|
|
|
1181
1181
|
|
|
1182
1182
|
max_used_y_val, min_used_y_val, same_y_by_groups = {}, {}, {}
|
|
1183
1183
|
|
|
1184
|
+
|
|
1184
1185
|
default_y = {}
|
|
1185
|
-
if kwargs.get("y_limit")
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
line
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1186
|
+
if kwargs.get("y_limit"):
|
|
1187
|
+
if not os.path.exists(kwargs.get("y_limit")):
|
|
1188
|
+
logger.warning(f'{kwargs.get("y_limit")} not exists')
|
|
1189
|
+
else:
|
|
1190
|
+
logger.info("load y-limit settings from: " + kwargs.get("y_limit"))
|
|
1191
|
+
with open(kwargs.get("y_limit")) as r:
|
|
1192
|
+
for line in r:
|
|
1193
|
+
if line.startswith("#"):
|
|
1194
|
+
continue
|
|
1195
|
+
line = line.split()
|
|
1196
|
+
if len(line) > 1:
|
|
1197
|
+
try:
|
|
1198
|
+
default_y[line[0]] = [float(x) for x in line[1:]]
|
|
1199
|
+
except Exception as err:
|
|
1200
|
+
logger.warning(f"The y limit of {line[0]} is invalid: {err}")
|
|
1201
|
+
|
|
1200
1202
|
if kwargs.get("same_y") or kwargs.get("same_y_sc"):
|
|
1201
1203
|
logger.info("--same-y is enabled")
|
|
1202
1204
|
# read the y groups
|
|
@@ -1246,6 +1248,7 @@ class Plot(object):
|
|
|
1246
1248
|
max_used_y_val[key] = max_used_y_val[obj.path]
|
|
1247
1249
|
min_used_y_val[key] = min_used_y_val[obj.path]
|
|
1248
1250
|
|
|
1251
|
+
|
|
1249
1252
|
curr_idx = 0
|
|
1250
1253
|
for p in self.plots:
|
|
1251
1254
|
if p.type == "igv":
|
|
@@ -1267,7 +1270,24 @@ class Plot(object):
|
|
|
1267
1270
|
elif kwargs.get("same_y"):
|
|
1268
1271
|
max_y_val_, min_y_val_ = max(max_used_y_val.values()), min(min_used_y_val.values())
|
|
1269
1272
|
logger.info(f"Set for {p.obj[0].label} by global: max_y={max_y_val_}; min_y={min_y_val_}")
|
|
1270
|
-
|
|
1273
|
+
elif default_y:
|
|
1274
|
+
if p.type in ["density", "site-plot", "line"]:
|
|
1275
|
+
for obj in p.obj:
|
|
1276
|
+
# set y limit
|
|
1277
|
+
if obj.label in default_y:
|
|
1278
|
+
max_y_val_ = default_y[obj.label][0]
|
|
1279
|
+
|
|
1280
|
+
if len(default_y[obj.label]) > 1:
|
|
1281
|
+
min_y_val_ = default_y[obj.label][1]
|
|
1282
|
+
|
|
1283
|
+
if same_y_by_groups and obj.label in same_y_by_groups:
|
|
1284
|
+
key = same_y_by_groups[obj.label]
|
|
1285
|
+
max_y_val_ = max_used_y_val[obj.path]
|
|
1286
|
+
min_y_val_ = min_used_y_val[obj.path]
|
|
1287
|
+
logger.info(f"Set for {p.obj[0].label} by limited: max_y={max_y_val_}; min_y={min_y_val_}")
|
|
1288
|
+
break
|
|
1289
|
+
|
|
1290
|
+
|
|
1271
1291
|
logger.info(f"plotting {p.type} at idx: {curr_idx} with height_ratio: {height_ratio[curr_idx]}")
|
|
1272
1292
|
if p.type == "density":
|
|
1273
1293
|
if isinstance(p.obj[0], Depth):
|
|
@@ -436,7 +436,13 @@ def plot_annotation(
|
|
|
436
436
|
for transcript in data:
|
|
437
437
|
strand = transcript.strand
|
|
438
438
|
# @2018.12.20 add transcript id, based on fixed coordinates
|
|
439
|
-
|
|
439
|
+
# @2025.02.04 add warnings for transcript name and id check
|
|
440
|
+
if transcript.transcript or transcript.transcript_id:
|
|
441
|
+
show_text = transcript.transcript
|
|
442
|
+
if not transcript.transcript:
|
|
443
|
+
logger.warning(f"there is not transcript_name, using transcript_id instead")
|
|
444
|
+
show_text = transcript.transcript_id
|
|
445
|
+
|
|
440
446
|
if show_gene and transcript.gene and transcript.gene_id != transcript.transcript_id:
|
|
441
447
|
if show_id:
|
|
442
448
|
ax.text(x=-.01 * max(graph_coords), y=y_loc + 0.25,
|
|
@@ -445,9 +451,11 @@ def plot_annotation(
|
|
|
445
451
|
s=transcript.transcript_id, fontsize=font_size, ha="right")
|
|
446
452
|
else:
|
|
447
453
|
ax.text(x=-.01 * max(graph_coords), y=y_loc,
|
|
448
|
-
s=transcript.gene + " | " +
|
|
454
|
+
s=transcript.gene + " | " + show_text, fontsize=font_size, ha="right")
|
|
449
455
|
else:
|
|
450
|
-
ax.text(x=-1, y=y_loc - 0.1, s=
|
|
456
|
+
ax.text(x=-1, y=y_loc - 0.1, s=show_text, fontsize=font_size, ha="right")
|
|
457
|
+
else:
|
|
458
|
+
logger.warning(f"there is no transcript_name and transcript_id")
|
|
451
459
|
|
|
452
460
|
# @2018.12.19
|
|
453
461
|
# s and e is the start and end site of single exon
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as _,o as m,c as u,a as c,t as f,b as e,w as t,E as g,e as n,u as i,f as h,_ as y}from"./index-Dd6Bavnk.js";import{E as k,a as w,b as E,m as v,v as b}from"./el-divider-eEJXnQD5.js";const x={name:"Home",data(){return{msg:"Welcome to trackplot App",example:"https://trackplot.readthedocs.io/en/latest/imgs/diagram.png"}}},C=_({...x,setup(B){return(r,a)=>{const s=k,l=w,o=h,p=g,d=E;return m(),u("div",null,[c("h1",null,f(r.msg),1),e(s),e(p,null,{default:t(()=>[e(o,{span:12,offset:3},{default:t(()=>[e(l,{type:"primary",href:"/#/plot"},{default:t(()=>a[0]||(a[0]=[n("Create your own plot")])),_:1})]),_:1}),e(o,{span:6},{default:t(()=>[e(l,{type:"primary",href:"https://github.com/ygidtu/trackplot/issues",icon:i(v)},{default:t(()=>a[1]||(a[1]=[n("Report bug at Github")])),_:1},8,["icon"]),e(s,{direction:"vertical"}),e(l,{type:"primary",icon:i(b),href:"https://trackplot.readthedocs.io/en/latest/web/"},{default:t(()=>a[2]||(a[2]=[n("Read the tutorial")])),_:1},8,["icon"])]),_:1}),e(o,{span:6})]),_:1}),e(s),e(p,null,{default:t(()=>[e(o,{span:20,offset:2},{default:t(()=>[e(d,{src:r.example,width:"100%"},null,8,["src"])]),_:1})]),_:1})])}}}),V=y(C,[["__scopeId","data-v-3d7de397"]]);export{V as default};
|