diff --git a/libhts/__init__.py b/libhts/__init__.py index 4b8022bb4ca900ae802bc0b60fe9e3711a3c2de4..efc99af6c65d15876f7e985bdf8a184513540c15 100644 --- a/libhts/__init__.py +++ b/libhts/__init__.py @@ -1 +1 @@ -from .libhts import do_deseq2, gtf_2_genes_exon_lengths, median_ratio_to_pseudo_ref_size_factors, plot_boxplots, plot_counts_distribution, plot_lfc_distribution, plot_MA, plot_norm_correlations, plot_scatter, repeat_bed_2_lengths, size_factor_correlations, spikein_gtf_2_lengths, status_setter +from .libhts import do_deseq2, gtf_2_genes_exon_lengths, median_ratio_to_pseudo_ref_size_factors, plot_boxplots, plot_counts_distribution, plot_lfc_distribution, plot_MA, plot_norm_correlations, plot_paired_scatters, plot_scatter, repeat_bed_2_lengths, size_factor_correlations, spikein_gtf_2_lengths, status_setter diff --git a/libhts/libhts.py b/libhts/libhts.py index e708d35e3a4492c783574467c078dd133d7cc422..edce5a927303e7499e4a456b3f1c3a8e166bc858 100644 --- a/libhts/libhts.py +++ b/libhts/libhts.py @@ -506,3 +506,12 @@ def plot_scatter(data, else: ax.set_ylim(y_range) return ax + +def plot_paired_scatters(data, columns=None, hue=None): + """Alternative to pairplot, in order to avoid histograms on the diagonal.""" + if columns is None: + columns = data.columns + g = sns.PairGrid(data, vars=columns, hue=hue, size=8) + #g.map_offdiag(plt.scatter, marker=".") + g.map_lower(plt.scatter, marker=".") + g.add_legend()