From fa643e974bb6f98e73abbcd79d2cf95a543e043a Mon Sep 17 00:00:00 2001 From: jbelyeu Date: Fri, 18 Sep 2020 10:20:02 -0600 Subject: [PATCH] tweaked behavior of same_yaxis_scales to decrease cutoff at top --- samplot/__init__.py | 2 +- samplot/samplot.py | 2 +- test/func/samplot_test.sh | 15 +++++++++++++++ 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/samplot/__init__.py b/samplot/__init__.py index e1e07c5..b9c27dd 100644 --- a/samplot/__init__.py +++ b/samplot/__init__.py @@ -1,2 +1,2 @@ #!/usr/bin/env python -__version__ = "1.0.18" +__version__ = "1.0.19" diff --git a/samplot/samplot.py b/samplot/samplot.py index ffbd408..0736ab6 100755 --- a/samplot/samplot.py +++ b/samplot/samplot.py @@ -315,7 +315,7 @@ def plot_coverage( cover_y_all = np.array(cover_y_all) if max_coverage > 0 and same_yaxis_labels: - max_plot_depth = max_coverage + max_plot_depth = max_coverage+5 elif cover_y_all.max() > 3 * cover_y_all.mean(): max_plot_depth = max( np.percentile(cover_y_all, 99.5), np.percentile(cover_y_all, 99.5) diff --git a/test/func/samplot_test.sh b/test/func/samplot_test.sh index 9df466c..0f2c849 100755 --- a/test/func/samplot_test.sh +++ b/test/func/samplot_test.sh @@ -31,6 +31,21 @@ if [ $basic_operation ]; then assert_no_stderr fi +rm -f $out_file_name +run same_yaxis \ + samplot plot \ + -c $sv_chrm -s $sv_start -e $sv_end \ + -b $bam_1 \ + -o $out_file_name \ + -t $sv_type \ + --same_yaxis_scales +if [ $basic_operation ]; then + assert_exit_code 0 + assert_equal $out_file_name $( ls $out_file_name ) + assert_no_stdout + assert_no_stderr +fi + out_file_name=$func_path"test_zoom.png" rm -f $out_file_name run basic_operation_zoom \