Commit b13393e1 authored by Blaise Li's avatar Blaise Li

Update test for empty DataFrame.

parent 1c0ae101
...@@ -648,7 +648,8 @@ def plot_MA(res, ...@@ -648,7 +648,8 @@ def plot_MA(res,
It can also be "lfcMLE", which is based on uncorrected values. It can also be "lfcMLE", which is based on uncorrected values.
This may not be good for genes with low expression levels.""" This may not be good for genes with low expression levels."""
# if not len(res): # if not len(res):
if not res: # if not res:
if res.empty:
raise ValueError("No data to plot.") raise ValueError("No data to plot.")
fig, axis = plt.subplots() fig, axis = plt.subplots()
# Make a column indicating whether the gene is DE or NS # Make a column indicating whether the gene is DE or NS
...@@ -746,7 +747,8 @@ def plot_scatter(data, ...@@ -746,7 +747,8 @@ def plot_scatter(data,
# No rows # No rows
# if not len(data): # if not len(data):
# Does it work like that too? # Does it work like that too?
if not data: # if not data:
if data.empty:
raise ValueError("No data to plot.") raise ValueError("No data to plot.")
# fig, axis = plt.subplots() # fig, axis = plt.subplots()
_, axis = plt.subplots() _, axis = plt.subplots()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment