Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial merge: Dash sequence viewer #8

Merged
merged 121 commits into from
Nov 27, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
121 commits
Select commit Hold shift + click to select a range
0722955
Add sequence viewer to package.json.
Sep 18, 2018
7132b6a
Add React wrapper for sequence viewer component.
Sep 18, 2018
05246ba
Add in requirements to package.json; add in selection feature for seq…
Sep 19, 2018
0ac439b
Implement coverage feature.
Sep 19, 2018
bb0fac8
Add testing code for sequence viewer.
Sep 19, 2018
11857a3
Update progress; setProps still undefined.
Sep 22, 2018
f5cf9f4
Back to working state; setProps still is not defined as a function.
Sep 24, 2018
417697d
Fix issue with setProps; all onclick functions work now for coverage.
Sep 24, 2018
8a5b347
Change deprecated ComponentWillMount to ComponentDidMount.
Sep 24, 2018
4c63481
Use Insulin for Dash app.
Sep 24, 2018
4eaab3c
Add error handling for updating coverage.
Sep 24, 2018
3f30379
First attempt at implementing mouse selection and subpart selection.
Sep 24, 2018
efdd25e
Add sections for testing all aspects of coverage and selection.
Sep 24, 2018
1822c96
Add descriptions of all prop types.
Sep 24, 2018
d9f80e8
Implement and show example of legend.
Sep 24, 2018
aada372
onMouseSelection and onSubpartSelected correctly work with the consol…
Sep 25, 2018
d0c3079
Remove some unnecessary lines of code and add TODO for ShouldComponen…
Sep 25, 2018
36b6a7b
Fix issue with rerendering in the middle of searching for a sequence;…
Sep 26, 2018
649d7a5
Modify usage.py to demonstrate subpart selection.
Sep 26, 2018
2b50356
Minor typo corrections; note that onMouseSelection and onclick events…
Sep 26, 2018
993140f
Add beginnings of app styling.
Sep 26, 2018
ef71c57
Implement shouldComponentUpdate to deal with issue of re-rendering up…
Sep 27, 2018
28c4da3
First draft of demo app for meeting.
Sep 27, 2018
cdf6ab4
Add fix for webpack issue described on dash-component-boilerplate rep…
Sep 28, 2018
c41c910
Add dash_bio and package-lock.
Sep 28, 2018
89d5098
Add in a helper script to parse .fasta files, and incorporate these c…
Oct 3, 2018
c592834
Add functionality for multiple proteins in single fasta file.
Oct 4, 2018
f92b636
Always return a list of proteins in protein reader.
Oct 4, 2018
7a75876
Modify to allow reading a raw data string as well as reading from a f…
Oct 4, 2018
62212d4
Add docstrings and clean up code.
Oct 4, 2018
c64afa2
Add test app for sequence viewer.
Oct 11, 2018
af0d116
Remove protein files and folder.
Oct 11, 2018
c5e5c29
Delete ExampleComponent.py
Oct 11, 2018
b1c8f70
Fix merge conflicts when merging master back in.
Oct 17, 2018
a34fa84
Update code to reflect dependencies for this app.
Oct 17, 2018
45db005
Make some changes as suggested in PR.
Oct 18, 2018
b7f11ae
Add coverage option into demo app.
Oct 18, 2018
0b47c33
Add files for DDS.
Oct 22, 2018
fb51211
Add tarball.
Oct 22, 2018
1704c92
Fix double declaration of dash in requirements.txt.
Oct 22, 2018
cfd4317
Remove base64 from requirements.txt.
Oct 22, 2018
002949c
Add server variable for DDS to usage.py.
Oct 22, 2018
1fa3885
Include entire event details for mouse selection event.
Oct 22, 2018
36bb743
Fix control box height.
Oct 22, 2018
a8e80d8
Ensure that component updates when a new sequence is loaded.
Oct 22, 2018
7e6f1d2
Fix issue with coverage not being enabled.
Oct 22, 2018
a385184
Update tarball.
Oct 22, 2018
8ab63da
Fix issue with selection and/or coverage not having a length due to b…
Oct 22, 2018
8df4b5e
Update tarball.
Oct 22, 2018
2bdb7b5
Update tarball to fix error with initializing selection and coverage …
Oct 22, 2018
d20f427
Initialize coverage and selection to be empty lists instead of null.
Oct 24, 2018
63af5e3
Fix issue with trying to access 'selection' key in a NoneType variable.
Oct 24, 2018
f59a687
Add support for selecting a different protein in the same file.
Oct 24, 2018
400acd1
Update tarball to reflect changes in component.
Oct 24, 2018
14ce87f
Update tarball again.
Oct 24, 2018
45ffb43
Modify protein reader to use Bio.SeqIO for parsing; clean up usage.py…
Oct 24, 2018
33cb3c4
add biopython to requirements.
Oct 24, 2018
20a4322
Regenerate package-lock.
Oct 30, 2018
6d80edc
Alphabetize requirements.
Oct 30, 2018
d310c8e
Remove onMouseSelection and onSubpartSelected functions from componen…
Oct 30, 2018
94162a2
Provide default prop values.
Oct 30, 2018
43bf798
condense declaration of constants in render method.
Oct 30, 2018
b7bc8a7
Remove null initialization of selection in usage.py, and remove condi…
Oct 30, 2018
79e888e
Use "some" functions to filter through selection and coverage in shou…
Oct 30, 2018
77a98f1
Change 'var' to 'let'.
Oct 30, 2018
6414b95
Put sequenceMaxHeight in defaultProps.
Oct 30, 2018
fd27eb3
Clean up code and fix stylesheet to be specific to sequence viewer co…
Nov 5, 2018
c04e9e6
Add sequence viewer test app.
Nov 5, 2018
1a09619
Add new stylesheet.
Nov 5, 2018
38d5cba
Redeploy to DDS
Nov 6, 2018
2711e48
Re-add usage.py.
Nov 6, 2018
ca63439
Add parsing for other databases.
Nov 6, 2018
8a31bdf
Add default props to sequence viewer component.
Nov 7, 2018
2c1b26b
Test out empty component
Nov 8, 2018
a676040
Merge branch 'master' into dash-sequence-viewer
Nov 8, 2018
f2f1c17
Merge branch 'master' into dash-sequence-viewer
Nov 8, 2018
a89c1a3
rename test app.
Nov 8, 2018
1beec3d
merge master back and resolve conflicts.
Nov 8, 2018
d4e119f
Fix conflicts with master and add description/image.
Nov 8, 2018
6cc5e77
Update style to display properly in new gallery page.
Nov 8, 2018
e5b1392
Merge branch 'master' into dash-sequence-viewer
Nov 8, 2018
8be97df
Merge branch 'master' into dash-sequence-viewer
Nov 9, 2018
298582b
Ignore changes to index
Nov 9, 2018
acbe097
Remove JQuery dependency.
Nov 13, 2018
fdeefcc
Remove unnecessary functionality from proteinReader.
Nov 13, 2018
eea852d
Use Biopython to translate amino acid sequences.
Nov 13, 2018
a05e5a6
Fix height of controls container.
Nov 13, 2018
0c33b1c
Use Biopython for translation and add translation alphabet options.
Nov 13, 2018
659d4da
change style and add logo to demo app.
Nov 13, 2018
343a74e
Add logo to demo app.
Nov 13, 2018
cde91a6
Update index.py
Nov 13, 2018
2e6a738
Remove index.py from gitignore.
Nov 13, 2018
34b4a8d
Remove whitespace and clean up code as per code review comments.
Nov 14, 2018
d27e9be
Merge master and resolve conflicts.
Nov 15, 2018
71e1adf
Add tarball.
Nov 15, 2018
bdcf860
Remove versions from requirements.
Nov 15, 2018
d96376e
Merge master back into branch.
Nov 16, 2018
784683b
Fix index.py and package.json to include most current versions on mas…
Nov 16, 2018
63f1db5
Regenerate tarball.
Nov 16, 2018
34ea248
Fix whitespace errors in package.json; regenerate tarball.
Nov 19, 2018
843db0d
tarball again
Nov 19, 2018
c587ece
update folder
Nov 19, 2018
dc09725
Change react-sequence-viewer dependency to come from git repository.
Nov 19, 2018
f1de95b
Update stylesheet to have component-specific scrollbar styling.
Nov 20, 2018
0a2bd3f
Remove usage.py
Nov 20, 2018
072813c
Add title to sequence viewer.
Nov 20, 2018
584544f
Move onclick function assignments for coverage outside of render meth…
Nov 20, 2018
f0533f5
Add sample data and add support for adding coverage in-app.
Nov 20, 2018
3981419
Load default data and coverage.
Nov 21, 2018
8bd694e
Fix webkit scrollbar styling to be specific to app.
Nov 21, 2018
ea2882e
Fix bug in which multiples of 3 for subsequence selection would not a…
Nov 21, 2018
701a0ae
Rename SequenceViewerComponent to SequenceViewer.
Nov 21, 2018
d43c1c7
Regenerate tarball.
Nov 22, 2018
b87e041
Stylistic changes.
Nov 23, 2018
3fbf236
Regenerate tarball
Nov 23, 2018
d36bb36
Add specific sequence viewer commit ID.
Nov 23, 2018
0fcffd6
Merge master back into branch.
Nov 23, 2018
2e97c18
Add or update descriptions for component and props.
Nov 23, 2018
5c6b20d
Re-add selection to props in render.
Nov 27, 2018
a6c678f
Merge master back into branch and re-build package.
Nov 27, 2018
58014d0
Remove inline styles.
Nov 27, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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