Skip to content

Commit

Permalink
removed insert size axis for cov only plots
Browse files Browse the repository at this point in the history
  • Loading branch information
jbelyeu committed Jan 7, 2021
1 parent 81e9b60 commit efb54ae
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 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.21"
__version__ = "1.1.0"
8 changes: 6 additions & 2 deletions samplot/samplot.py
Original file line number Diff line number Diff line change
Expand Up @@ -2812,6 +2812,7 @@ def plot_samples(
max_coverage_points,
max_coverage,
marker_size,
coverage_only,
):

"""Plots all samples
Expand Down Expand Up @@ -2945,10 +2946,12 @@ def plot_samples(
curr_ax.tick_params(axis="y", labelsize=yaxis_label_fontsize)
# if there's one hp, 6 ticks fit. Otherwise, do 3
tick_count = 6 if len(hps) == 1 else 3
#curr_ax.yaxis.set_major_locator(ticker.FixedLocator(tick_count))
curr_ax.yaxis.set_major_locator(ticker.LinearLocator(tick_count))
curr_ax.tick_params(axis="both", length=0)
curr_ax.set_xticklabels([])
if coverage_only:
curr_ax.yaxis.set_visible(False)

last_sample_num = number_of_axes - 1
if annotation_files:
last_sample_num -= len(annotation_files)
Expand Down Expand Up @@ -2987,7 +2990,7 @@ def plot_samples(
curr_ax.set_xticklabels(labels, fontsize=xaxis_label_fontsize)
chrms = [x.chrm for x in ranges]
curr_ax.set_xlabel("Chromosomal position on " + "/".join(chrms), fontsize=8)

curr_ax = axs[hps[int(len(hps) / 2)]]
curr_ax.set_ylabel("Insert size", fontsize=8)
cover_ax = cover_axs[hps[int(len(hps) / 2)]]
Expand Down Expand Up @@ -3601,6 +3604,7 @@ def plot(parser):
options.max_coverage_points,
max_coverage,
marker_size,
options.coverage_only,
)
# plot legend
plot_legend(fig, options.legend_fontsize, marker_size)
Expand Down

0 comments on commit efb54ae

Please sign in to comment.