Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -14,8 +14,6 @@ import numpy as np
|
|
14 |
import matplotlib.pyplot as plt
|
15 |
import matplotlib.style as mplstyle
|
16 |
from pathlib import Path
|
17 |
-
# using a faster style for plotting
|
18 |
-
mplstyle.use('fast')
|
19 |
|
20 |
# Mapping of nucleotides to float coordinates
|
21 |
mapping_easy = {
|
@@ -857,12 +855,15 @@ with ui.navset_card_tab(id="tab"):
|
|
857 |
############################################################# Plotting ########################################################
|
858 |
here = Path(__file__).parent
|
859 |
@render.plot
|
|
|
860 |
def plot():
|
861 |
#ds = load_dataset('Hack90/virus_tiny')
|
862 |
df = pd.read_parquet('virus_ds.parquet')
|
863 |
df = df[df['Organism_Name'].isin(input.virus_selector())]
|
864 |
# group by virus
|
865 |
grouped = df.groupby('Organism_Name')['Sequence'].apply(list)
|
|
|
|
|
866 |
# plot the comparison
|
867 |
fig = None
|
868 |
if input.plot_type() == "2D Line":
|
|
|
14 |
import matplotlib.pyplot as plt
|
15 |
import matplotlib.style as mplstyle
|
16 |
from pathlib import Path
|
|
|
|
|
17 |
|
18 |
# Mapping of nucleotides to float coordinates
|
19 |
mapping_easy = {
|
|
|
855 |
############################################################# Plotting ########################################################
|
856 |
here = Path(__file__).parent
|
857 |
@render.plot
|
858 |
+
import matplotlib as mpl
|
859 |
def plot():
|
860 |
#ds = load_dataset('Hack90/virus_tiny')
|
861 |
df = pd.read_parquet('virus_ds.parquet')
|
862 |
df = df[df['Organism_Name'].isin(input.virus_selector())]
|
863 |
# group by virus
|
864 |
grouped = df.groupby('Organism_Name')['Sequence'].apply(list)
|
865 |
+
mpl.rcParams.update(mpl.rcParamsDefault)
|
866 |
+
|
867 |
# plot the comparison
|
868 |
fig = None
|
869 |
if input.plot_type() == "2D Line":
|