genome_spy.data.LazyNamespace¶
- class genome_spy.data.LazyNamespaceView on GitHub¶
Bases:
LazyDataMethodMixinConvenience builders for GenomeSpy lazy data sources.
- Description:
These helpers build schema-backed
genome_spy.schema.Dataobjects with a populatedlazyblock so callers can stay within the handwritten chart API instead of assembling nested dictionaries by hand.
Example
>>> lazy.bigwig("https://example.test/signal.bw") >>> lazy.gff3("https://example.test/genes.gff3.gz", windowSize=2_000_000)
Methods
bam(url, /, *[, channel, debounce, ...])Create a lazy
bamdata source.bigbed(url, /, *[, channel, debounce, ...])Create a lazy
bigbeddata source.bigwig(url, /, *[, channel, debounce, ...])Create a lazy
bigwigdata source.gff3(url, /, *[, addChrPrefix, channel, ...])Create a lazy
gff3data source.indexed_fasta(url, /, *[, channel, ...])Create a lazy
indexedFastadata source.source(type, url, /, **kwargs)Create a lazy data source of an arbitrary GenomeSpy type.
tabix(url, /, *[, addChrPrefix, channel, ...])Create a lazy
tabixdata source.vcf(url, /, *[, addChrPrefix, channel, ...])Create a lazy
vcfdata source.- source(type, url, /, **kwargs)View on GitHub¶
Create a lazy data source of an arbitrary GenomeSpy type.
- Description:
This is the generic escape hatch for lazy data sources. Named helpers such as
bigwig()andgff3()cover each schema-defined URL-backed source type.
- Parameters:
type – GenomeSpy lazy source type such as
"bigwig"or"gff3".url – Remote data URL.
**kwargs – Additional lazy-source parameters supported by GenomeSpy.
- Returns:
A schema-backed
genome_spy.schema.Dataobject.- Raises:
No exceptions are raised directly here. –
Example
>>> lazy.source("bigwig", "https://example.test/signal.bw")
- bam(url, /, *, channel=Undefined, debounce=Undefined, debounceDomainChange=Undefined, debounceMode=Undefined, indexUrl=Undefined, windowSize=Undefined)View on GitHub¶
Create a lazy
bamdata source.- Parameters:
channel (PrimaryPositionalChannel_T) – Which channel’s scale domain to monitor. __Default value:__
"x"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:__
200debounceDomainChange (float | ExprRef | dict[str, Any]) – Debounce time for scale-domain driven data updates, in milliseconds. __Default value:__
200debounceMode (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"indexUrl (str | ExprRef | dict[str, Any] | IndexUrlTemplate) – URL of the index file. When
urlis a template, this can be an index URL template using the same placeholder and values. __Default value:__url+".bai".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
- bigbed(url, /, *, channel=Undefined, debounce=Undefined, debounceDomainChange=Undefined, debounceMode=Undefined, windowSize=Undefined)View on GitHub¶
Create a lazy
bigbeddata source.- Parameters:
channel (PrimaryPositionalChannel_T) – Which channel’s scale domain to monitor. __Default value:__
"x"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:__
200debounceDomainChange (float | ExprRef | dict[str, Any]) – Debounce time for scale-domain driven data updates, in milliseconds. __Default value:__
200debounceMode (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"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
- bigwig(url, /, *, channel=Undefined, debounce=Undefined, debounceDomainChange=Undefined, debounceMode=Undefined, pixelsPerBin=Undefined)View on GitHub¶
Create a lazy
bigwigdata source.- Parameters:
channel (PrimaryPositionalChannel_T) – Which channel’s scale domain to monitor. __Default value:__
"x"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:__
200debounceDomainChange (float | ExprRef | dict[str, Any]) – Debounce time for scale-domain driven data updates, in milliseconds. __Default value:__
200debounceMode (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"pixelsPerBin (float | ExprRef | dict[str, Any]) – The approximate minimum width of each data bin, in pixels. __Default value:__
2
- gff3(url, /, *, addChrPrefix=Undefined, channel=Undefined, debounce=Undefined, debounceDomainChange=Undefined, debounceMode=Undefined, indexUrl=Undefined, windowSize=Undefined)View on GitHub¶
Create a lazy
gff3data source.- Parameters:
addChrPrefix (bool | str) – Add a
chr(boolean) or custom (string) prefix to the chromosome names in the Tabix file. __Default value:__falsechannel (PrimaryPositionalChannel_T) – Which channel’s scale domain to monitor. __Default value:__
"x"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:__
200debounceDomainChange (float | ExprRef | dict[str, Any]) – Debounce time for scale-domain driven data updates, in milliseconds. __Default value:__
200debounceMode (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"indexUrl (str | ExprRef | dict[str, Any] | IndexUrlTemplate) – URL of the tabix index file. When
urlis a template, this can be an index URL template using the same placeholder and values. __Default value:__url+".tbi".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
- indexed_fasta(url, /, *, channel=Undefined, debounce=Undefined, debounceDomainChange=Undefined, debounceMode=Undefined, indexUrl=Undefined, windowSize=Undefined)View on GitHub¶
Create a lazy
indexedFastadata source.- Parameters:
channel (PrimaryPositionalChannel_T) – Which channel’s scale domain to monitor. __Default value:__
"x"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:__
200debounceDomainChange (float | ExprRef | dict[str, Any]) – Debounce time for scale-domain driven data updates, in milliseconds. __Default value:__
200debounceMode (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"indexUrl (str | ExprRef | dict[str, Any] | IndexUrlTemplate) – URL of the index file. When
urlis a template, this can be an index URL template using the same placeholder and values. __Default value:__url+".fai".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
- tabix(url, /, *, addChrPrefix=Undefined, channel=Undefined, columns=Undefined, debounce=Undefined, debounceDomainChange=Undefined, debounceMode=Undefined, indexUrl=Undefined, parse=Undefined, windowSize=Undefined)View on GitHub¶
Create a lazy
tabixdata source.- Parameters:
addChrPrefix (bool | str) – Add a
chr(boolean) or custom (string) prefix to the chromosome names in the Tabix file. __Default value:__falsechannel (PrimaryPositionalChannel_T) – Which channel’s scale domain to monitor. __Default value:__
"x"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.
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:__
200debounceDomainChange (float | ExprRef | dict[str, Any]) – Debounce time for scale-domain driven data updates, in milliseconds. __Default value:__
200debounceMode (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"indexUrl (str | ExprRef | dict[str, Any] | IndexUrlTemplate) – URL of the tabix index file. When
urlis a template, this can be an index URL template using the same placeholder and values. __Default value:__url+".tbi".parse (Parse | ParseKwds | None) – Optional type parsing for TSV fields. When omitted, field types are inferred automatically. Set to
nullto disable spec-based type inference and rely on data inference, or provide a field-to-type map to override selected columns. __Default value:__"auto"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
- vcf(url, /, *, addChrPrefix=Undefined, channel=Undefined, debounce=Undefined, debounceDomainChange=Undefined, debounceMode=Undefined, indexUrl=Undefined, windowSize=Undefined)View on GitHub¶
Create a lazy
vcfdata source.- Parameters:
addChrPrefix (bool | str) – Add a
chr(boolean) or custom (string) prefix to the chromosome names in the Tabix file. __Default value:__falsechannel (PrimaryPositionalChannel_T) – Which channel’s scale domain to monitor. __Default value:__
"x"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:__
200debounceDomainChange (float | ExprRef | dict[str, Any]) – Debounce time for scale-domain driven data updates, in milliseconds. __Default value:__
200debounceMode (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"indexUrl (str | ExprRef | dict[str, Any] | IndexUrlTemplate) – URL of the tabix index file. When
urlis a template, this can be an index URL template using the same placeholder and values. __Default value:__url+".tbi".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