Skip to content

Commit aea69c0

Browse files
authored
Merge branch 'main' into sehilyi/docusaurus-3
2 parents 45fc7f2 + 1150c13 commit aea69c0

File tree

6 files changed

+36
-38
lines changed

6 files changed

+36
-38
lines changed

docs/FAQ.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,11 @@
22
title: Frequently Asked Questions
33
---
44

5-
A list of frequently asked questions about Gosling.js.
6-
75
## How to debug gosling specs?
86

9-
To check whether your gosling spec is valid, you can either
10-
- copy-and-paste your spec on the [online Editor](http://gosling.js.org) to see if there is any warning message.
11-
- call a validation function `console.log(gosling.validateGoslingSpec(yourSpec));`
7+
To check whether your gosling spec is valid, you can use either option.
8+
- Copy and paste your spec on the [online Editor](http://gosling.js.org) to see if there is any warning message.
9+
- Aall a validation function `console.log(gosling.validateGoslingSpec(yourSpec));`.
1210

1311
## How to show Gosling Tooltips that are hidden under other components?
1412
You can modify the z-index of the tooltip components to address this issue.

docs/getting-started.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,21 @@ slug: /
55

66
Gosling.js is a declarative grammar for interactive (epi)genomics visualization on the Web.
77

8-
To get started with Gosling, we recommend going through the [Create Single Track Visualization Tutorial](/tutorials). Then, you can explore examples in the [online editor](https://gosling.js.org), go through the [grammar guide](category/grammar-guide), and start building your own Gosling visualizations using the the [grammar reference](reference) and [Javascript API](js-api) documentation.
8+
To get started with Gosling, we recommend going through the [Create Single Track Visualization Tutorial](/tutorials). Then, you can explore examples in the [online editor](https://gosling.js.org), go through the [grammar guide](category/grammar-guide), and start building your own Gosling visualizations using the the [grammar reference](reference) and [JavaScript API](js-api) documentation.
99

1010
Please see [usage guide](usage) to learn about all the contexts in which Gosling can be used.
1111

1212
## What is a grammar for data visualization?
13-
Words are combined together into sentences based on their parts of speech and grammar rules. In a similar way, visual components (such as a coordinate axis, plot markers, and legend) have specific roles and are combined according to certain rules. You probably know these rules without realizing it! These roles and rules have been made explicit such as in the [Grammar of Graphics](https://link.springer.com/book/10.1007/0-387-28695-0).
13+
Words are combined together into sentences based on their parts of speech and grammar rules. In a similar way, visual components (e.g., a coordinate axis, plot markers, and legends) have specific roles and are combined according to certain rules. You probably know these rules without realizing it! These roles and rules have been made explicit, such as in the [Grammar of Graphics](https://link.springer.com/book/10.1007/0-387-28695-0).
1414

1515
Similarly, *genomic* data visualizations can be understood as being made up of components which follow a set of rules. The **Gosling grammar** formalizes these rules for genomic data visualizations.
1616

17-
How is the Gosling grammar used in practice? A Gosling visualization is defined using a **Gosling specification**, which is a JSON object. The structure and values within this JSON object are determined by the Gosling grammar. See the example below to see how parts of a Gosling specification corresponds to its visualization.
17+
How is the Gosling grammar used in practice? A Gosling visualization is defined using a **Gosling specification**, which is a [JSON object](https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Objects/JSON). The structure and values within this JSON object are determined by the Gosling grammar. See the example below to see how parts of a Gosling specification corresponds to its visualization.
1818

1919
<img src='/img/spec-vis.png'/>
2020

21-
## Javascript API
21+
## JavaScript API
2222

23-
**Gosling.js** takes the Gosling specification as an input and creates the visualization defined by it. You can programmatically interact with this visualization using **Javascript API functions**.
23+
**Gosling.js** takes the Gosling specification as an input and creates the visualization defined by it. You can programmatically interact with this visualization using [**JavaScript API functions**](js-api).
2424

2525
For example, you can use an API function to make the visualization zoom to a particular genomic position, or you can subscribe to click events in the visualization. This is useful to building your own interactive visualizations with Gosling!

docs/non-gos-vis.mdx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,22 @@ title: Integrating non-Gosling visualizations
55
import {TableWrapper} from '@site/react-components/DocComponments/table'
66
import GoslingSchema from './assets/gosling.schema.json'
77

8-
# Integrating non-Gosling visualizations
8+
# Integrating Non-Gosling Visualizations
99

10-
You may want to visualize a non-Gosling visualization within a Gosling visualization, such as showing a lineage tree along with multiple sequences.
10+
You may want to visualize a non-Gosling visualization **within** a Gosling visualization, such as showing a lineage tree along with multiple sequences.
1111

1212
In Gosling, you can do this by using `DummyTrack` as a placeholder to create space for your non-Gosling visualization.
13-
Your non-Gosling visualization can then be overlaid on top of the `DummyTrack` using [JS API functions](./js-api) to
13+
Your non-Gosling visualization can then be overlaid on top of the `DummyTrack` using [JS API functions](js-api) to
1414
get the position of the placeholder.
1515

1616
:::caution
1717
`DummyTrack` can only be used with a linear `layout` at the moment.
1818
:::
1919

20+
:::
21+
You can also find another example of using Gosling with [Vega-Lite](https://vega.github.io/vega-lite/) at https://github.com/gosling-lang/gosling-react-example
22+
:::
23+
2024
[DummyTrack demo in the Editor](https://gosling-lang.github.io/gosling.js/?example=doc_dummy_track)
2125

2226
Here's a `DummyTrack` specification example

docs/usage.md

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,26 +7,32 @@ title: Usage
77
Gosling can be used and deployed in a variety of contexts.
88

99
- In the [online editor](#online-editor)
10-
- In Python using [Gos](https://gosling-lang.github.io/gos/)
10+
- In Python using the [Gos](https://gosling-lang.github.io/gos/) package
1111
- In a [HTML page](#html)
1212
- In a [React application](#react)
1313

1414
## Online Editor
1515

1616
You can visit the [online editor](https://gosling.js.org) to start trying Gosling immediately.
1717

18-
### Load a Gosling Spec From Your Github Gist
18+
### Loading/Sharing Your Gosling Visualization
19+
20+
If you want to share your Gosling visualization using the online editor with your fiends and collaborators, you use [GitHub Gist](https://gist.github.com/).
1921

2022
1. To load a spec you first have to create a gist with a file named gosling.js\* that specifies the spec.
21-
1. You can additionally specify a `readme.md` file to describe your spec.
22-
1. Also be sure to give your gist a fabulous title. It'll be shown in the gosling editor.
23-
You can then open your visualization at `http://<editor_url>/?gist=<github_username>/<gist_id>`.
24-
<!-- For example, https://gosling.js.org/?gist=flekschas/e6e388332814886d4d714efd0e88093b -->
25-
For example, https://gosling.js.org/?gist=wangqianwen0418/1cc79f00990806f07b379ae6a7c7b7b3
23+
1. You can additionally specify a `readme.md` file to describe your spec. This will be shown as a side panel on the online editor.
24+
1. Also, be sure to give your gist a fabulous title. It'll be shown in the gosling editor.
25+
1. You can then open your visualization at `http://<editor_url>/?gist=<github_username>/<gist_id>`.
26+
27+
:::
28+
Example:
29+
- Demo: https://gosling.js.org/?gist=wangqianwen0418/1cc79f00990806f07b379ae6a7c7b7b3
30+
- Gist: https://gist.github.com/wangqianwen0418/1cc79f00990806f07b379ae6a7c7b7b3
31+
:::
2632

2733
## HTML
2834

29-
Gosling can be embedded directly into your HTML page by adding gosling.js and several other dependencies in script tags.
35+
Gosling can be embedded directly into your HTML file by adding gosling.js and several other dependencies in script tags.
3036

3137
```html
3238
<!DOCTYPE html>
@@ -75,8 +81,10 @@ Gosling can be embedded directly into your HTML page by adding gosling.js and se
7581

7682
## React
7783

84+
:::
7885
Beginning with version 0.9.30, Gosling now supports React v18 (You can still use React v16 or v17).
7986
If you are using a Gosling version prior to 0.9.30, please continue to use React v16.
87+
:::
8088

8189
Install `gosling.js` and its dependent libraries:
8290

@@ -104,4 +112,4 @@ function App() {
104112
}
105113
```
106114

107-
Please visit [gosling-react](https://github.com/gosling-lang/gosling-react) to find detailed instruction on using React.
115+
Please visit [gosling-react](https://github.com/gosling-lang/gosling-react-example) to find detailed instruction on using React.

docs/user-interaction.mdx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import {TableWrapper} from '@site/react-components/DocComponments/table'
66
import GoslingSchema from './assets/gosling.schema.json'
77

88
## Zooming and Panning
9-
<!-- [:link: source code](https://github.com/gosling-lang/gosling.js/blob/43626eaf21417bf36128a405dceeaa6ee00d0851/src/core/gosling.schema.ts#L7) -->
109

1110
Each visualization in Gosling supports the Zooming and Panning interaction.
1211
Users can zoom in/out a visualization using the scrolling up/down actions.
@@ -32,7 +31,6 @@ Users can set the `static` property of all tracks at the root level or specify i
3231
```
3332

3433
## Linking Views
35-
<!-- [:link: source code](https://github.com/gosling-lang/gosling.js/blob/43626eaf21417bf36128a405dceeaa6ee00d0851/src/core/Gosling.schema.ts#L328) -->
3634

3735
When views/tracks are linked, the zooming and panning performed in one view/track will be automatically applied to the linked views/tracks.
3836

src/pages/index.js

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ const features = [
3636
),
3737
},
3838
{
39-
title: 'Interactivity',
39+
title: 'User Interaction',
4040
imageUrl: 'img/undraw_docusaurus_react.svg',
4141
description: (
4242
<>
43-
Gosling has intuitive and effective user interactions built in, including zooming and panning and brushing and linking.
44-
This enables flexible visualizations that cover a wide range of visual analysis scenarios, like overview + detail views with brushes or comparative views.
43+
Gosling has intuitive and effective user interactions built in, including zooming, panning, brushing, and linking.
44+
This enables the creation of flexible visualizations that cover a wide range of visual analysis scenarios, like overview + detail views with brushes or comparative views.
4545
</>
4646
),
4747
},
@@ -57,20 +57,10 @@ function Feature({ imageUrl, title, description }) {
5757
);
5858
}
5959

60-
const dummyGosling = <BrowserOnly>
61-
{() => {
62-
const { GoslingComponent } = require("gosling.js");
63-
return <div className='dummyGosling'><GoslingComponent /></div>
64-
}}
65-
</BrowserOnly>
66-
67-
6860
const floatingWindow = <div className={styles.floatingNews}>
6961
<h3 style={{ textAlign: 'center' }}>News</h3>
7062
<ul>
71-
<li>The HIDIVE Lab is looking for remote interview participants who create and use genome-mapped data visualizations (such as Gosling, IGV or Circos). Join a 1-hour online interview and receive a $25 Amazon gift card. Interested? <a href='https://forms.gle/v8QZ5kRjFpurfKiN8' class='primary-color' target='_blank'>Sign up via this form</a>. More info is shared on the <a href='https://hidivelab.org/news/2023-10-12-guisling-user-study/' class='primary-color' target='_blank'>HIDIVE Lab website</a>.
72-
</li>
73-
<li>We release documentations for Gosling <a href='https://github.com/gosling-lang/gosling.js/releases/tag/v0.10.0' class='primary-color'>v0.10.0</a>,
63+
<li>We release documentations for Gosling <a href='https://github.com/gosling-lang/gosling.js/releases/tag/v0.10.0' class='primary-color'>v0.10.0</a>,
7464
which adds support for <a href='/docs/data#gff3-no-higlass-server' class='primary-color'>GFF files</a>, a <a href='docs/js-api#getviewids' class='primary-color'>Javscript API to get the ID of views</a>, and a <a href='/docs/non-gos-vis' class='primary-color'> placeholder track</a> for non-Gosling visualizations.
7565
</li>
7666
<li>We release documentations for Gosling <a href='https://github.com/gosling-lang/gosling.js/releases/tag/v0.9.30' class='primary-color'>v0.9.30</a>,

0 commit comments

Comments
 (0)