Skip to content

Commit b46af05

Browse files
committed
Remove START_POS
1 parent b4fd295 commit b46af05

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

  • alldata/bblab_site/tools/isoforms_plot/isoforms_plot

alldata/bblab_site/tools/isoforms_plot/isoforms_plot/plotter.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
DOTTED_LINES_WIDTH = 1
1111

12-
START_POS = 638
1312
END_POS = 9632
1413
XOFFSET = 400
1514
CANVAS_WIDTH = 900
@@ -67,7 +66,7 @@ def add_genome_overview(figure, landmarks, height=12, xoffset=XOFFSET):
6766
Draw a simple overview of the reference (NL43) using the provided
6867
landmarks list. Each landmark should be a dict with 'start', 'end', 'name'
6968
and optionally 'colour' and 'frame'. Coordinates are assumed to be in the
70-
same reference coordinate system as START_POS/END_POS; this function adds
69+
same reference coordinate system as 1/END_POS; this function adds
7170
XOFFSET so the overview lines up with the main plot.
7271
"""
7372

@@ -239,8 +238,7 @@ class SplicingSites:
239238
"""
240239
def __init__(self, splicing_sites, total_height, total_samples=0, lineheight=5, h=60):
241240
self.splicing_sites = splicing_sites
242-
self.start = min(START_POS, min(site.start for site in splicing_sites))
243-
self.a = self.start + XOFFSET
241+
self.a = XOFFSET
244242
self.b = END_POS + XOFFSET
245243
self.w = self.b - self.a
246244
self.h = h # height of the component (increased for multi-level labels)
@@ -695,10 +693,10 @@ def plot(transcripts, groups, splicing_sites, title=None) -> draw.Drawing:
695693
# add a small blank multitrack to create vertical separation between the splicing sites
696694
# and the sample tracks (gap value tuned to avoid overlap with multi-level labels)
697695
try:
698-
figure.add(Multitrack([Track(START_POS + XOFFSET, START_POS + XOFFSET, color='#ffffff', h=2)]), gap=25)
696+
figure.add(Multitrack([Track(XOFFSET, XOFFSET, color='#ffffff', h=2)]), gap=25)
699697
except TypeError:
700698
# fallback if Track signature differs; attempt without named color
701-
figure.add(Multitrack([Track(START_POS + XOFFSET, START_POS + XOFFSET, color='#ffffff', h=2)]), gap=25)
699+
figure.add(Multitrack([Track(XOFFSET, XOFFSET, color='#ffffff', h=2)]), gap=25)
702700

703701
# Add all pre-created group components to the figure
704702
for group_component in group_components:

0 commit comments

Comments
 (0)