Skip to content

Commit

Permalink
Prettier for markdown formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
cmdcolin committed Dec 11, 2023
1 parent 95e41f7 commit 420afc8
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 83 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -136,3 +136,4 @@ GRCh37_latest_genomic.sort.gff.gz.tbi
bin
lib64
pyvenv.cfg
node_modules
95 changes: 12 additions & 83 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,96 +4,38 @@

# [JBrowse Jupyter](https://gmod.github.io/jbrowse-jupyter/)

JBrowse Jupyter is a python package that let's you create JBrowse 2 views in Jupyter notebooks


![demo-gif](https://user-images.githubusercontent.com/45598764/144863573-2bcd982b-1d18-4dc8-aa2f-fd8adf4985a2.gif)

_You can open this browser.ipynb in colab_
[here](https://colab.research.google.com/github/GMOD/jbrowse-jupyter/blob/main/browser.ipynb)
JBrowse Jupyter is a python package that let's you create JBrowse 2 views in
Jupyter notebooks

## Demos

- Basic usage - [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/GMOD/jbrowse-jupyter/blob/main/browser.ipynb)
- SKBR3 cancer cell line demo - [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/GMOD/jbrowse-jupyter/blob/main/skbr3.ipynb
- Basic usage -
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/GMOD/jbrowse-jupyter/blob/main/browser.ipynb)
- SKBR3 cancer cell line demo -
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/GMOD/jbrowse-jupyter/blob/main/skbr3.ipynb

## Documentation

More documentation here https://gmod.github.io/jbrowse-jupyter/docs/html/index.html
More documentation here
https://gmod.github.io/jbrowse-jupyter/docs/html/index.html

## Installation


```
$ pip install jbrowse-jupyter
```



#### Using Jupyter URLS

In this example, the notebook is configured to run in localhost in port 8888. It
is assumed that you have Jupyter lab installed in your venv.

File tree of the project:

```
- example_dir/
- example.ipynb
- data1.gff.gz
- data2.gff.gz.tbi
```

Running Jupyter

```
(venv)$ cd example_dir
(venv)$ jupyter lab
```

This will be the url that you should see at the top of your browser if you
opened the example.ipynb http://localhost:8888/lab/tree/example.ipynb

Urls for file `data1.gff.gz` and `data2.gff.gz.tbi` would be in the form
`http://localhost:8888/files/<your_file_name>`.

- `http://localhost:8888/files/data1.gff.gz`
- `http://localhost:8888/files/data2.gff.gz.tbi` Note that you do not need to
add lab or tree to this url.

You can use these urls. For example, you could add a track with these urls like
this:

```python

config.add_track(
"http://localhost:8888/files/data1.gff.gz", # track data
index="http://localhost:8888/files/data2.gff.gz.tbi", # track index
track_id="example-track", # track id
name="track-name" # track name
)
```

Resources:

- [Configuring the Jupyter Notebook server](https://jupyter-notebook.readthedocs.io/en/stable/config_overview.html#notebook-server)
- [Getting started with Jupyter Lab](https://jupyterlab.readthedocs.io/en/stable/getting_started/starting.html)

## Resources

- [JBrowse](https://jbrowse.org/jb2/) - the next generation genome browser
- [JBrowse React Linear Genome View](https://www.npmjs.com/package/@jbrowse/react-linear-genome-view) -
interactive genome browser
- [JBrowse React Linear Genome View Docs](https://jbrowse.org/storybook/lgv/main/?path=/story/getting-started--page) -
- [JBrowse 2 homepage](https://jbrowse.org/jb2/)
- [Linear Genome View docs](https://jbrowse.org/storybook/lgv/main/?path=/story/getting-started--page) -
storybook docs of React LGV
- [Dash Applications](https://dash.plotly.com/layout) how to get started to
custumize Dash applications.
- [Dash HTML components](https://dash.plotly.com/dash-html-components) Dash html
components to build the Dash application layout.
- [Dash Jupyter](https://github.com/plotly/jupyter-dash) library to enable
embedding Dash components in jupyter notebooks.
- [Dash Jbrowse](https://github.com/GMOD/dash_jbrowse) suite of Dash components
for JBrowse views. (JBrowse Linear Genome View)
- [Dash JBrowse](https://github.com/GMOD/dash_jbrowse) suite of Dash components
for JBrowse views

## Contributing

Expand All @@ -108,7 +50,6 @@ publish, please cite the most recent JBrowse paper, which will be linked from

## Contact us


- Report a bug or request a feature at
https://github.com/GMOD/jbrowse-jupyter/issues
- Join our developers chat at https://gitter.im/GMOD/jbrowse2
Expand Down Expand Up @@ -145,15 +86,3 @@ notebook/lab server. Intended for those running their notebooks with jupyter lab
or jupyter notebook. 2. Launch your own http server with CORS which will enable
you to use local files. You can run our serve.py to launch our dev server.
(Checkout our local_support.ipynb for tutorials on how to use your own data)


### My data says it's is loading and never loads?

If your view shows that it is loading and never loads, it could be a fetch error
or CORS. - the JBrowse Dev Server has CORS enabled.

- Make sure that your alias is correctly configured. Data that never loads could
also indicate that the format is correct, but will not display anything for it
if the assembly does not match.
- Data that never loads could also indicate that the port and host do not match
where your data is hosted when using paths in jupyter envs
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"devDependencies": {
"prettier": "^3.1.1",
"react-docgen": "^7.0.1"
}
}
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,11 @@ picocolors@^1.0.0:
resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c"
integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==

prettier@^3.1.1:
version "3.1.1"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.1.1.tgz#6ba9f23165d690b6cbdaa88cb0807278f7019848"
integrity sha512-22UbSzg8luF4UuZtzgiUOfcGM8s4tjBv6dJRT7j275NXsy2jb4aJa4NNveul5x4eqlF1wuhuR2RElK71RvmVaw==

react-docgen@^7.0.1:
version "7.0.1"
resolved "https://registry.yarnpkg.com/react-docgen/-/react-docgen-7.0.1.tgz#b6528fe45385908645ffbee1ec0d65709e1e047c"
Expand Down

0 comments on commit 420afc8

Please sign in to comment.