Skip to content

Commit

Permalink
update to v0.3.8 to fix adjustText usage
Browse files Browse the repository at this point in the history
  • Loading branch information
ygidtu committed May 29, 2024
1 parent c6feefc commit 4cfee59
Show file tree
Hide file tree
Showing 9 changed files with 144 additions and 140 deletions.
2 changes: 1 addition & 1 deletion AppImageBuilder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ AppDir:
app_info:
id: org.appimage-crafters.trackplot
name: trackplot
version: 0.3.7
version: 0.3.8
# Set the python executable as entry point
exec: "bin/python3"
# Set the application main script path as argument. Use '$@' to forward CLI parameters
Expand Down
114 changes: 57 additions & 57 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,67 +4,67 @@ verify_ssl = false
name = "pip_conf_index_global"

[packages]
adjusttext = "==0.7.3"
asciitree = "==0.3.3"
blinker = "==1.7.0"
blosc2 = "==2.0.0"
cairocffi = "==1.6.1"
certifi = "==2023.11.17"
cffi = "==1.16.0"
charset-normalizer = "==3.3.2"
click-option-group = "==0.5.6"
click = "==8.1.7"
colorama = "==0.4.6"
contourpy = "==1.1.1"
cooler = "==0.9.3"
cycler = "==0.12.1"
cython = "==3.0.5"
cytoolz = "==0.12.2"
dill = "==0.3.7"
filetype = "==1.2.0"
flask = "==2.3.3"
fonttools = "==4.45.1"
h5py = "==3.10.0"
hicmatrix = "==15"
adjusttext = ">=0.7.3"
asciitree = ">=0.3.3"
blinker = ">=1.7.0"
blosc2 = ">=2.0.0"
cairocffi = ">=1.6.1"
certifi = ">=2023.11.17"
cffi = ">=1.16.0"
charset-normalizer = ">=3.3.2"
click-option-group = ">=0.5.6"
click = ">=8.1.7"
colorama = ">=0.4.6"
contourpy = ">=1.1.1"
cooler = ">=0.9.3"
cycler = ">=0.12.1"
cython = ">=3.0.5"
cytoolz = ">=0.12.2"
dill = ">=0.3.7"
filetype = ">=1.2.0"
flask = ">=2.3.3"
fonttools = ">=4.45.1"
h5py = ">=3.10.0"
hicmatrix = ">=15"
idna = "*"
importlib-metadata = "==6.8.0"
importlib-resources = "==6.1.1"
intervaltree = "==3.1.0"
itsdangerous = "==2.1.2"
importlib-metadata = ">=6.8.0"
importlib-resources = ">=6.1.1"
intervaltree = ">=3.1.0"
itsdangerous = ">=2.1.2"
jinja2 = "*"
kiwisolver = "==1.4.5"
loguru = "==0.6.0"
markupsafe = "==2.1.3"
matplotlib = "==3.7.4"
msgpack = "==1.0.7"
multiprocess = "==0.70.15"
numexpr = "==2.8.6"
numpy = "==1.24.4"
packaging = "==23.2"
pandas = "==1.5.3"
kiwisolver = ">=1.4.5"
loguru = ">=0.6.0"
markupsafe = ">=2.1.3"
matplotlib = ">=3.7.4"
msgpack = ">=1.0.7"
multiprocess = ">=0.70.15"
numexpr = ">=2.8.6"
numpy = ">=1.24.4"
packaging = ">=23.2"
pandas = ">=1.5.3"
pillow = "*"
py-cpuinfo = "==9.0.0"
pybigwig = "==0.3.22"
pycparser = "==2.21"
pyfaidx = "==0.7.2.2"
pyparsing = "==3.1.1"
pysam = "==0.21.0"
python-dateutil = "==2.8.2"
pytz = "==2023.3.post1"
pyyaml = "==6.0.1"
requests = "==2.31.0"
scipy = "==1.10.1"
seaborn = "==0.12.2"
simplejson = "==3.19.2"
six = "==1.16.0"
sortedcontainers = "==2.4.0"
tables = "==3.8.0"
toolz = "==0.12.0"
urllib3 = "==2.1.0"
py-cpuinfo = ">=9.0.0"
pybigwig = ">=0.3.22"
pycparser = ">=2.21"
pyfaidx = ">=0.7.2.2"
pyparsing = ">=3.1.1"
pysam = ">=0.21.0"
python-dateutil = ">=2.8.2"
pytz = ">=2023.3.post1"
pyyaml = ">=6.0.1"
requests = ">=2.32.0"
scipy = ">=1.10.1"
seaborn = ">=0.12.2"
simplejson = ">=3.19.2"
six = ">=1.16.0"
sortedcontainers = ">=2.4.0"
tables = ">=3.8.0"
toolz = ">=0.12.0"
urllib3 = ">=2.1.0"
werkzeug = "*"
win32-setctime = "==1.1.0"
xmltodict = "==0.13.0"
zipp = "==3.17.0"
win32-setctime = ">=1.1.0"
xmltodict = ">=0.13.0"
zipp = ">=3.17.0"

