Commit 430fe610 authored by Blaise Li's avatar Blaise Li
Browse files

Error message may change?

parent a26939b3
......@@ -109,6 +109,11 @@ from libworkflows import read_feature_counts, sum_feature_counts
from smincludes import rules as irules
from smwrappers import wrappers_dir
NO_DATA_ERRS = [
"Empty 'DataFrame': no numeric data to plot",
"no numeric data to plot"]
alignment_settings = {"bowtie2": "", "hisat2": "", "crac": "-k 20 --stranded --use-x-in-cigar"}
# Possible feature ID conversions
......@@ -1609,7 +1614,7 @@ rule test_size_factor:
format="pdf",
title=params.counts_distrib_plot_title.format(normalizer))
except TypeError as e:
if str(e) == "Empty 'DataFrame': no numeric data to plot":
if str(e) == in no_data_errs:
warn("\n".join([
"Got TypeError:",
f"{str(e)}",
......@@ -2030,7 +2035,7 @@ rule make_contrast_lfc_boxplots:
wildcards.fold_type,
title=title)
except TypeError as err:
if str(err) == "Empty 'DataFrame': no numeric data to plot":
if str(err) in NO_DATA_ERRS:
warn("\n".join([
"Got TypeError:",
f"{str(err)}",
......
......@@ -142,6 +142,11 @@ from smincludes import rules as irules
from smwrappers import wrappers_dir
strip = str.strip
NO_DATA_ERRS = [
"Empty 'DataFrame': no numeric data to plot",
"no numeric data to plot"]
alignment_settings = {"bowtie2": "-L 6 -i S,1,0.8 -N 0"}
# Positions in small RNA sequences for which to analyse nucleotide distribution
......@@ -1665,7 +1670,7 @@ rule test_size_factor:
format="pdf",
title=params.counts_distrib_plot_title.format(normalizer))
except TypeError as e:
if str(e) == "Empty 'DataFrame': no numeric data to plot":
if str(e) in NO_DATA_ERRS:
warn("\n".join([
"Got TypeError:",
f"{str(e)}",
......
......@@ -199,6 +199,11 @@ from smincludes import rules as irules
from smwrappers import wrappers_dir
strip = str.strip
NO_DATA_ERRS = [
"Empty 'DataFrame': no numeric data to plot",
"no numeric data to plot"]
alignment_settings = {"bowtie2": "-L 6 -i S,1,0.8 -N 0"}
# Positions in small RNA sequences for which to analyse nucleotide distribution
......@@ -2543,7 +2548,7 @@ rule test_size_factor:
format="pdf",
title=params.counts_distrib_plot_title.format(normalizer))
except TypeError as e:
if str(e) == "Empty 'DataFrame': no numeric data to plot":
if str(e) in NO_DATA_ERRS:
warn("\n".join([
"Got TypeError:",
f"{str(e)}",
......@@ -3895,7 +3900,7 @@ rule make_gene_list_lfc_boxplots:
lfcs, wildcards.fold_type,
title=title)
except TypeError as err:
if str(err) == "Empty 'DataFrame': no numeric data to plot":
if str(err) in NO_DATA_ERRS:
warn("\n".join([
"Got TypeError:",
f"{str(err)}",
......@@ -3958,7 +3963,7 @@ rule make_contrast_lfc_boxplots:
wildcards.fold_type,
title=title)
except TypeError as err:
if str(err) == "Empty 'DataFrame': no numeric data to plot":
if str(err) in NO_DATA_ERRS:
warn("\n".join([
"Got TypeError:",
f"{str(err)}",
......
Supports Markdown
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