genome_spy.UrlData¶
- class genome_spy.UrlData(description=Undefined, format=Undefined, name=Undefined, url=Undefined, **kwds)View on GitHub¶
Bases:
GenomeSpySchemaGenerated wrapper for
UrlData.Methods
copy(*[, deep])Return a copy with optional keyword updates.
description(value)Return a copy with
descriptionupdated.format([value, columns, delimiter, parse, ...])Return a copy with
formatupdated.name(value)Return a copy with
nameupdated.Return this class schema with referenced properties merged in.
to_dict(*[, validate])Serialize this schema wrapper to a JSON-compatible dictionary.
to_json(*[, validate])Serialize this schema wrapper to formatted JSON.
url([value, attach, expr, field, maxValues, ...])Return a copy with
urlupdated.validate(instance)Validate an instance against this wrapper's schema.
- description(value)View on GitHub¶
Return a copy with
descriptionupdated.
- format(value=Undefined, /, *, columns=Undefined, delimiter=Undefined, parse=Undefined, property=Undefined, type=Undefined)View on GitHub¶
Return a copy with
formatupdated.- Parameters:
columns (Sequence[str]) – Schema-defined
columnsproperty.delimiter (str) – The delimiter between records. The delimiter must be a single character (i.e., a single 16-bit code unit); so, ASCII delimiters are fine, but emoji delimiters are not.
parse (Parse | ParseKwds | None) – Schema-defined
parseproperty.property (str) – The JSON property containing the desired data. This parameter can be used when the loaded JSON file may have surrounding structure or meta-data. For example
"property": "values.features"is equivalent to retrievingjson.values.featuresfrom the loaded JSON object.type (Literal['csv', 'tsv'] | Literal['dsv'] | Literal['json'] | Literal['bed'] | Literal['bedpe'] | Literal['wig'] | Literal['vcf'] | str) – Schema-defined
typeproperty.
- name(value)View on GitHub¶
Return a copy with
nameupdated.
- url(value=Undefined, /, *, attach=Undefined, expr=Undefined, field=Undefined, maxValues=Undefined, onLoadError=Undefined, template=Undefined, type=Undefined, urlsFromFile=Undefined, values=Undefined)View on GitHub¶
Return a copy with
urlupdated.- Parameters:
attach (bool) – Whether to attach the template value to each loaded datum using
fieldas the datum field name. Disable this when the expanded URL identifies only a file partition and the loaded data already contains the relevant identifiers. __Default value:__trueexpr (str) – The expression string.
field (FieldName_T) – Field name used as the template placeholder and as the datum field attached to loaded rows.
maxValues (float) – Maximum number of distinct resolved values to load. If the limit is exceeded, the source loads no data.
onLoadError (Literal['error', 'skip']) – Behavior when loading an expanded URL fails. The default
"error"fails the data source. Use"skip"when some expanded URLs are expected to be unavailable, for example when data files for some patients have not been generated yet. __Default value:__"error"template (str) – URL template. The value from
valuesis substituted for the placeholder named byfield, for example{sample}.type (Literal['json', 'csv', 'tsv']) – The format of the data in the list. If the type is
"json", the list is expected to be an array of strings. If the type is"csv"or"tsv", the list is expected to be a table with a single column namedurl. __Default value:__"txt"urlsFromFile (str) – A URL that returns a list of URLs to load the data set. The URLs in the list can be absolute or relative to the URL of the list.
values (Sequence[Scalar_T] | ExprRef | dict[str, Any]) – Values used for template expansion. Duplicate resolved URLs are loaded once. An ExprRef can reference reactive parameters such as
visibleSamples.
- copy(*, deep=True, **kwds)View on GitHub¶
Return a copy with optional keyword updates.
- classmethod resolve_references()View on GitHub¶
Return this class schema with referenced properties merged in.
- to_dict(*, validate=True)View on GitHub¶
Serialize this schema wrapper to a JSON-compatible dictionary.
- to_json(*, validate=True)View on GitHub¶
Serialize this schema wrapper to formatted JSON.
- classmethod validate(instance)View on GitHub¶
Validate an instance against this wrapper’s schema.