Global

Methods

decode(x, type, order, optionsopt) → {Int32Array|Array|Float64Array}

Description:
  • Decode an array from a DEFLATE-compressed byte range.

Source:
Parameters:
Name Type Attributes Default Description
x Uint8Array

A DEFLATE-compressed byte range containing an array.

type string

Type of the array, either integer, double, boolean or string.

order string

The byte order of the (decompressed) values in x, either little_endian or big_endian,

options object <optional>
{}

Additional options.

Properties
Name Type Attributes Default Description
missing string <optional>
"null"

How to treat missing values in integer arrays, see decodeIntegers.

Returns:

An array of values of the specified type. See decodeStrings, decodeBooleans, decodeIntegers or decodeDoubles for more details.

Type
Int32Array | Array | Float64Array

decodeBooleans(x) → {Array}

Description:
  • Decode booleans from a DEFLATE-compressed byte range.

Source:
Parameters:
Name Type Description
x Uint8Array

A DEFLATE-compressed byte range containing booleans.

Returns:

Array of booleans. Missing values are represented as null.

Type
Array

decodeDeltaIndices(x, order) → {Int32Array}

Description:
  • Decode delta-encoded indices from a DEFLATE-compressed byte range.

Source:
Parameters:
Name Type Description
x Uint8Array

A DEFLATE-compressed byte range containing delta-encoded indices.

order string

The byte order of the (decompressed) values in x, either little_endian or big_endian,

Returns:

Array of decoded indices.

Type
Int32Array

decodeDoubles(x, order) → {Float64Array}

Description:
  • Decode double-precision floating-point values from a DEFLATE-compressed byte range.

Source:
Parameters:
Name Type Description
x Uint8Array

A DEFLATE-compressed byte range containing doubles.

order string

The byte order of the (decompressed) values in x, either little_endian or big_endian,

Returns:

Array of decoded doubles.

Type
Float64Array

decodeIntegers(x, order, optionsopt) → {Int32Array|Array|Float64Array}

Description:
  • Decode 32-bit integers from a DEFLATE-compressed byte range.

Source:
Parameters:
Name Type Attributes Default Description
x Uint8Array

A DEFLATE-compressed byte range containing 32-bit integers.

order string

The byte order of the (decompressed) values in x, either little_endian or big_endian,

options object <optional>
{}

Additional options.

Properties
Name Type Attributes Default Description
missing string <optional>
"null"

How to treat missing values, represented by the lowest integer (-2147483648). The default value of null will convert these to nulls in an ordinary Array. Setting this to nan will convert them to NaN values in a Float64Array. Setting this to raw will leave them as -2147483648.

Returns:

Array of decoded integers. This is an Int32Array if missing="raw" or if there are no missing values; otherwise it is either an ordinary Array or a Float64Array, depending on the choice of missing.

Type
Int32Array | Array | Float64Array

decodeStrings(x) → {Array}

Description:
  • Decode strings from a DEFLATE-compressed byte range.

Source:
Parameters:
Name Type Description
x Uint8Array

A DEFLATE-compressed byte range containing strings.

Returns:

Array of strings. Missing values are represented as null.

Type
Array

load(path, fetch_json, fetch_range) → {DataFrame|SummarizedExperiment}

Description:
  • Load an interface to a SummarizedExperiment or a DataFrame.

Source:
Parameters:
Name Type Description
path string

Path to a directory containing a SummarizedExperiment or DataFrame. This may be a relative or absolute path, depending on how the files are hosted.

fetch_json function

A function that accepts path, a path to a file inside path. It should retrieve the contents of path and load them as a JSON object. It may also return a promise that resolves to such an object.

fetch_range function

A function that accepts file (a path to a file inside path), start and end. It should retrieve bytes from path in the interval [start, end) and return a Uint8Array containing those bytes. It may also return a promise that resolves to such a Uint8Array.

Returns:

Interface to a DataFrame or SummarizedExperiment, depending on the object at path.

Type
DataFrame | SummarizedExperiment