diff --git a/libhts/libhts.py b/libhts/libhts.py index d17c61a161a026dfea98fcba537901e53347b825..c41a4f8ed189e2d391f4be7c9e6d772ff3f96b32 100644 --- a/libhts/libhts.py +++ b/libhts/libhts.py @@ -648,7 +648,8 @@ def plot_MA(res, It can also be "lfcMLE", which is based on uncorrected values. This may not be good for genes with low expression levels.""" # if not len(res): - if not res: + # if not res: + if res.empty: raise ValueError("No data to plot.") fig, axis = plt.subplots() # Make a column indicating whether the gene is DE or NS @@ -746,7 +747,8 @@ def plot_scatter(data, # No rows # if not len(data): # Does it work like that too? - if not data: + # if not data: + if data.empty: raise ValueError("No data to plot.") # fig, axis = plt.subplots() _, axis = plt.subplots()