Last active
July 20, 2019 18:12
-
-
Save kozo2/f51e4f2d4e399fc1125b7a3136bbe4c5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import dash | |
import dash_core_components as dcc | |
import dash_html_components as html | |
import dash_bio | |
import pandas as pd | |
import kegg2cyjs | |
import plotly.graph_objs as go | |
# df = pd.read_csv("./ecoliLeucineRMA.csv") | |
df = pd.read_csv("./q_devol_witht.csv") | |
slider_range = ['genes', '19800', '19900', '20000', '20100', '20200'] | |
df = df[slider_range] | |
external_stylesheets = ['https://codepen.io/chriddyp/pen/bWLwgP.css'] | |
app = dash.Dash(__name__, external_stylesheets=external_stylesheets) | |
PATHWAY_WIDTH = 1200 | |
PATHWAY_HEIGHT = 700 | |
# print(df.shape) | |
justvol_df = pd.read_csv('just_volume.csv') | |
app.layout = html.Div([ | |
dcc.Graph( | |
id='just-volume', | |
figure={ | |
'data': [ | |
go.Scatter( | |
x=justvol_df['t'], | |
y=justvol_df['volume'] | |
) | |
] | |
} | |
), | |
dcc.Slider( | |
id='my-slider', | |
min=justvol_df['t'].values[0], | |
max=justvol_df['t'].values[-1], | |
), | |
html.Div(id='slider-output-container'), | |
html.Br(), | |
html.Br(), | |
html.Br(), | |
html.Div( | |
dash_bio.KeggScape(pathwayid="eco01100", width=PATHWAY_WIDTH, height=PATHWAY_HEIGHT, df=df), style={'display': 'flex'} | |
#dash_bio.KeggScape(pathwayid="eco01100", width=PATHWAY_WIDTH, height=PATHWAY_HEIGHT, df=df) | |
# dash_bio.KeggScape(pathwayid="eco00020", width=PATHWAY_WIDTH, height=PATHWAY_HEIGHT, df=df) | |
# dash_bio.KeggScape(pathwayid="eco00020", width=PATHWAY_WIDTH, height=PATHWAY_HEIGHT, df=df), style={'marginTop': 100, 'display': 'flex'} | |
), | |
# html.Div([ | |
# dcc.Upload( | |
# id='upload-data', | |
# children=html.Div([ | |
# 'Drag and Drop or ', | |
# html.A('Select Files') | |
# ]), | |
# style={ | |
# 'width': '100%', | |
# 'height': '60px', | |
# 'lineHeight': '60px', | |
# 'borderWidth': '1px', | |
# 'borderStyle': 'dashed', | |
# 'borderRadius': '5px', | |
# 'textAlign': 'center', | |
# 'margin': '10px' | |
# }, | |
# # Allow multiple files to be uploaded | |
# multiple=True | |
# ), | |
# html.Div(id='output-data-upload'), | |
# ]) | |
]) | |
if __name__ == '__main__': | |
app.run_server(debug=True) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment