Skip to content

Commit 2a918b9

Browse files
committed
fix unexpected exon_id issue with gtf file.
1 parent f6dc00f commit 2a918b9

9 files changed

Lines changed: 19 additions & 6 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.3.4
14+
version: 0.3.5
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

example/density_list.tsv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ example/bams/3.bam bam 3bam blue
66
example/bams/sc.bam bam sc red frf 1000000
77
example/bams/sc.bam bam sc1 blue frf 1000000
88
example/depth.bgz depth depth
9+
example/bedgraph/ENCFF260QGF_lung_filter.bedgraph.gz bedgraph bedgraph

example/example.png

-91.4 KB
Loading

example/example.sorted.gtf.gz

377 KB
Binary file not shown.

example/heatmap_list.tsv

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@ example/bws/1.bw bw bw YlOrBr
88
example/bws/2.bw bw bw YlOrBr
99
example/bws/3.bw bw bw YlOrBr
1010
example/bws/4.bw bw bw YlOrBr
11-
example/bws/0.bw bw bw YlOrBr
11+
example/bws/0.bw bw bw YlOrBr
12+
example/bedgraph/ENCFF260QGF_lung_filter.bedgraph.gz bedgraph bedgraph

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "trackplot"
3-
version = "0.3.4"
3+
version = "0.3.5"
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"

trackplot/file/Annotation.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,12 +385,23 @@ def __load_gtf__(self):
385385
if rec.transcript_id not in exons.keys():
386386
exons[rec.transcript_id] = []
387387

388+
# fix exon_id error
389+
exon_id = ""
390+
if "exon_id" in rec.keys():
391+
exon_id = rec.exon_id
392+
elif "ID" in rec.keys():
393+
exon_id = rec["ID"]
394+
elif "id" in rec.keys():
395+
exon_id = rec["id"]
396+
elif "_id" in rec.keys():
397+
exon_id = rec["_id"]
398+
388399
exons[rec.transcript_id].append(
389400
GenomicLoci(
390401
chromosome=rec.contig,
391402
start=start, end=end,
392403
strand=rec.strand,
393-
name=rec.exon_id
404+
name=exon_id
394405
)
395406
)
396407

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.3.4"
33+
__version__ = "0.3.5"
3434
__author__ = "ygidtu & Ran Zhou"
3535
__email__ = "ygidtu@gmail.com"
3636

web/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "trackplot",
33
"private": true,
4-
"version": "0.3.4",
4+
"version": "0.3.5",
55
"type": "module",
66
"scripts": {
77
"dev": "vite",

0 commit comments

Comments
 (0)