diff --git a/deno.json b/deno.json index b78de0c..d105a7d 100644 --- a/deno.json +++ b/deno.json @@ -1,5 +1,9 @@ { "lock": false, + "imports": { + "higlass": "https://esm.sh/higlass@1.13?deps=react@17,react-dom@17,pixi.js@6", + "@lukeed/uuid": "https://esm.sh/@lukeed/uuid@2.0.1" + }, "compilerOptions": { "checkJs": true, "lib": ["dom", "dom.iterable", "esnext"] diff --git a/docs/examples.rst b/docs/examples.rst index 88a3ec2..05485ba 100644 --- a/docs/examples.rst +++ b/docs/examples.rst @@ -54,18 +54,7 @@ visualization with ``hg.Viewconf.locks()``. Multivec Files --------------- -To view multivec files, we have to load the higlass plugin track. Execute the following code in a cell in the Jupyter notebook you're using. - -.. code-block:: javascript - - %%javascript - - require(["https://unpkg.com/higlass-multivec/dist/higlass-multivec"], - function(hglib) { - - }); - -Create the multivec and output file: +To view multivec files, create the multivec and output file: .. code-block:: python @@ -84,7 +73,8 @@ Create the multivec and output file: ) -Create the viewer: +Create the viewer. The `horizontal-stacked-bar` track is a plugin track so we +have to pass in its url so higlass knows where to load it. .. code-block:: python @@ -93,7 +83,9 @@ Create the viewer: ts = multivec(output_file) view = hg.view( hg.track("top-axis", height=20), - ts.track("horizontal-stacked-bar", height=50), + ts.track("horizontal-stacked-bar", height=50, + plugin_url="https://unpkg.com/higlass-multivec/dist/higlass-multivec" + ), ) view.domain(x=[0, 1000000]) diff --git a/docs/higlass_theme/static/higlass.css b/docs/higlass_theme/static/higlass.css index 130a283..ff97c29 100644 --- a/docs/higlass_theme/static/higlass.css +++ b/docs/higlass_theme/static/higlass.css @@ -167,12 +167,8 @@ a:active { pre, tt, code { font-family: - "Roboto Mono", - "Consolas", - "Menlo", - "Deja Vu Sans Mono", - "Bitstream Vera Sans Mono", - monospace; + "Roboto Mono", "Consolas", "Menlo", "Deja Vu Sans Mono", + "Bitstream Vera Sans Mono", monospace; overflow: scroll; } diff --git a/src/higlass/_utils.py b/src/higlass/_utils.py index abeee89..0929026 100644 --- a/src/higlass/_utils.py +++ b/src/higlass/_utils.py @@ -32,6 +32,7 @@ "viewport-projection-horizontal": "top", "vertical-chromosome-labels": "left", "vertical-gene-annotations": "left", + "sequence-logo": "top", } datatype_default_track = { diff --git a/src/higlass/api.py b/src/higlass/api.py index 6a461ac..f1dfc2f 100644 --- a/src/higlass/api.py +++ b/src/higlass/api.py @@ -730,7 +730,7 @@ def view( else: position = utils.track_default_position.get(track.type) if position is None: - raise ValueError("No default track type") + raise ValueError(f"No position for track type: {track.type}") data[position].append(track) diff --git a/src/higlass/widget.js b/src/higlass/widget.js index 30b3bb3..1cf68bd 100644 --- a/src/higlass/widget.js +++ b/src/higlass/widget.js @@ -1,5 +1,5 @@ -import * as hglib from "https://esm.sh/higlass@1.13?deps=react@17,react-dom@17,pixi.js@6"; -import { v4 } from "https://esm.sh/@lukeed/uuid@2.0.1"; +import * as hglib from "higlass"; +import { v4 } from "@lukeed/uuid"; /** @import { HGC, PluginDataFetcherConstructor, GenomicLocation, Viewconf, DataFetcher} from "./types.ts" */