diff --git a/RNA_Seq_Cecere/RNA-seq.snakefile b/RNA_Seq_Cecere/RNA-seq.snakefile index 663e409dfd42ed6f0e879025c81bd71afa3176cd..165feb93abb7b4a762c204efbbe32373b94cf12d 100644 --- a/RNA_Seq_Cecere/RNA-seq.snakefile +++ b/RNA_Seq_Cecere/RNA-seq.snakefile @@ -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}",