[dev-packages]

Expand Down
1 change: 0 additions & 1 deletion example/density_list.tsv
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,3 @@ example/bams/3.bam bam 3bam blue
example/bams/sc.bam bam sc red frf 1000000
example/bams/sc.bam bam sc1 blue frf 1000000
example/depth.bgz depth depth
example/bedgraph/ENCFF260QGF_lung_filter.bedgraph.gz bedgraph bedgraph
135 changes: 67 additions & 68 deletions poetry.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "trackplot"
version = "0.3.7"
version = "0.3.8"
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/"
authors = ["ygidtu <[email protected]>"]
license = "BSD-3"
Expand Down
12 changes: 6 additions & 6 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
adjusttext==0.7.3 ; python_version >= "3.8" and python_version < "3.12"
asciitree==0.3.3 ; python_version >= "3.8" and python_version < "3.12"
blinker==1.8.1 ; python_version >= "3.8" and python_version < "3.12"
blinker==1.8.2 ; python_version >= "3.8" and python_version < "3.12"
blosc2==2.0.0 ; python_version >= "3.8" and python_version < "3.12"
cairocffi==1.7.0 ; python_version >= "3.8" and python_version < "3.12"
certifi==2024.2.2 ; python_version >= "3.8" and python_version < "3.12"
Expand All @@ -10,14 +10,14 @@ click-option-group==0.5.6 ; python_version >= "3.8" and python_version < "3.12"
click==8.1.7 ; python_version >= "3.8" and python_version < "3.12"
colorama==0.4.6 ; python_version >= "3.8" and python_version < "3.12" and (platform_system == "Windows" or sys_platform == "win32")
contourpy==1.1.1 ; python_version >= "3.8" and python_version < "3.12"
cooler==0.9.3 ; python_version >= "3.8" and python_version < "3.12"
cooler==0.10.0 ; python_version >= "3.8" and python_version < "3.12"
cycler==0.12.1 ; python_version >= "3.8" and python_version < "3.12"
cython==3.0.10 ; python_version >= "3.8" and python_version < "3.12"
cytoolz==0.12.3 ; python_version >= "3.8" and python_version < "3.12"
dill==0.3.8 ; python_version >= "3.8" and python_version < "3.12"
filetype==1.2.0 ; python_version >= "3.8" and python_version < "3.12"
flask==2.3.3 ; python_version >= "3.8" and python_version < "3.12"
fonttools==4.51.0 ; python_version >= "3.8" and python_version < "3.12"
fonttools==4.52.4 ; python_version >= "3.8" and python_version < "3.12"
h5py==3.11.0 ; python_version >= "3.8" and python_version < "3.12"
hicmatrix==15 ; python_version >= "3.8" and python_version < "3.12"
idna==3.7 ; python_version >= "3.8" and python_version < "3.12"
Expand Down Expand Up @@ -46,10 +46,10 @@ pysam==0.21.0 ; python_version >= "3.8" and python_version < "3.12"
python-dateutil==2.9.0.post0 ; python_version >= "3.8" and python_version < "3.12"
pytz==2024.1 ; python_version >= "3.8" and python_version < "3.12"
pyyaml==6.0.1 ; python_version >= "3.8" and python_version < "3.12"
requests==2.31.0 ; python_version >= "3.8" and python_version < "3.12"
requests==2.32.2 ; python_version >= "3.8" and python_version < "3.12"
scipy==1.10.1 ; python_version >= "3.8" and python_version < "3.12"
seaborn==0.12.2 ; python_version >= "3.8" and python_version < "3.12"
setuptools==69.5.1 ; python_version >= "3.8" and python_version < "3.12"
setuptools==70.0.0 ; python_version >= "3.8" and python_version < "3.12"
simplejson==3.19.2 ; python_version >= "3.8" and python_version < "3.12"
six==1.16.0 ; python_version >= "3.8" and python_version < "3.12"
sortedcontainers==2.4.0 ; python_version >= "3.8" and python_version < "3.12"
Expand All @@ -59,4 +59,4 @@ urllib3==2.2.1 ; python_version >= "3.8" and python_version < "3.12"
werkzeug==3.0.3 ; python_version >= "3.8" and python_version < "3.12"
win32-setctime==1.1.0 ; python_version >= "3.8" and python_version < "3.12" and sys_platform == "win32"
xmltodict==0.13.0 ; python_version >= "3.8" and python_version < "3.12"
zipp==3.18.1 ; python_version >= "3.8" and python_version < "3.12"
zipp==3.19.0 ; python_version >= "3.8" and python_version < "3.12"
10 changes: 7 additions & 3 deletions trackplot/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
faulthandler.enable()


