Skip to content

Commit

Permalink
Merge pull request #8 from plotly/dash-sequence-viewer
Browse files Browse the repository at this point in the history
Initial merge: Dash sequence viewer
  • Loading branch information
Shammamah Hossain committed Nov 27, 2018
2 parents 934c227 + 58014d0 commit 9a70caf
Show file tree
Hide file tree
Showing 20 changed files with 10,346 additions and 885 deletions.
105 changes: 105 additions & 0 deletions assets/sequence-viewer-style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
@import url('https://fonts.googleapis.com/css?family=Open+Sans');

#seq-view-body {
position: absolute;
overflow: auto;
top: 0px;
left: 0px;
bottom: 0px;
width: 100%;
height: 100%;
background-color: #F3F6FA;
font-family: 'Open Sans';
}
#seq-view-controls-container input[type=text]{
width: 80%;
}
#seq-view-body ::-webkit-scrollbar{
width: 0px;
height: 0px;
}
#seq-view-header {
width: calc(100% - 40px);
height: auto;
margin: 0px;
font-size: 60px;
margin-bottom: 20px;
background: #C8D4E3;
color: #636efa;
font-family: 'Open Sans';
font-variant: all-small-caps;
}

#seq-view-header img {
height: 50px;
margin-right: 50px;
}

.inputSearchSeq {
font-size: 14px;
width: 100px;
padding:5px;
border-radius:3px;
border: solid 1px grey;
margin-left: 10px;
}

.seq-view-info-element {
font-weight: bold;
}

#seq-view-fasta-upload{
width: 400px;
height: 50px;
line-height: 60px;
border-width: 1px;
border-style: dashed;
border-radius: 5px;
text-align: center;
margin: 20px;
padding: 10px;
}
#sequence-viewer-container{
width: 400px;
display: inline-block;
vertical-align: top;
border: solid 1px #636efa;
border-radius: 5px;
padding: 10px;
margin:20px;
overflow:scroll;
}

#seq-view-controls-container {
width:150px;
height: 500px;
overflow: scroll;
display: inline-block;
vertical-align: top;
margin: 20px;
border: solid 1px #636efa;
border-radius: 5px;
padding: 10px;
padding-top:30px;
}

#seq-view-sel-slider-container {
width: 100px;
padding: 10px;
border: solid 1px #636efa;
border-radius: 5px;
margin: 10px;
margin-top:30px;
}

#seq-view-info-container {
width: 400px;
height: 500px;
border: solid 1px #636efa;
overflow:scroll;
margin: 20px;
vertical-align: top;
border-radius: 5px;
padding: 20px;
display: inline-block;
}
1 change: 1 addition & 0 deletions config.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import os

# Replace with the name of your Dash app
# This will end up being part of the URL of your deployed app,
# so it can't contain any spaces, capitalizations, or special characters
Expand Down
Binary file modified dash_bio-0.0.1.tar.gz
Binary file not shown.
166 changes: 83 additions & 83 deletions dash_bio/DashCircos.py
Original file line number Diff line number Diff line change
@@ -1,83 +1,83 @@
# AUTO GENERATED FILE - DO NOT EDIT

from dash.development.base_component import Component, _explicitize_args


class DashCircos(Component):
"""A DashCircos component.
Dash Circos is a library used to analyze and interpret
data using a circular layout, based on the popular
'Circos' graph. This Dash Bio component is a useful tool
for showcasing relationships bewtween data/datasets in a
beautiful way. Please checkout the Dash Bio repository
on github to learn more about this API.
Keyword arguments:
- id (string; optional): The ID of the component to be used in Dash callbacks
- style (dict; optional): The CSS styling of the div wrapping the component
- eventDatum (dict; optional): A Dash prop that returns data on clicking or hovering of the tracks.
Depending on what is specified for prop "selectEvent".
- selectEvent (dict; optional): A dictionary used to choose whether tracks should return
data on click, hover, or both, with the dash prop "eventDatum".
The keys of the dictionary represent the index of the list
specified for "tracks".
Ex:
selectEvent={
"0": "hover",
"1": "click",
"2": "both"
},
- layout (list; required): The overall layout of the Circos graph, provided
as a list of dictionaries.
- config (dict; optional): Configuration of overall layout of the graph.
- size (number; optional): The overall size of the SVG container holding the
graph. Set on initilization and unchangeable thereafter.
- tracks (list; optional): Tracks that specify specific layouts.
For a complete list of tracks and usage,
please check the docs.
Available events: """
@_explicitize_args
def __init__(self, id=Component.UNDEFINED, style=Component.UNDEFINED, eventDatum=Component.UNDEFINED, selectEvent=Component.UNDEFINED, layout=Component.REQUIRED, config=Component.UNDEFINED, size=Component.UNDEFINED, tracks=Component.UNDEFINED, **kwargs):
self._prop_names = ['id', 'style', 'eventDatum', 'selectEvent', 'layout', 'config', 'size', 'tracks']
self._type = 'DashCircos'
self._namespace = 'dash_bio'
self._valid_wildcard_attributes = []
self.available_events = []
self.available_properties = ['id', 'style', 'eventDatum', 'selectEvent', 'layout', 'config', 'size', 'tracks']
self.available_wildcard_properties = []

