Skip to content
Snippets Groups Projects
Commit 6ceb7504 authored by Blaise Li's avatar Blaise Li
Browse files

Catching more errors due to bad data.

parent f3ba3c72
No related branches found
No related tags found
No related merge requests found
......@@ -139,6 +139,10 @@ from smwrappers import wrappers_dir
NO_DATA_ERRS = [
"Empty 'DataFrame': no numeric data to plot",
"no numeric data to plot"]
BAD_DATA_ERRS = [
"`dataset` input should have multiple elements.",
"array must not contain infs or NaNs",
"zero-size array to reduction operation fmax which has no identity"]
alignment_settings = {"bowtie2": "", "hisat2": "", "crac": "-k 20 --stranded --use-x-in-cigar"}
......@@ -1673,12 +1677,7 @@ rule test_size_factor:
else:
raise
except ValueError as e:
if str(e) == "`dataset` input should have multiple elements.":
warn("\n".join([
"Got ValueError:", f"{str(e)}",
f"Data cannot be plotted for {normalizer}",
f"{data}\n"]))
elif str(e) == "array must not contain infs or NaNs":
if str(e) in BAD_DATA_ERRS:
warn("\n".join([
"Got ValueError:", f"{str(e)}",
f"Data cannot be plotted for {normalizer}",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment