SeqLogo#
- class alphagenome.visualization.plot_components.SeqLogo(scores, scores_interval, fig_height=1.0, alphabet='ACGT', max_width=1000, ylabel='', ylabel_horizontal=True, ylim=None, **kwargs)[source]#
Visualizes a sequence logo.
Initializes the
SeqLogocomponent.- Parameters:
scores (
Float32[ndarray, 'S A']) – A numpy array of shape (sequence_length, alphabet_size) containing the sequence logo scores.scores_interval (
Interval) – The genomic interval corresponding to the scores.fig_height (
float(default:1.0)) – The height of the figure.alphabet (
str(default:'ACGT')) – The alphabet used in the sequence logo.max_width (
int(default:1000)) – The maximum width of the sequence logo to plot.ylabel (
str(default:'')) – An optional label for the y-axis.ylabel_horizontal (
bool(default:True)) – Whether to make the y-axis label horizontal.ylim (
tuple[float,float] |None(default:None)) – An optional range to set for the y-axis.**kwargs – Additional keyword arguments to pass to the plotting function.
Methods
|
Returns the height of the axis. |
|
Plots the sequence logo on the given axis. |