Spaces:
Running
on
Zero
Running
on
Zero
Commit
·
f0f3a27
1
Parent(s):
b65f002
feat: clean track names in plot
Browse files- app.py +5 -2
- ntv3_tracks_pipeline.py +9 -9
app.py
CHANGED
|
@@ -648,14 +648,17 @@ def predict(
|
|
| 648 |
if has_bigwigs and bigwig_selected:
|
| 649 |
for tid in bigwig_selected:
|
| 650 |
idx = bw_names.index(tid)
|
| 651 |
-
|
|
|
|
|
|
|
| 652 |
|
| 653 |
# Add BED elements if available and selected
|
| 654 |
if bed_logits is not None and bed_elements:
|
| 655 |
probs = _softmax_last(bed_logits)
|
| 656 |
for ename in bed_elements:
|
|
|
|
| 657 |
eidx = bed_names.index(ename)
|
| 658 |
-
series.append((
|
| 659 |
|
| 660 |
tprint("figure data processed created")
|
| 661 |
|
|
|
|
| 648 |
if has_bigwigs and bigwig_selected:
|
| 649 |
for tid in bigwig_selected:
|
| 650 |
idx = bw_names.index(tid)
|
| 651 |
+
# Use clean display name instead of track ID
|
| 652 |
+
display_name = _get_track_display_name(tid)
|
| 653 |
+
series.append((display_name, bw[:, idx][::stride].astype(float)))
|
| 654 |
|
| 655 |
# Add BED elements if available and selected
|
| 656 |
if bed_logits is not None and bed_elements:
|
| 657 |
probs = _softmax_last(bed_logits)
|
| 658 |
for ename in bed_elements:
|
| 659 |
+
display_name = ename.replace("_", " ")
|
| 660 |
eidx = bed_names.index(ename)
|
| 661 |
+
series.append((display_name, probs[:, eidx, 1][::stride].astype(float)))
|
| 662 |
|
| 663 |
tprint("figure data processed created")
|
| 664 |
|
ntv3_tracks_pipeline.py
CHANGED
|
@@ -86,7 +86,7 @@ ASSEMBLY_TO_API_URL_TEMPLATE = {
|
|
| 86 |
|
| 87 |
# BED element to color mapping (shared between pipeline and app)
|
| 88 |
BED_ELEMENT_COLORS = {
|
| 89 |
-
"
|
| 90 |
"lncRNA": "#2ECC71", # Green
|
| 91 |
"exon": "#9B59B6", # Purple
|
| 92 |
"intron": "#F39C12", # Orange
|
|
@@ -94,18 +94,18 @@ BED_ELEMENT_COLORS = {
|
|
| 94 |
"splice_acceptor": "#E67E22", # Dark orange
|
| 95 |
"CTCF-bound": "#3498DB", # Light blue
|
| 96 |
"polyA_signal": "#95A5A6", # Gray
|
| 97 |
-
"
|
| 98 |
-
"
|
| 99 |
-
"
|
| 100 |
-
"
|
| 101 |
"5UTR+": "#8E44AD", # Dark purple
|
| 102 |
"5UTR-": "#D68910", # Dark orange 2
|
| 103 |
"3UTR+": "#138D75", # Dark teal 2
|
| 104 |
"3UTR-": "#2874A6", # Dark blue
|
| 105 |
-
"
|
| 106 |
-
"
|
| 107 |
-
"
|
| 108 |
-
"
|
| 109 |
"ORF": "#1F618D", # Blue 2
|
| 110 |
}
|
| 111 |
|
|
|
|
| 86 |
|
| 87 |
# BED element to color mapping (shared between pipeline and app)
|
| 88 |
BED_ELEMENT_COLORS = {
|
| 89 |
+
"protein coding gene": "#E74C3C", # Red
|
| 90 |
"lncRNA": "#2ECC71", # Green
|
| 91 |
"exon": "#9B59B6", # Purple
|
| 92 |
"intron": "#F39C12", # Orange
|
|
|
|
| 94 |
"splice_acceptor": "#E67E22", # Dark orange
|
| 95 |
"CTCF-bound": "#3498DB", # Light blue
|
| 96 |
"polyA_signal": "#95A5A6", # Gray
|
| 97 |
+
"enhancer Tissue specific": "#D35400", # Dark red
|
| 98 |
+
"enhancer Tissue invariant": "#16A085", # Dark teal
|
| 99 |
+
"promoter Tissue specific": "#C0392B", # Dark red 2
|
| 100 |
+
"promoter Tissue invariant": "#27AE60", # Dark green
|
| 101 |
"5UTR+": "#8E44AD", # Dark purple
|
| 102 |
"5UTR-": "#D68910", # Dark orange 2
|
| 103 |
"3UTR+": "#138D75", # Dark teal 2
|
| 104 |
"3UTR-": "#2874A6", # Dark blue
|
| 105 |
+
"skipped exon": "#7D3C98", # Purple 2
|
| 106 |
+
"always on exon": "#A93226", # Red 2
|
| 107 |
+
"start codon": "#196F3D", # Green 2
|
| 108 |
+
"stop codon": "#B9770E", # Brown
|
| 109 |
"ORF": "#1F618D", # Blue 2
|
| 110 |
}
|
| 111 |
|