Skip to content

Commit

Permalink
tweaked behavior of same_yaxis_scales to decrease cutoff at top
Browse files Browse the repository at this point in the history
  • Loading branch information
jbelyeu committed Sep 18, 2020
1 parent 0b2e59b commit fa643e9
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
2 changes: 1 addition & 1 deletion samplot/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/usr/bin/env python
__version__ = "1.0.18"
__version__ = "1.0.19"
2 changes: 1 addition & 1 deletion samplot/samplot.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
15 changes: 15 additions & 0 deletions test/func/samplot_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down

0 comments on commit fa643e9

Please sign in to comment.