Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Blaise LI
libhts
Commits
b13393e1
Commit
b13393e1
authored
Jul 08, 2020
by
Blaise Li
Browse files
Update test for empty DataFrame.
parent
1c0ae101
Changes
1
Hide whitespace changes
Inline
Side-by-side
libhts/libhts.py
View file @
b13393e1
...
@@ -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
()
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment