Skip to content

Commit f871fa8

Browse files
committed
fix transcript_id and transcript_name issues
1 parent 936eee9 commit f871fa8

9 files changed

Lines changed: 567 additions & 271 deletions

File tree

AppImageBuilder.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ AppDir:
1111
app_info:
1212
id: org.appimage-crafters.trackplot
1313
name: trackplot
14-
version: 0.5.1
14+
version: 0.5.2
1515
# Set the python executable as entry point
1616
exec: "bin/python3"
1717
# Set the application main script path as argument. Use '$@' to forward CLI parameters

pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "trackplot"
3-
version = "0.5.1"
3+
version = "0.5.2"
44
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/"
55
authors = ["ygidtu <ygidtu@gmail.com>"]
66
license = "BSD-3"
@@ -23,9 +23,9 @@ hicmatrix = "^17"
2323
loguru = "^0.6.0"
2424
matplotlib = "^3.6.3"
2525
numpy = "^1.24.1"
26-
pandas = { version = "^1.5.3", allow-prereleases = true }
26+
pandas = "^1.5.3"
2727
pybigwig = "^0.3.18"
28-
pysam = { version = "^0.21.0", allow-prereleases = true }
28+
pysam = "^0.21.0"
2929
requests = "^2.28.2"
3030
scipy = "^1.10.0"
3131
seaborn = "^0.12.2"

trackplot/cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import os
99
import sys
1010
from multiprocessing import cpu_count
11-
from typing import Optional, Dict, Set, Tuple
11+
from typing import Optional
1212

1313
import click
1414
from click_option_group import optgroup

trackplot/file/Bam.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,7 @@ def load(self,
161161
spanned_junctions = kwargs.get("junctions", {})
162162
included_junctions = kwargs.get("included_junctions", {})
163163
remove_duplicate_umi = kwargs.get("remove_duplicate_umi", False)
164-
spanned_junctions_plus = dict()
165-
spanned_junctions_minus = dict()
164+
spanned_junctions_plus, spanned_junctions_minus = {}, {}
166165
plus, minus = np.zeros(len(region), dtype=np.int32), np.zeros(len(region), dtype=np.int32)
167166
site_plus, site_minus = np.zeros(len(region), dtype=np.int32), np.zeros(len(region), dtype=np.int32)
168167

trackplot/plot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
faulthandler.enable()
3131

3232

33-
__version__ = "0.5.1"
33+
__version__ = "0.5.2"
3434
__author__ = "ygidtu & Ran Zhou"
3535
__email__ = "ygidtu@gmail.com"
3636

trackplot/plot_func.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,13 @@ def plot_annotation(
436436
for transcript in data:
437437
strand = transcript.strand
438438
# @2018.12.20 add transcript id, based on fixed coordinates
439-
if transcript.transcript:
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+
440446
if show_gene and transcript.gene and transcript.gene_id != transcript.transcript_id:
441447
if show_id:
442448
ax.text(x=-.01 * max(graph_coords), y=y_loc + 0.25,
@@ -445,9 +451,11 @@ def plot_annotation(
445451
s=transcript.transcript_id, fontsize=font_size, ha="right")
446452
else:
447453
ax.text(x=-.01 * max(graph_coords), y=y_loc,
448-
s=transcript.gene + " | " + transcript.transcript, fontsize=font_size, ha="right")
454+
s=transcript.gene + " | " + show_text, fontsize=font_size, ha="right")
449455
else:
450-
ax.text(x=-1, y=y_loc - 0.1, s=transcript.transcript, fontsize=font_size, ha="right")
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")
451459

452460
# @2018.12.19
453461
# s and e is the start and end site of single exon

web/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "trackplot",
33
"private": true,
4-
"version": "0.5.1",
4+
"version": "0.5.2",
55
"type": "module",
66
"scripts": {
77
"dev": "vite",
@@ -22,9 +22,9 @@
2222
"vue-router": "^4.5.0"
2323
},
2424
"devDependencies": {
25-
"@vitejs/plugin-vue": "^3.2.0",
25+
"@vitejs/plugin-vue": "^5.2.1",
2626
"unplugin-auto-import": "^0.11.5",
2727
"unplugin-vue-components": "^0.22.12",
28-
"vite": "^3.2.11"
28+
"vite": "^6.0.11"
2929
}
3030
}

0 commit comments

Comments
 (0)