Skip to content

Commit

Permalink
Refactored igv-jupyter to wrap igv-notebook; work in progress
Browse files Browse the repository at this point in the history
  • Loading branch information
tmtabor committed Apr 27, 2022
1 parent b57ea02 commit 571dd1e
Show file tree
Hide file tree
Showing 24 changed files with 57 additions and 908 deletions.
29 changes: 7 additions & 22 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,42 +1,27 @@
# Dockerfile for running igv-jupyter from a pip install

# Pull the latest known good scipy notebook image from the official Jupyter stacks
FROM jupyter/scipy-notebook:2021-08-16
FROM jupyter/scipy-notebook:2022-02-17

MAINTAINER Thorin Tabor <[email protected]>
EXPOSE 8888

#############################################
## ROOT ##
## Install npm ##
#############################################

USER root

RUN apt-get update && apt-get install -y npm

#############################################
## $NB_USER ##
## Install python libraries ##
#############################################

USER $NB_USER

RUN conda install -c conda-forge jupyterlab=3.1

#############################################
## $NB_USER ##
## Install nbtools ##
## Install dependencies ##
#############################################

RUN pip install nbtools==21.9.0b1
RUN pip install nbtools==22.3.0b2 igv-notebook

#############################################
## $NB_USER ##
## Install nbtools igv-jupyter ##
#############################################

RUN pip install igv-jupyter && jupyter lab build
RUN pip install igv-jupyter

# RUN git clone https://github.com/g2nb/igv-jupyter.git
# RUN cd igv-jupyter && pip install -e .

#############################################
## $NB_USER ##
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2016-2021 The Broad Institute and The Regents of the University of California
Copyright (c) 2016-2022 The Broad Institute and The Regents of the University of California

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
28 changes: 0 additions & 28 deletions MANIFEST.in

This file was deleted.

1 change: 0 additions & 1 deletion igv/.gitignore

This file was deleted.

15 changes: 3 additions & 12 deletions igv/__init__.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,6 @@
from .browser import Browser
from .nbextension import _jupyter_nbextension_paths
from .labextension import _jupyter_labextension_paths
from .navbar import show_navbar
from .tool import igv_tool
from .version import __version__
from igv_notebook import Browser, init


def _jupyter_server_extension_paths():
return [{
"module": "igv"
}]


def load_jupyter_server_extension(nbapp):
nbapp.log.info("igv enabled!")
__version__ = '2.0.0'
212 changes: 0 additions & 212 deletions igv/browser.py

This file was deleted.

15 changes: 0 additions & 15 deletions igv/labextension.py

This file was deleted.

19 changes: 19 additions & 0 deletions igv/navbar.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import os
from IPython.display import HTML, Javascript, display


def show_navbar():
# Display the base HTML container for the menu
display(HTML('<div class="igv-navbar"></div>'))

# Import the menu styles
menu_path = os.path.join(os.path.dirname(__file__), 'static/menu.css')
menu_file = open(menu_path, 'r')
menu_css = menu_file.read()
display(HTML(f'<style>{menu_css}</style>'))

# Build the menu with Javascript
menu_path = os.path.join(os.path.dirname(__file__), 'static/menu.js')
menu_file = open(menu_path, 'r')
menu_js = menu_file.read()
display(Javascript(menu_js))
9 changes: 0 additions & 9 deletions igv/nbextension/__init__.py

This file was deleted.

Loading

0 comments on commit 571dd1e

Please sign in to comment.