aboutsummaryrefslogtreecommitdiff
path: root/gn2/wqflask/marker_regression/exceptions.py
diff options
context:
space:
mode:
Diffstat (limited to 'gn2/wqflask/marker_regression/exceptions.py')
-rw-r--r--gn2/wqflask/marker_regression/exceptions.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/gn2/wqflask/marker_regression/exceptions.py b/gn2/wqflask/marker_regression/exceptions.py
new file mode 100644
index 00000000..8c7e822b
--- /dev/null
+++ b/gn2/wqflask/marker_regression/exceptions.py
@@ -0,0 +1,13 @@
+"""Mapping Exception classes."""
+
+class NoMappingResultsError(Exception):
+ "Exception to raise if no results are computed."
+
+ def __init__(self, trait, dataset, mapping_method):
+ self.trait = trait
+ self.dataset = dataset
+ self.mapping_method = mapping_method
+ self.message = (
+ f"The mapping of trait '{trait}' from dataset '{dataset}' using "
+ f"the '{mapping_method}' mapping method returned no results.")
+ super().__init__(self.message, trait, mapping_method)