Spaces:
Sleeping
Sleeping
from shiny import render | |
from shiny.express import input, ui | |
import plotly.express as px | |
ui.page_opts(fillable=True) | |
ui.panel_title("Kmer Analysis") | |
with ui.layout_columns(): | |
with ui.card(): | |
ui.input_slider("slider", "Slider", 0, 10, 5) | |
def plot(): | |
df = pd.read_csv('kmers.csv') | |
k = input.slider() | |
fig = None | |
if k: | |
df = df[df['k'] == k] | |
fig = px.bar(df, x='kmer', y='count', title=f'Most common {k}-mers') | |
return fig |