Skip to content

Commit fa643e9

Browse files
committed
tweaked behavior of same_yaxis_scales to decrease cutoff at top
1 parent 0b2e59b commit fa643e9

3 files changed

Lines changed: 17 additions & 2 deletions

File tree

samplot/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
#!/usr/bin/env python
2-
__version__ = "1.0.18"
2+
__version__ = "1.0.19"

samplot/samplot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ def plot_coverage(
315315
cover_y_all = np.array(cover_y_all)
316316

317317
if max_coverage > 0 and same_yaxis_labels:
318-
max_plot_depth = max_coverage
318+
max_plot_depth = max_coverage+5
319319
elif cover_y_all.max() > 3 * cover_y_all.mean():
320320
max_plot_depth = max(
321321
np.percentile(cover_y_all, 99.5), np.percentile(cover_y_all, 99.5)

test/func/samplot_test.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,21 @@ if [ $basic_operation ]; then
3131
assert_no_stderr
3232
fi
3333

34+
rm -f $out_file_name
35+
run same_yaxis \
36+
samplot plot \
37+
-c $sv_chrm -s $sv_start -e $sv_end \
38+
-b $bam_1 \
39+
-o $out_file_name \
40+
-t $sv_type \
41+
--same_yaxis_scales
42+
if [ $basic_operation ]; then
43+
assert_exit_code 0
44+
assert_equal $out_file_name $( ls $out_file_name )
45+
assert_no_stdout
46+
assert_no_stderr
47+
fi
48+
3449
out_file_name=$func_path"test_zoom.png"
3550
rm -f $out_file_name
3651
run basic_operation_zoom \

0 commit comments

Comments
 (0)