Commit 849375f5 authored by Blaise Li's avatar Blaise Li
Browse files

Plot paired scatterplots and compute RPM.

Made paired scatterplot plotting function part of libhts as
`plot_paired_scatters`. Modifications in small RNA-seq pipeline not
tested.
parent 973a02ec
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
......@@ -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()
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment