epiout.plot

Module Contents

Classes

CoveragePlot

Plot coverage of a given region for samples.

QQPlot

QQ plot for p-values.

CountsPlot

Plot observed vs expected counts.

RankPlot

Rank plot for samples for a given statistic.

VolconaPlot

Volcano plot for p-values and z-scores.

Functions

coverage_bigwig(bw, peak: epiout.dataclasses.Peak, rolling_percent=0.1)

Calculate coverage of a bigwig file for a given peak.

plot_coverage_line(df_bigwig, sample, peak: epiout.dataclasses.Peak, rolling_percent=0.1)

Plot coverage of a bigwig files for a given peak.

plot_coverage(samples, region, highlight_samples=None, aspect=1, color='#5a5a83', highlight_color='#b1615c', label=True)

Plot coverage of a given region for samples.

qq_plot(pvalues, highlight=None, ci=0.95, eps=1e-14)

QQ plot for p-values.

plot_counts(counts, counts_mean, highlight=None)

Plot observed vs expected counts.

plot_rank(stats, stats_name='score', highlight=None)

Rank plot for samples for a given statistic.

plot_volcona(pval, zscore, pval_cutoff=0.05, zscore_cutoff=(-1, 1))

Volcano plot for p-values and z-scores.

plot_umap(df_counts, color=None, legend_title='color')

Plot umap plot for counts.

plot_corr_heatmap(df_counts, row_var=None, cbar_pos=(-0.06, 0.45, 0.03, 0.2), cmap='twilight_shifted', vmin=-1, vmax=1)

Plot correlation heatmap between samples from counts.

epiout.plot.coverage_bigwig(bw, peak: epiout.dataclasses.Peak, rolling_percent=0.1)

Calculate coverage of a bigwig file for a given peak.

Parameters
  • bw – Path to bigwig file.

  • peak – Peak object.

  • rolling_percent – Percent of peak width for rolling mean.

Returns

Pandas dataframe with columns position and coverage.

epiout.plot.plot_coverage_line(df_bigwig, sample, peak: epiout.dataclasses.Peak, rolling_percent=0.1)

Plot coverage of a bigwig files for a given peak.

Parameters
  • df_bigwig – Pandas dataframe with columns sample and bigwig.

  • sample – Sample name.

  • peak – Peak object for the region.

  • rolling_percent – Percent of peak width for rolling mean.

class epiout.plot.CoveragePlot(samples, region, highlight_samples=None, color='#5a5a83', highlight_color='#b1615c', label=True, aspect=1)

Plot coverage of a given region for samples.

Parameters
  • samples – Dictionary of sample names and bigwig paths.

  • region – Region string.

  • highlight_samples – List of sample names to highlight.

  • color – Color of the coverage plot.

  • highlight_color – Color of the highlighted coverage plot.

  • color – Color of the coverage plot.

  • highlight_color – Color of the highlighted coverage plot.

  • label – Whether to label the samples.

  • aspect – Aspect ratio of the plot.

data(self)
_label(self, data, color)
_fill(self, data, color)
plot(self)
epiout.plot.plot_coverage(samples, region, highlight_samples=None, aspect=1, color='#5a5a83', highlight_color='#b1615c', label=True)

Plot coverage of a given region for samples.

Parameters
  • samples – Dictionary of sample names and bigwig paths.

  • region – Region string.

  • highlight_samples – List of sample names to highlight.

  • color – Color of the coverage plot.

  • highlight_color – Color of the highlighted coverage plot.

  • color – Color of the coverage plot.

  • highlight_color – Color of the highlighted coverage plot.

  • label – Whether to label the samples.

  • aspect – Aspect ratio of the plot.

class epiout.plot.QQPlot(pvalues, highlight=None, ci=0.95, eps=1e-14)

QQ plot for p-values.

Parameters
  • pvalues – as dataframe where each row is a sample and each column is a p-value.

  • highlight – List of sample names to highlight.

  • ci – Confidence interval for the expected p-values.

  • eps – Epsilon value to avoid zero p-values.

data(self)
plot(self)
epiout.plot.qq_plot(pvalues, highlight=None, ci=0.95, eps=1e-14)

QQ plot for p-values.

Parameters
  • pvalues – as dataframe where each row is a sample and each column is a p-value.

  • highlight – List of sample names to highlight.

  • ci – Confidence interval for the expected p-values.

  • eps – Epsilon value to avoid zero p-values.

class epiout.plot.CountsPlot(counts, counts_mean, highlight=None)

Plot observed vs expected counts.

Parameters
  • counts – Observed counts as dataframe where each row is a sample and columns are peaks.

  • counts_mean – Expected counts as dataframe where each row is a sample and columns are peaks.

  • highlight – List of sample names to highlight.

data(self)
plot(self)
epiout.plot.plot_counts(counts, counts_mean, highlight=None)

Plot observed vs expected counts.

Parameters
  • counts – Observed counts as dataframe where each row is a sample and columns are peaks.

  • counts_mean – Expected counts as dataframe where each row is a sample and columns are peaks.

  • highlight – List of sample names to highlight.

class epiout.plot.RankPlot(stats, stats_name='score', highlight=None)

Rank plot for samples for a given statistic.

Parameters
  • stats – Statistics as a list.

  • stats_name – Name of the statistic.

  • highlight – List of sample names to highlight.

data(self)
plot(self)
epiout.plot.plot_rank(stats, stats_name='score', highlight=None)

Rank plot for samples for a given statistic.

Parameters
  • stats – Statistics as a list.

  • stats_name – Name of the statistic.

  • highlight – List of sample names to highlight.

class epiout.plot.VolconaPlot(pval, zscore, pval_cutoff=0.05, zscore_cutoff=(- 1, 1))

Volcano plot for p-values and z-scores.

Parameters
  • pval – P-values as a list.

  • zscore – Z-scores as a list.

  • pval_cutoff – P-value cutoff for significance.

  • zscore_cutoff – Z-score cutoff for significance.

data(self)
plot(self)
epiout.plot.plot_volcona(pval, zscore, pval_cutoff=0.05, zscore_cutoff=(- 1, 1))

Volcano plot for p-values and z-scores.

Parameters
  • pval – P-values as a list.

  • zscore – Z-scores as a list.

  • pval_cutoff – P-value cutoff for significance.

  • zscore_cutoff – Z-score cutoff for significance.

epiout.plot.plot_umap(df_counts, color=None, legend_title='color')

Plot umap plot for counts.

Parameters
  • df_counts – Counts as dataframe where each row is a sample and columns are peaks.

  • color – Color of the points.

  • legend_title – Title of the legend.

epiout.plot.plot_corr_heatmap(df_counts, row_var=None, cbar_pos=(- 0.06, 0.45, 0.03, 0.2), cmap='twilight_shifted', vmin=- 1, vmax=1)

Plot correlation heatmap between samples from counts.

Parameters
  • df_counts – Counts as dataframe where each row is a sample and columns are peaks.

  • row_var – Variable to color the rows.

  • cbar_pos – Position of the colorbar.

  • cmap – Colormap.

  • vmin – Minimum value for the colorbar.

  • vmax – Maximum value for the colorbar.