_explicit_args = kwargs.pop('_explicit_args')
_locals = locals()
_locals.update(kwargs) # For wildcard attrs
args = {k: _locals[k] for k in _explicit_args if k != 'children'}

for k in ['layout']:
if k not in args:
raise TypeError(
'Required argument `' + k + '` was not specified.')
super(DashCircos, self).__init__(**args)

def __repr__(self):
if(any(getattr(self, c, None) is not None
for c in self._prop_names
if c is not self._prop_names[0])
or any(getattr(self, c, None) is not None
for c in self.__dict__.keys()
if any(c.startswith(wc_attr)
for wc_attr in self._valid_wildcard_attributes))):
props_string = ', '.join([c+'='+repr(getattr(self, c, None))
for c in self._prop_names
if getattr(self, c, None) is not None])
wilds_string = ', '.join([c+'='+repr(getattr(self, c, None))
for c in self.__dict__.keys()
if any([c.startswith(wc_attr)
for wc_attr in
self._valid_wildcard_attributes])])
return ('DashCircos(' + props_string +
(', ' + wilds_string if wilds_string != '' else '') + ')')
else:
return (
'DashCircos(' +
repr(getattr(self, self._prop_names[0], None)) + ')')
# AUTO GENERATED FILE - DO NOT EDIT

from dash.development.base_component import Component, _explicitize_args


class DashCircos(Component):
"""A DashCircos component.
Dash Circos is a library used to analyze and interpret
data using a circular layout, based on the popular
'Circos' graph. This Dash Bio component is a useful tool
for showcasing relationships bewtween data/datasets in a
beautiful way. Please checkout the Dash Bio repository
on github to learn more about this API.
Keyword arguments:
- id (string; optional): The ID of the component to be used in Dash callbacks
- style (dict; optional): The CSS styling of the div wrapping the component
- eventDatum (dict; optional): A Dash prop that returns data on clicking or hovering of the tracks.
Depending on what is specified for prop "selectEvent".
- selectEvent (dict; optional): A dictionary used to choose whether tracks should return
data on click, hover, or both, with the dash prop "eventDatum".
The keys of the dictionary represent the index of the list
specified for "tracks".
Ex:
selectEvent={
"0": "hover",
"1": "click",
"2": "both"
},
- layout (list; required): The overall layout of the Circos graph, provided
as a list of dictionaries.
- config (dict; optional): Configuration of overall layout of the graph.
- size (number; optional): The overall size of the SVG container holding the
graph. Set on initilization and unchangeable thereafter.
- tracks (list; optional): Tracks that specify specific layouts.
For a complete list of tracks and usage,
please check the docs.
Available events: """
@_explicitize_args
def __init__(self, id=Component.UNDEFINED, style=Component.UNDEFINED, eventDatum=Component.UNDEFINED, selectEvent=Component.UNDEFINED, layout=Component.REQUIRED, config=Component.UNDEFINED, size=Component.UNDEFINED, tracks=Component.UNDEFINED, **kwargs):
self._prop_names = ['id', 'style', 'eventDatum', 'selectEvent', 'layout', 'config', 'size', 'tracks']
self._type = 'DashCircos'
self._namespace = 'dash_bio'
self._valid_wildcard_attributes = []
self.available_events = []
self.available_properties = ['id', 'style', 'eventDatum', 'selectEvent', 'layout', 'config', 'size', 'tracks']
self.available_wildcard_properties = []

_explicit_args = kwargs.pop('_explicit_args')
_locals = locals()
_locals.update(kwargs) # For wildcard attrs
args = {k: _locals[k] for k in _explicit_args if k != 'children'}

for k in ['layout']:
if k not in args:
raise TypeError(
'Required argument `' + k + '` was not specified.')
super(DashCircos, self).__init__(**args)

def __repr__(self):
if(any(getattr(self, c, None) is not None
for c in self._prop_names
if c is not self._prop_names[0])
or any(getattr(self, c, None) is not None
for c in self.__dict__.keys()
if any(c.startswith(wc_attr)
for wc_attr in self._valid_wildcard_attributes))):
props_string = ', '.join([c+'='+repr(getattr(self, c, None))
for c in self._prop_names
if getattr(self, c, None) is not None])
wilds_string = ', '.join([c+'='+repr(getattr(self, c, None))
for c in self.__dict__.keys()
if any([c.startswith(wc_attr)
for wc_attr in
self._valid_wildcard_attributes])])
return ('DashCircos(' + props_string +
(', ' + wilds_string if wilds_string != '' else '') + ')')
else:
return (
'DashCircos(' +
repr(getattr(self, self._prop_names[0], None)) + ')')
Loading

0 comments on commit 9a70caf

Please sign in to comment.