File size: 481 Bytes
714dbd4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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)

@render.plot
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