genome-spy-python 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- genome_spy/__init__.py +199 -0
- genome_spy/_chart_authoring.py +231 -0
- genome_spy/_conditions.py +72 -0
- genome_spy/_embed.py +87 -0
- genome_spy/_expressions.py +271 -0
- genome_spy/_parameters.py +267 -0
- genome_spy/_render.py +207 -0
- genome_spy/_utils.py +75 -0
- genome_spy/_widget.py +262 -0
- genome_spy/api.py +198 -0
- genome_spy/arrow.py +155 -0
- genome_spy/channels.py +193 -0
- genome_spy/chart.py +1240 -0
- genome_spy/data.py +56 -0
- genome_spy/data_transformers.py +267 -0
- genome_spy/datasets/__init__.py +189 -0
- genome_spy/datasets/_airway.py +219 -0
- genome_spy/datasets/_annotations.py +37 -0
- genome_spy/datasets/_gistic.py +43 -0
- genome_spy/datasets/_grammar.py +66 -0
- genome_spy/datasets/_hapmap.py +180 -0
- genome_spy/datasets/_mutation.py +289 -0
- genome_spy/datasets/_oncoprint.py +523 -0
- genome_spy/datasets/data/airway_metadata.csv +9 -0
- genome_spy/datasets/data/airway_scaledcounts.csv +38695 -0
- genome_spy/datasets/data/brca.maf.gz +0 -0
- genome_spy/datasets/data/hapmap_gwas.csv +14413 -0
- genome_spy/datasets/data/mutation_impact_reference.json +27 -0
- genome_spy/datasets/data/oncoprint_dataset3.json +266 -0
- genome_spy/datasets/data/p53_sequence_comparison.json.gz +0 -0
- genome_spy/datasets/data/pik3ca_mutations.json +1 -0
- genome_spy/datasets/data/pik3ca_tcga_brca_lollipop.json +38 -0
- genome_spy/datasets/data/refseq_gene_bodies.csv.gz +0 -0
- genome_spy/datasets/data/tal1_alphagenome_reference.json.gz +0 -0
- genome_spy/datasets/data/tcga.tsv +146 -0
- genome_spy/datasets/data/tcga_laml.maf.gz +0 -0
- genome_spy/datasets/data/tcga_laml_annot.tsv +201 -0
- genome_spy/datasets/data/tcga_laml_combined_oncoplot.json.gz +0 -0
- genome_spy/datasets/data/tcga_ov_gistic_lesions.tsv.gz +0 -0
- genome_spy/datasets/data/tcga_ov_gistic_scores.tsv.gz +0 -0
- genome_spy/helpers.py +185 -0
- genome_spy/jupyter.py +5 -0
- genome_spy/py.typed +0 -0
- genome_spy/schema/__init__.py +784 -0
- genome_spy/schema/_kwds.py +1394 -0
- genome_spy/schema/_typing.py +186 -0
- genome_spy/schema/capabilities.json +593 -0
- genome_spy/schema/channels.py +8943 -0
- genome_spy/schema/composition.py +1064 -0
- genome_spy/schema/core.py +51821 -0
- genome_spy/schema/ergonomics.py +2056 -0
- genome_spy/schema/expressions.py +476 -0
- genome_spy/schema/genome-spy-schema.json +33657 -0
- genome_spy/schema/lazy.py +326 -0
- genome_spy/schema/mixins.py +11684 -0
- genome_spy/schemapi.py +264 -0
- genome_spy/static/widget.js +345 -0
- genome_spy_python-0.1.0.dist-info/METADATA +185 -0
- genome_spy_python-0.1.0.dist-info/RECORD +64 -0
- genome_spy_python-0.1.0.dist-info/WHEEL +4 -0
- genome_spy_python-0.1.0.dist-info/licenses/LICENSE +21 -0
- genome_spy_python-0.1.0.dist-info/licenses/LICENSES/ALTAIR-BSD-3-Clause.txt +27 -0
- genome_spy_python-0.1.0.dist-info/licenses/LICENSES/GALLERY-DATA-MIT.txt +22 -0
- genome_spy_python-0.1.0.dist-info/licenses/THIRD_PARTY_NOTICES.md +42 -0
|
@@ -0,0 +1,326 @@
|
|
|
1
|
+
"""Generated from the GenomeSpy JSON Schema. Do not edit by hand."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from collections.abc import Sequence
|
|
5
|
+
from typing import Any, cast, Literal
|
|
6
|
+
|
|
7
|
+
from genome_spy.schema._typing import PrimaryPositionalChannel_T
|
|
8
|
+
from genome_spy.schema._kwds import ParseKwds
|
|
9
|
+
from genome_spy.schemapi import Undefined, UndefinedType
|
|
10
|
+
from genome_spy.schema import core
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class LazyDataMethodMixin:
|
|
14
|
+
"""Schema-derived named lazy data-source helpers."""
|
|
15
|
+
|
|
16
|
+
def bam(
|
|
17
|
+
self,
|
|
18
|
+
url: str | core.ExprRef | dict[str, Any] | core.UrlTemplate,
|
|
19
|
+
/,
|
|
20
|
+
*,
|
|
21
|
+
channel: PrimaryPositionalChannel_T | UndefinedType = Undefined,
|
|
22
|
+
debounce: float | core.ExprRef | dict[str, Any] | UndefinedType = Undefined,
|
|
23
|
+
debounceDomainChange: float
|
|
24
|
+
| core.ExprRef
|
|
25
|
+
| dict[str, Any]
|
|
26
|
+
| UndefinedType = Undefined,
|
|
27
|
+
debounceMode: Literal["domain", "window"] | UndefinedType = Undefined,
|
|
28
|
+
indexUrl: str
|
|
29
|
+
| core.ExprRef
|
|
30
|
+
| dict[str, Any]
|
|
31
|
+
| core.IndexUrlTemplate
|
|
32
|
+
| UndefinedType = Undefined,
|
|
33
|
+
windowSize: float | core.ExprRef | dict[str, Any] | UndefinedType = Undefined,
|
|
34
|
+
) -> core.Data:
|
|
35
|
+
"""Create a lazy ``bam`` data source.
|
|
36
|
+
|
|
37
|
+
Args:
|
|
38
|
+
channel (PrimaryPositionalChannel_T): Which channel's scale domain to monitor. __Default value:__ ``"x"``
|
|
39
|
+
debounce (float | ExprRef | dict[str, Any]): Debounce time for data updates, in milliseconds. Debouncing prevents excessive data updates when the user is zooming or panning around. __Default value:__ ``200``
|
|
40
|
+
debounceDomainChange (float | ExprRef | dict[str, Any]): Debounce time for scale-domain driven data updates, in milliseconds. __Default value:__ ``200``
|
|
41
|
+
debounceMode (Literal['domain', 'window']): The debounce mode for data updates. If set to ``"domain"``, domain change events (panning and zooming) will be debounced. If set to ``"window"``, the data fetches initiated by the changes to the visible window (or tile) will be debounced. If your data is small, the ``"window"`` is better as it will start fetching data while the user is still panning around, resulting in a shorter perceived latency. __Default value:__ ``"window"``
|
|
42
|
+
indexUrl (str | ExprRef | dict[str, Any] | IndexUrlTemplate): URL of the index file. When ``url`` is a template, this can be an index URL template using the same placeholder and values. __Default value:__ ``url`` + ``".bai"``.
|
|
43
|
+
windowSize (float | ExprRef | dict[str, Any]): Size of each chunk when fetching the BAM file. Data is only fetched when the length of the visible domain smaller than the window size. __Default value:__ ``10000``
|
|
44
|
+
"""
|
|
45
|
+
properties = {
|
|
46
|
+
"channel": channel,
|
|
47
|
+
"debounce": debounce,
|
|
48
|
+
"debounceDomainChange": debounceDomainChange,
|
|
49
|
+
"debounceMode": debounceMode,
|
|
50
|
+
"indexUrl": indexUrl,
|
|
51
|
+
"windowSize": windowSize,
|
|
52
|
+
}
|
|
53
|
+
defined: dict[str, Any] = {
|
|
54
|
+
key: value for key, value in properties.items() if value is not Undefined
|
|
55
|
+
}
|
|
56
|
+
return core.Data(
|
|
57
|
+
lazy=core.LazyDataParams(type=cast(Any, "bam"), url=url, **defined)
|
|
58
|
+
)
|
|
59
|
+
|
|
60
|
+
def bigbed(
|
|
61
|
+
self,
|
|
62
|
+
url: str | Sequence[str] | core.ExprRef | dict[str, Any] | core.UrlTemplate,
|
|
63
|
+
/,
|
|
64
|
+
*,
|
|
65
|
+
channel: PrimaryPositionalChannel_T | UndefinedType = Undefined,
|
|
66
|
+
debounce: float | core.ExprRef | dict[str, Any] | UndefinedType = Undefined,
|
|
67
|
+
debounceDomainChange: float
|
|
68
|
+
| core.ExprRef
|
|
69
|
+
| dict[str, Any]
|
|
70
|
+
| UndefinedType = Undefined,
|
|
71
|
+
debounceMode: Literal["domain", "window"] | UndefinedType = Undefined,
|
|
72
|
+
windowSize: float | core.ExprRef | dict[str, Any] | UndefinedType = Undefined,
|
|
73
|
+
) -> core.Data:
|
|
74
|
+
"""Create a lazy ``bigbed`` data source.
|
|
75
|
+
|
|
76
|
+
Args:
|
|
77
|
+
channel (PrimaryPositionalChannel_T): Which channel's scale domain to monitor. __Default value:__ ``"x"``
|
|
78
|
+
debounce (float | ExprRef | dict[str, Any]): Debounce time for data updates, in milliseconds. Debouncing prevents excessive data updates when the user is zooming or panning around. __Default value:__ ``200``
|
|
79
|
+
debounceDomainChange (float | ExprRef | dict[str, Any]): Debounce time for scale-domain driven data updates, in milliseconds. __Default value:__ ``200``
|
|
80
|
+
debounceMode (Literal['domain', 'window']): The debounce mode for data updates. If set to ``"domain"``, domain change events (panning and zooming) will be debounced. If set to ``"window"``, the data fetches initiated by the changes to the visible window (or tile) will be debounced. If your data is small, the ``"window"`` is better as it will start fetching data while the user is still panning around, resulting in a shorter perceived latency. __Default value:__ ``"window"``
|
|
81
|
+
windowSize (float | ExprRef | dict[str, Any]): Size of each chunk when fetching the BigBed file. Data is only fetched when the length of the visible domain smaller than the window size. __Default value:__ ``1000000``
|
|
82
|
+
"""
|
|
83
|
+
properties = {
|
|
84
|
+
"channel": channel,
|
|
85
|
+
"debounce": debounce,
|
|
86
|
+
"debounceDomainChange": debounceDomainChange,
|
|
87
|
+
"debounceMode": debounceMode,
|
|
88
|
+
"windowSize": windowSize,
|
|
89
|
+
}
|
|
90
|
+
defined: dict[str, Any] = {
|
|
91
|
+
key: value for key, value in properties.items() if value is not Undefined
|
|
92
|
+
}
|
|
93
|
+
return core.Data(
|
|
94
|
+
lazy=core.LazyDataParams(type=cast(Any, "bigbed"), url=url, **defined)
|
|
95
|
+
)
|
|
96
|
+
|
|
97
|
+
def bigwig(
|
|
98
|
+
self,
|
|
99
|
+
url: str | Sequence[str] | core.ExprRef | dict[str, Any] | core.UrlTemplate,
|
|
100
|
+
/,
|
|
101
|
+
*,
|
|
102
|
+
channel: PrimaryPositionalChannel_T | UndefinedType = Undefined,
|
|
103
|
+
debounce: float | core.ExprRef | dict[str, Any] | UndefinedType = Undefined,
|
|
104
|
+
debounceDomainChange: float
|
|
105
|
+
| core.ExprRef
|
|
106
|
+
| dict[str, Any]
|
|
107
|
+
| UndefinedType = Undefined,
|
|
108
|
+
debounceMode: Literal["domain", "window"] | UndefinedType = Undefined,
|
|
109
|
+
pixelsPerBin: float | core.ExprRef | dict[str, Any] | UndefinedType = Undefined,
|
|
110
|
+
) -> core.Data:
|
|
111
|
+
"""Create a lazy ``bigwig`` data source.
|
|
112
|
+
|
|
113
|
+
Args:
|
|
114
|
+
channel (PrimaryPositionalChannel_T): Which channel's scale domain to monitor. __Default value:__ ``"x"``
|
|
115
|
+
debounce (float | ExprRef | dict[str, Any]): Debounce time for data updates, in milliseconds. Debouncing prevents excessive data updates when the user is zooming or panning around. __Default value:__ ``200``
|
|
116
|
+
debounceDomainChange (float | ExprRef | dict[str, Any]): Debounce time for scale-domain driven data updates, in milliseconds. __Default value:__ ``200``
|
|
117
|
+
debounceMode (Literal['domain', 'window']): The debounce mode for data updates. If set to ``"domain"``, domain change events (panning and zooming) will be debounced. If set to ``"window"``, the data fetches initiated by the changes to the visible window (or tile) will be debounced. If your data is small, the ``"window"`` is better as it will start fetching data while the user is still panning around, resulting in a shorter perceived latency. __Default value:__ ``"window"``
|
|
118
|
+
pixelsPerBin (float | ExprRef | dict[str, Any]): The approximate minimum width of each data bin, in pixels. __Default value:__ ``2``
|
|
119
|
+
"""
|
|
120
|
+
properties = {
|
|
121
|
+
"channel": channel,
|
|
122
|
+
"debounce": debounce,
|
|
123
|
+
"debounceDomainChange": debounceDomainChange,
|
|
124
|
+
"debounceMode": debounceMode,
|
|
125
|
+
"pixelsPerBin": pixelsPerBin,
|
|
126
|
+
}
|
|
127
|
+
defined: dict[str, Any] = {
|
|
128
|
+
key: value for key, value in properties.items() if value is not Undefined
|
|
129
|
+
}
|
|
130
|
+
return core.Data(
|
|
131
|
+
lazy=core.LazyDataParams(type=cast(Any, "bigwig"), url=url, **defined)
|
|
132
|
+
)
|
|
133
|
+
|
|
134
|
+
def gff3(
|
|
135
|
+
self,
|
|
136
|
+
url: str | Sequence[str] | core.ExprRef | dict[str, Any] | core.UrlTemplate,
|
|
137
|
+
/,
|
|
138
|
+
*,
|
|
139
|
+
addChrPrefix: bool | str | UndefinedType = Undefined,
|
|
140
|
+
channel: PrimaryPositionalChannel_T | UndefinedType = Undefined,
|
|
141
|
+
debounce: float | core.ExprRef | dict[str, Any] | UndefinedType = Undefined,
|
|
142
|
+
debounceDomainChange: float
|
|
143
|
+
| core.ExprRef
|
|
144
|
+
| dict[str, Any]
|
|
145
|
+
| UndefinedType = Undefined,
|
|
146
|
+
debounceMode: Literal["domain", "window"] | UndefinedType = Undefined,
|
|
147
|
+
indexUrl: str
|
|
148
|
+
| core.ExprRef
|
|
149
|
+
| dict[str, Any]
|
|
150
|
+
| core.IndexUrlTemplate
|
|
151
|
+
| UndefinedType = Undefined,
|
|
152
|
+
windowSize: float | UndefinedType = Undefined,
|
|
153
|
+
) -> core.Data:
|
|
154
|
+
"""Create a lazy ``gff3`` data source.
|
|
155
|
+
|
|
156
|
+
Args:
|
|
157
|
+
addChrPrefix (bool | str): Add a ``chr`` (boolean) or custom (string) prefix to the chromosome names in the Tabix file. __Default value:__ ``false``
|
|
158
|
+
channel (PrimaryPositionalChannel_T): Which channel's scale domain to monitor. __Default value:__ ``"x"``
|
|
159
|
+
debounce (float | ExprRef | dict[str, Any]): Debounce time for data updates, in milliseconds. Debouncing prevents excessive data updates when the user is zooming or panning around. __Default value:__ ``200``
|
|
160
|
+
debounceDomainChange (float | ExprRef | dict[str, Any]): Debounce time for scale-domain driven data updates, in milliseconds. __Default value:__ ``200``
|
|
161
|
+
debounceMode (Literal['domain', 'window']): The debounce mode for data updates. If set to ``"domain"``, domain change events (panning and zooming) will be debounced. If set to ``"window"``, the data fetches initiated by the changes to the visible window (or tile) will be debounced. If your data is small, the ``"window"`` is better as it will start fetching data while the user is still panning around, resulting in a shorter perceived latency. __Default value:__ ``"window"``
|
|
162
|
+
indexUrl (str | ExprRef | dict[str, Any] | IndexUrlTemplate): URL of the tabix index file. When ``url`` is a template, this can be an index URL template using the same placeholder and values. __Default value:__ ``url`` + ``".tbi"``.
|
|
163
|
+
windowSize (float): Size of each chunk when fetching the Tabix file. Data is only fetched when the length of the visible domain smaller than the window size. __Default value:__ ``30000000``
|
|
164
|
+
"""
|
|
165
|
+
properties = {
|
|
166
|
+
"addChrPrefix": addChrPrefix,
|
|
167
|
+
"channel": channel,
|
|
168
|
+
"debounce": debounce,
|
|
169
|
+
"debounceDomainChange": debounceDomainChange,
|
|
170
|
+
"debounceMode": debounceMode,
|
|
171
|
+
"indexUrl": indexUrl,
|
|
172
|
+
"windowSize": windowSize,
|
|
173
|
+
}
|
|
174
|
+
defined: dict[str, Any] = {
|
|
175
|
+
key: value for key, value in properties.items() if value is not Undefined
|
|
176
|
+
}
|
|
177
|
+
return core.Data(
|
|
178
|
+
lazy=core.LazyDataParams(type=cast(Any, "gff3"), url=url, **defined)
|
|
179
|
+
)
|
|
180
|
+
|
|
181
|
+
def indexed_fasta(
|
|
182
|
+
self,
|
|
183
|
+
url: str | core.ExprRef | dict[str, Any] | core.UrlTemplate,
|
|
184
|
+
/,
|
|
185
|
+
*,
|
|
186
|
+
channel: PrimaryPositionalChannel_T | UndefinedType = Undefined,
|
|
187
|
+
debounce: float | core.ExprRef | dict[str, Any] | UndefinedType = Undefined,
|
|
188
|
+
debounceDomainChange: float
|
|
189
|
+
| core.ExprRef
|
|
190
|
+
| dict[str, Any]
|
|
191
|
+
| UndefinedType = Undefined,
|
|
192
|
+
debounceMode: Literal["domain", "window"] | UndefinedType = Undefined,
|
|
193
|
+
indexUrl: str
|
|
194
|
+
| core.ExprRef
|
|
195
|
+
| dict[str, Any]
|
|
196
|
+
| core.IndexUrlTemplate
|
|
197
|
+
| UndefinedType = Undefined,
|
|
198
|
+
windowSize: float | UndefinedType = Undefined,
|
|
199
|
+
) -> core.Data:
|
|
200
|
+
"""Create a lazy ``indexedFasta`` data source.
|
|
201
|
+
|
|
202
|
+
Args:
|
|
203
|
+
channel (PrimaryPositionalChannel_T): Which channel's scale domain to monitor. __Default value:__ ``"x"``
|
|
204
|
+
debounce (float | ExprRef | dict[str, Any]): Debounce time for data updates, in milliseconds. Debouncing prevents excessive data updates when the user is zooming or panning around. __Default value:__ ``200``
|
|
205
|
+
debounceDomainChange (float | ExprRef | dict[str, Any]): Debounce time for scale-domain driven data updates, in milliseconds. __Default value:__ ``200``
|
|
206
|
+
debounceMode (Literal['domain', 'window']): The debounce mode for data updates. If set to ``"domain"``, domain change events (panning and zooming) will be debounced. If set to ``"window"``, the data fetches initiated by the changes to the visible window (or tile) will be debounced. If your data is small, the ``"window"`` is better as it will start fetching data while the user is still panning around, resulting in a shorter perceived latency. __Default value:__ ``"window"``
|
|
207
|
+
indexUrl (str | ExprRef | dict[str, Any] | IndexUrlTemplate): URL of the index file. When ``url`` is a template, this can be an index URL template using the same placeholder and values. __Default value:__ ``url`` + ``".fai"``.
|
|
208
|
+
windowSize (float): Size of each chunk when fetching the fasta file. Data is only fetched when the length of the visible domain smaller than the window size. __Default value:__ ``7000``
|
|
209
|
+
"""
|
|
210
|
+
properties = {
|
|
211
|
+
"channel": channel,
|
|
212
|
+
"debounce": debounce,
|
|
213
|
+
"debounceDomainChange": debounceDomainChange,
|
|
214
|
+
"debounceMode": debounceMode,
|
|
215
|
+
"indexUrl": indexUrl,
|
|
216
|
+
"windowSize": windowSize,
|
|
217
|
+
}
|
|
218
|
+
defined: dict[str, Any] = {
|
|
219
|
+
key: value for key, value in properties.items() if value is not Undefined
|
|
220
|
+
}
|
|
221
|
+
return core.Data(
|
|
222
|
+
lazy=core.LazyDataParams(type=cast(Any, "indexedFasta"), url=url, **defined)
|
|
223
|
+
)
|
|
224
|
+
|
|
225
|
+
def tabix(
|
|
226
|
+
self,
|
|
227
|
+
url: str | Sequence[str] | core.ExprRef | dict[str, Any] | core.UrlTemplate,
|
|
228
|
+
/,
|
|
229
|
+
*,
|
|
230
|
+
addChrPrefix: bool | str | UndefinedType = Undefined,
|
|
231
|
+
channel: PrimaryPositionalChannel_T | UndefinedType = Undefined,
|
|
232
|
+
columns: Sequence[str] | UndefinedType = Undefined,
|
|
233
|
+
debounce: float | core.ExprRef | dict[str, Any] | UndefinedType = Undefined,
|
|
234
|
+
debounceDomainChange: float
|
|
235
|
+
| core.ExprRef
|
|
236
|
+
| dict[str, Any]
|
|
237
|
+
| UndefinedType = Undefined,
|
|
238
|
+
debounceMode: Literal["domain", "window"] | UndefinedType = Undefined,
|
|
239
|
+
indexUrl: str
|
|
240
|
+
| core.ExprRef
|
|
241
|
+
| dict[str, Any]
|
|
242
|
+
| core.IndexUrlTemplate
|
|
243
|
+
| UndefinedType = Undefined,
|
|
244
|
+
parse: core.Parse | ParseKwds | None | UndefinedType = Undefined,
|
|
245
|
+
windowSize: float | UndefinedType = Undefined,
|
|
246
|
+
) -> core.Data:
|
|
247
|
+
"""Create a lazy ``tabix`` data source.
|
|
248
|
+
|
|
249
|
+
Args:
|
|
250
|
+
addChrPrefix (bool | str): Add a ``chr`` (boolean) or custom (string) prefix to the chromosome names in the Tabix file. __Default value:__ ``false``
|
|
251
|
+
channel (PrimaryPositionalChannel_T): Which channel's scale domain to monitor. __Default value:__ ``"x"``
|
|
252
|
+
columns (Sequence[str]): Ordered list of field names for headerless tabix TSV input. If omitted, the source tries to read a commented header line from the tabix file header or the first row of a plain TSV header.
|
|
253
|
+
debounce (float | ExprRef | dict[str, Any]): Debounce time for data updates, in milliseconds. Debouncing prevents excessive data updates when the user is zooming or panning around. __Default value:__ ``200``
|
|
254
|
+
debounceDomainChange (float | ExprRef | dict[str, Any]): Debounce time for scale-domain driven data updates, in milliseconds. __Default value:__ ``200``
|
|
255
|
+
debounceMode (Literal['domain', 'window']): The debounce mode for data updates. If set to ``"domain"``, domain change events (panning and zooming) will be debounced. If set to ``"window"``, the data fetches initiated by the changes to the visible window (or tile) will be debounced. If your data is small, the ``"window"`` is better as it will start fetching data while the user is still panning around, resulting in a shorter perceived latency. __Default value:__ ``"window"``
|
|
256
|
+
indexUrl (str | ExprRef | dict[str, Any] | IndexUrlTemplate): URL of the tabix index file. When ``url`` is a template, this can be an index URL template using the same placeholder and values. __Default value:__ ``url`` + ``".tbi"``.
|
|
257
|
+
parse (Parse | ParseKwds | None): Optional type parsing for TSV fields. When omitted, field types are inferred automatically. Set to ``null`` to disable spec-based type inference and rely on data inference, or provide a field-to-type map to override selected columns. __Default value:__ ``"auto"``
|
|
258
|
+
windowSize (float): Size of each chunk when fetching the Tabix file. Data is only fetched when the length of the visible domain smaller than the window size. __Default value:__ ``30000000``
|
|
259
|
+
"""
|
|
260
|
+
properties = {
|
|
261
|
+
"addChrPrefix": addChrPrefix,
|
|
262
|
+
"channel": channel,
|
|
263
|
+
"columns": columns,
|
|
264
|
+
"debounce": debounce,
|
|
265
|
+
"debounceDomainChange": debounceDomainChange,
|
|
266
|
+
"debounceMode": debounceMode,
|
|
267
|
+
"indexUrl": indexUrl,
|
|
268
|
+
"parse": parse,
|
|
269
|
+
"windowSize": windowSize,
|
|
270
|
+
}
|
|
271
|
+
defined: dict[str, Any] = {
|
|
272
|
+
key: value for key, value in properties.items() if value is not Undefined
|
|
273
|
+
}
|
|
274
|
+
return core.Data(
|
|
275
|
+
lazy=core.LazyDataParams(type=cast(Any, "tabix"), url=url, **defined)
|
|
276
|
+
)
|
|
277
|
+
|
|
278
|
+
def vcf(
|
|
279
|
+
self,
|
|
280
|
+
url: str | Sequence[str] | core.ExprRef | dict[str, Any] | core.UrlTemplate,
|
|
281
|
+
/,
|
|
282
|
+
*,
|
|
283
|
+
addChrPrefix: bool | str | UndefinedType = Undefined,
|
|
284
|
+
channel: PrimaryPositionalChannel_T | UndefinedType = Undefined,
|
|
285
|
+
debounce: float | core.ExprRef | dict[str, Any] | UndefinedType = Undefined,
|
|
286
|
+
debounceDomainChange: float
|
|
287
|
+
| core.ExprRef
|
|
288
|
+
| dict[str, Any]
|
|
289
|
+
| UndefinedType = Undefined,
|
|
290
|
+
debounceMode: Literal["domain", "window"] | UndefinedType = Undefined,
|
|
291
|
+
indexUrl: str
|
|
292
|
+
| core.ExprRef
|
|
293
|
+
| dict[str, Any]
|
|
294
|
+
| core.IndexUrlTemplate
|
|
295
|
+
| UndefinedType = Undefined,
|
|
296
|
+
windowSize: float | UndefinedType = Undefined,
|
|
297
|
+
) -> core.Data:
|
|
298
|
+
"""Create a lazy ``vcf`` data source.
|
|
299
|
+
|
|
300
|
+
Args:
|
|
301
|
+
addChrPrefix (bool | str): Add a ``chr`` (boolean) or custom (string) prefix to the chromosome names in the Tabix file. __Default value:__ ``false``
|
|
302
|
+
channel (PrimaryPositionalChannel_T): Which channel's scale domain to monitor. __Default value:__ ``"x"``
|
|
303
|
+
debounce (float | ExprRef | dict[str, Any]): Debounce time for data updates, in milliseconds. Debouncing prevents excessive data updates when the user is zooming or panning around. __Default value:__ ``200``
|
|
304
|
+
debounceDomainChange (float | ExprRef | dict[str, Any]): Debounce time for scale-domain driven data updates, in milliseconds. __Default value:__ ``200``
|
|
305
|
+
debounceMode (Literal['domain', 'window']): The debounce mode for data updates. If set to ``"domain"``, domain change events (panning and zooming) will be debounced. If set to ``"window"``, the data fetches initiated by the changes to the visible window (or tile) will be debounced. If your data is small, the ``"window"`` is better as it will start fetching data while the user is still panning around, resulting in a shorter perceived latency. __Default value:__ ``"window"``
|
|
306
|
+
indexUrl (str | ExprRef | dict[str, Any] | IndexUrlTemplate): URL of the tabix index file. When ``url`` is a template, this can be an index URL template using the same placeholder and values. __Default value:__ ``url`` + ``".tbi"``.
|
|
307
|
+
windowSize (float): Size of each chunk when fetching the Tabix file. Data is only fetched when the length of the visible domain smaller than the window size. __Default value:__ ``30000000``
|
|
308
|
+
"""
|
|
309
|
+
properties = {
|
|
310
|
+
"addChrPrefix": addChrPrefix,
|
|
311
|
+
"channel": channel,
|
|
312
|
+
"debounce": debounce,
|
|
313
|
+
"debounceDomainChange": debounceDomainChange,
|
|
314
|
+
"debounceMode": debounceMode,
|
|
315
|
+
"indexUrl": indexUrl,
|
|
316
|
+
"windowSize": windowSize,
|
|
317
|
+
}
|
|
318
|
+
defined: dict[str, Any] = {
|
|
319
|
+
key: value for key, value in properties.items() if value is not Undefined
|
|
320
|
+
}
|
|
321
|
+
return core.Data(
|
|
322
|
+
lazy=core.LazyDataParams(type=cast(Any, "vcf"), url=url, **defined)
|
|
323
|
+
)
|
|
324
|
+
|
|
325
|
+
|
|
326
|
+
__all__ = ["LazyDataMethodMixin"]
|