You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: alldata/bblab_site/tools/isoforms_plot/index.html
+60-5Lines changed: 60 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -150,6 +150,7 @@
150
150
padding:40px;
151
151
text-align: center;
152
152
transition: all 0.3s ease;
153
+
cursor: pointer;
153
154
}
154
155
155
156
.upload-section:hover {
@@ -474,7 +475,7 @@ <h3>Transcripts</h3>
474
475
</p>
475
476
476
477
<p>
477
-
Three optional fields control how transcripts appear: <code>label</code>, <code>group</code>, and <code>comment</code>. The <code>label</code> appears at the right side above the transcript (typically a gene or isoform name). The <code>group</code> field clusters related transcripts visually—transcripts sharing the same group name are drawn as a block, marked by a vertical line on the left edge of the plot. The <code>comment</code> appears on the right side of the transcript (commonly used for read counts or sample metadata).
478
+
Three optional fields control how transcripts appear: <code>label</code>, <code>group</code>, and <code>N_observed</code>. The <code>label</code> appears at the right side above the transcript (typically a gene or isoform name). The <code>group</code> field clusters related transcripts visually—transcripts sharing the same group name are drawn as a block, marked by a vertical line on the left edge of the plot. The <code>N_observed</code> appears on the right side of the transcript (commonly used for read counts or sample metadata).
Lexer handles encodings, line endings, and other low-level details of reading the CSV file, providing a clean interface for the parser to work with text lines regardless of the original file's format.
3
+
"""
4
+
5
+
fromioimportStringIO
6
+
frompathlibimportPath
7
+
fromtypingimportBinaryIO, TextIO
8
+
frommulticsvimportMultiCSVFile
9
+
importmulticsv
10
+
11
+
12
+
defdecode_bytes(content: bytes) ->str:
13
+
"""Try to decode bytes using multiple common encodings."""
14
+
# Try common encodings in order of likelihood, starting with those that can fail
15
+
# (so we detect them properly) and ending with latin-1 which accepts all bytes
16
+
encodings= [
17
+
"utf-8-sig", # UTF-8 with BOM (Excel, modern tools)
18
+
"utf-8", # UTF-8 without BOM (most common)
19
+
"cp1252", # Windows Western European (common in Excel exports)
20
+
"iso-8859-1", # Latin-1 / ISO 8859-1 (Western European)
21
+
"cp1250", # Windows Central European
22
+
"latin-1", # ISO 8859-1 alias (accepts all byte sequences as fallback)
23
+
]
24
+
25
+
forencinencodings:
26
+
try:
27
+
returncontent.decode(enc)
28
+
except (UnicodeDecodeError, LookupError) aserr:
29
+
last=err
30
+
continue
31
+
32
+
# If all encodings fail, raise an error
33
+
raiselast
34
+
35
+
36
+
defnormalize_line_endings(content: str) ->str:
37
+
"""Normalize line endings to Unix-style (\\n).
38
+
39
+
Handles:
40
+
- Windows (\\r\\n) -> \\n
41
+
- Old Mac (\\r) -> \\n
42
+
- Unix (\\n) -> \\n (unchanged)
43
+
"""
44
+
# Replace CRLF with LF first, then any remaining CR with LF
0 commit comments