__version__ = "0.3.7"
__version__ = "0.3.8"
__author__ = "ygidtu & Ran Zhou"
__email__ = "[email protected]"

Expand Down Expand Up @@ -1210,6 +1210,11 @@ def plot(self,
if p.type == "density":
if isinstance(p.obj[0], Depth):
for key, readDepth in p.obj[0].data.items():
temp_params = self.params.get(p, {})

if "y_label" not in temp_params:
temp_params["y_label"] = key

plot_density(
ax=ax_var,
data=readDepth,
Expand All @@ -1220,8 +1225,7 @@ def plot(self,
distance_between_label_axis=distance_between_label_axis,
raster=raster,
fill_step=fill_step,
y_label=key,
**self.params.get(p, {})
**temp_params
)
curr_idx += 1
ax_var = plt.subplot(gs[curr_idx, 0])
Expand Down
6 changes: 4 additions & 2 deletions trackplot/plot_func.py
Original file line number Diff line number Diff line change
Expand Up @@ -807,8 +807,7 @@ def plot_density(
jxn_numbers.append(t)

try:
adjust_text(jxn_numbers, force_text=0.2, arrowprops=dict(arrowstyle="-", color='black', lw=1),
autoalign="y")
adjust_text(jxn_numbers, force_text=(0.2, 0.2), arrowprops=dict(arrowstyle="-", color='black', lw=1))
except IndexError as err:
logger.debug(err)

Expand Down Expand Up @@ -1366,6 +1365,9 @@ def plot_motif(ax: mpl.axes.Axes,
graph_coords = init_graph_coords(region)

# 在原始坐标轴上画motif
if not data:
logger.info("there is no any motif information to plot")
return
ymin, ymax, xmin, xmax = 0, 0, \
graph_coords[min(data.keys()) - region.start], \
graph_coords[max(data.keys()) - region.start] + (1 + width) / 2
Expand Down
2 changes: 1 addition & 1 deletion web/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "trackplot",
"private": true,
"version": "0.3.7",
"version": "0.3.8",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down

0 comments on commit 4cfee59

Please sign in to comment.