Skip to content

Commit 650809c

Browse files
authored
Merge pull request #193 from higlass/kerpedji/sequence-logo-and-multivec-docs
fix,docs: Updated docs for multivec tracks and added a literal for sequence-log…
2 parents 3bc22ec + 8d980c2 commit 650809c

File tree

5 files changed

+14
-17
lines changed

5 files changed

+14
-17
lines changed

deno.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
{
22
"lock": false,
3+
"imports": {
4+
"higlass": "https://esm.sh/[email protected]?deps=react@17,react-dom@17,pixi.js@6",
5+
"@lukeed/uuid": "https://esm.sh/@lukeed/[email protected]"
6+
},
37
"compilerOptions": {
48
"checkJs": true,
59
"lib": ["dom", "dom.iterable", "esnext"]

docs/examples.rst

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -54,18 +54,7 @@ visualization with ``hg.Viewconf.locks()``.
5454
Multivec Files
5555
---------------
5656

57-
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.
58-
59-
.. code-block:: javascript
60-
61-
%%javascript
62-
63-
require(["https://unpkg.com/higlass-multivec/dist/higlass-multivec"],
64-
function(hglib) {
65-
66-
});
67-
68-
Create the multivec and output file:
57+
To view multivec files, create the multivec and output file:
6958

7059
.. code-block:: python
7160
@@ -84,7 +73,8 @@ Create the multivec and output file:
8473
)
8574
8675
87-
Create the viewer:
76+
Create the viewer. The `horizontal-stacked-bar` track is a plugin track so we
77+
have to pass in its url so higlass knows where to load it.
8878

8979
.. code-block:: python
9080
@@ -93,7 +83,9 @@ Create the viewer:
9383
ts = multivec(output_file)
9484
view = hg.view(
9585
hg.track("top-axis", height=20),
96-
ts.track("horizontal-stacked-bar", height=50),
86+
ts.track("horizontal-stacked-bar", height=50,
87+
plugin_url="https://unpkg.com/higlass-multivec/dist/higlass-multivec"
88+
),
9789
)
9890
view.domain(x=[0, 1000000])
9991

src/higlass/_utils.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
"viewport-projection-horizontal": "top",
3333
"vertical-chromosome-labels": "left",
3434
"vertical-gene-annotations": "left",
35+
"sequence-logo": "top",
3536
}
3637

3738
datatype_default_track = {

src/higlass/api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -730,7 +730,7 @@ def view(
730730
else:
731731
position = utils.track_default_position.get(track.type)
732732
if position is None:
733-
raise ValueError("No default track type")
733+
raise ValueError(f"No position for track type: {track.type}")
734734

735735
data[position].append(track)
736736

src/higlass/widget.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import * as hglib from "https://esm.sh/higlass@1.13?deps=react@17,react-dom@17,pixi.js@6";
2-
import { v4 } from "https://esm.sh/@lukeed/uuid@2.0.1";
1+
import * as hglib from "higlass";
2+
import { v4 } from "@lukeed/uuid";
33

44
/** @import { HGC, PluginDataFetcherConstructor, GenomicLocation, Viewconf, DataFetcher} from "./types.ts" */
55

0 commit comments

Comments
 (0)