Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -899,7 +899,7 @@ with ui.navset_card_tab(id="tab"):
|
|
| 899 |
ui.panel_title("Kmer Distribution")
|
| 900 |
with ui.layout_columns():
|
| 901 |
with ui.card():
|
| 902 |
-
ui.input_slider("kmer", "kmer", 0, 10,
|
| 903 |
ui.input_slider("top_k", "top:", 0, 1000, 15)
|
| 904 |
|
| 905 |
ui.input_selectize(
|
|
@@ -917,7 +917,7 @@ with ui.navset_card_tab(id="tab"):
|
|
| 917 |
top_k = input.top_k()
|
| 918 |
fig = None
|
| 919 |
mpl.rcParams.update(mpl.rcParamsDefault)
|
| 920 |
-
if input.plot_type() == "count":
|
| 921 |
df = df[df['k'] == k]
|
| 922 |
df = df.head(top_k)
|
| 923 |
fig, ax = plt.subplots()
|
|
@@ -926,7 +926,7 @@ with ui.navset_card_tab(id="tab"):
|
|
| 926 |
ax.set_xlabel("K-mer")
|
| 927 |
ax.set_ylabel("Count")
|
| 928 |
ax.set_xticklabels(df['kmer'], rotation=90)
|
| 929 |
-
if input.plot_type() == "percentage":
|
| 930 |
df = df[df['k'] == k]
|
| 931 |
df = df.head(top_k)
|
| 932 |
fig, ax = plt.subplots()
|
|
|
|
| 899 |
ui.panel_title("Kmer Distribution")
|
| 900 |
with ui.layout_columns():
|
| 901 |
with ui.card():
|
| 902 |
+
ui.input_slider("kmer", "kmer", 0, 10, 0)
|
| 903 |
ui.input_slider("top_k", "top:", 0, 1000, 15)
|
| 904 |
|
| 905 |
ui.input_selectize(
|
|
|
|
| 917 |
top_k = input.top_k()
|
| 918 |
fig = None
|
| 919 |
mpl.rcParams.update(mpl.rcParamsDefault)
|
| 920 |
+
if input.plot_type() == "count" and input.kmer() > 0:
|
| 921 |
df = df[df['k'] == k]
|
| 922 |
df = df.head(top_k)
|
| 923 |
fig, ax = plt.subplots()
|
|
|
|
| 926 |
ax.set_xlabel("K-mer")
|
| 927 |
ax.set_ylabel("Count")
|
| 928 |
ax.set_xticklabels(df['kmer'], rotation=90)
|
| 929 |
+
if input.plot_type() == "percentage" and input.kmer() > 0:
|
| 930 |
df = df[df['k'] == k]
|
| 931 |
df = df.head(top_k)
|
| 932 |
fig, ax = plt.subplots()
|