trackplot 0.5.0__tar.gz → 0.5.1__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.
Files changed (58) hide show
  1. {trackplot-0.5.0 → trackplot-0.5.1}/PKG-INFO +1 -1
  2. {trackplot-0.5.0 → trackplot-0.5.1}/pyproject.toml +1 -1
  3. {trackplot-0.5.0 → trackplot-0.5.1}/trackplot/plot.py +37 -17
  4. {trackplot-0.5.0 → trackplot-0.5.1}/LICENSE +0 -0
  5. {trackplot-0.5.0 → trackplot-0.5.1}/README.md +0 -0
  6. {trackplot-0.5.0 → trackplot-0.5.1}/trackplot/__init__.py +0 -0
  7. {trackplot-0.5.0 → trackplot-0.5.1}/trackplot/anno/AxLabel.py +0 -0
  8. {trackplot-0.5.0 → trackplot-0.5.1}/trackplot/anno/__init__.py +0 -0
  9. {trackplot-0.5.0 → trackplot-0.5.1}/trackplot/anno/theme.py +0 -0
  10. {trackplot-0.5.0 → trackplot-0.5.1}/trackplot/base/CoordinateMap.py +0 -0
  11. {trackplot-0.5.0 → trackplot-0.5.1}/trackplot/base/GenomicLoci.py +0 -0
  12. {trackplot-0.5.0 → trackplot-0.5.1}/trackplot/base/Junction.py +0 -0
  13. {trackplot-0.5.0 → trackplot-0.5.1}/trackplot/base/Protein.py +0 -0
  14. {trackplot-0.5.0 → trackplot-0.5.1}/trackplot/base/ReadDepth.py +0 -0
  15. {trackplot-0.5.0 → trackplot-0.5.1}/trackplot/base/Readder.py +0 -0
  16. {trackplot-0.5.0 → trackplot-0.5.1}/trackplot/base/Stroke.py +0 -0
  17. {trackplot-0.5.0 → trackplot-0.5.1}/trackplot/base/Transcript.py +0 -0
  18. {trackplot-0.5.0 → trackplot-0.5.1}/trackplot/base/__init__.py +0 -0
  19. {trackplot-0.5.0 → trackplot-0.5.1}/trackplot/base/pyUniprot.py +0 -0
  20. {trackplot-0.5.0 → trackplot-0.5.1}/trackplot/cli.py +0 -0
  21. {trackplot-0.5.0 → trackplot-0.5.1}/trackplot/conf/DomainSetting.py +0 -0
  22. {trackplot-0.5.0 → trackplot-0.5.1}/trackplot/conf/__init__.py +0 -0
  23. {trackplot-0.5.0 → trackplot-0.5.1}/trackplot/conf/config.py +0 -0
  24. {trackplot-0.5.0 → trackplot-0.5.1}/trackplot/conf/drawing.py +0 -0
  25. {trackplot-0.5.0 → trackplot-0.5.1}/trackplot/conf/ui.py +0 -0
  26. {trackplot-0.5.0 → trackplot-0.5.1}/trackplot/file/ATAC.py +0 -0
  27. {trackplot-0.5.0 → trackplot-0.5.1}/trackplot/file/Annotation.py +0 -0
  28. {trackplot-0.5.0 → trackplot-0.5.1}/trackplot/file/Bam.py +0 -0
  29. {trackplot-0.5.0 → trackplot-0.5.1}/trackplot/file/BedGraph.py +0 -0
  30. {trackplot-0.5.0 → trackplot-0.5.1}/trackplot/file/Bigwig.py +0 -0
  31. {trackplot-0.5.0 → trackplot-0.5.1}/trackplot/file/Depth.py +0 -0
  32. {trackplot-0.5.0 → trackplot-0.5.1}/trackplot/file/Fasta.py +0 -0
  33. {trackplot-0.5.0 → trackplot-0.5.1}/trackplot/file/File.py +0 -0
  34. {trackplot-0.5.0 → trackplot-0.5.1}/trackplot/file/HiCMatrixTrack.py +0 -0
  35. {trackplot-0.5.0 → trackplot-0.5.1}/trackplot/file/Junction.py +0 -0
  36. {trackplot-0.5.0 → trackplot-0.5.1}/trackplot/file/Motif.py +0 -0
  37. {trackplot-0.5.0 → trackplot-0.5.1}/trackplot/file/ReadSegments.py +0 -0
  38. {trackplot-0.5.0 → trackplot-0.5.1}/trackplot/file/__init__.py +0 -0
  39. {trackplot-0.5.0 → trackplot-0.5.1}/trackplot/plot_func.py +0 -0
  40. {trackplot-0.5.0 → trackplot-0.5.1}/trackplot/plot_tests.py +0 -0
  41. {trackplot-0.5.0 → trackplot-0.5.1}/trackplot/server.py +0 -0
  42. {trackplot-0.5.0 → trackplot-0.5.1}/ui/assets/Home-DOO13BH7.js +0 -0
  43. {trackplot-0.5.0 → trackplot-0.5.1}/ui/assets/Home-QmeAKOl4.js +0 -0
  44. {trackplot-0.5.0 → trackplot-0.5.1}/ui/assets/Home-jSR0MsHI.css +0 -0
  45. {trackplot-0.5.0 → trackplot-0.5.1}/ui/assets/Plot-BmqHZ4QE.css +0 -0
  46. {trackplot-0.5.0 → trackplot-0.5.1}/ui/assets/Plot-Bvyo6ju9.css +0 -0
  47. {trackplot-0.5.0 → trackplot-0.5.1}/ui/assets/Plot-CTM-EDrj.js +0 -0
  48. {trackplot-0.5.0 → trackplot-0.5.1}/ui/assets/Plot-hvkDteAn.js +0 -0
  49. {trackplot-0.5.0 → trackplot-0.5.1}/ui/assets/el-divider-BuEUMHwE.css +0 -0
  50. {trackplot-0.5.0 → trackplot-0.5.1}/ui/assets/el-divider-SYT5K-ds.css +0 -0
  51. {trackplot-0.5.0 → trackplot-0.5.1}/ui/assets/el-divider-VYjL3C7L.js +0 -0
  52. {trackplot-0.5.0 → trackplot-0.5.1}/ui/assets/el-divider-u9f0bZWY.js +0 -0
  53. {trackplot-0.5.0 → trackplot-0.5.1}/ui/assets/index-Cexhr_fn.css +0 -0
  54. {trackplot-0.5.0 → trackplot-0.5.1}/ui/assets/index-CrzyEb9s.js +0 -0
  55. {trackplot-0.5.0 → trackplot-0.5.1}/ui/assets/index-D_Cw0sbX.js +0 -0
  56. {trackplot-0.5.0 → trackplot-0.5.1}/ui/assets/index-Sq2gI4sE.css +0 -0
  57. {trackplot-0.5.0 → trackplot-0.5.1}/ui/index.html +0 -0
  58. {trackplot-0.5.0 → trackplot-0.5.1}/ui/vite.svg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: trackplot
3
- Version: 0.5.0
3
+ Version: 0.5.1
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
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "trackplot"
3
- version = "0.5.0"
3
+ version = "0.5.1"
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"
@@ -30,7 +30,7 @@ logging.getLogger('matplotlib.font_manager').setLevel(logging.ERROR)
30
30
  faulthandler.enable()
31
31
 
32
32
 
33
- __version__ = "0.5.0"
33
+ __version__ = "0.5.1"
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") and os.path.exists(kwargs.get("y_limit")):
1186
- default_y = {}
1187
- with open(kwargs.get("y_limit")) as r:
1188
- for line in r:
1189
- if line.startswith("#"):
1190
- continue
1191
- line = line.split()
1192
-
1193
- if len(line) > 1:
1194
- try:
1195
- default_y[line[0]] = [float(x) for x in default_y[1:]]
1196
- except Exception as err:
1197
- logger.warning(f"The y limit of {line[0]} is invalid: {err}")
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):
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes