alphagenome.visualization.plot_transcripts.draw_transcript#
- alphagenome.visualization.plot_transcripts.draw_transcript(ax, transcript, interval, y, cds_height=0.7, utr_height=0.35, cds_color='#7f7f7f', utr5_color='#ff7f0e', utr3_color='#1f77b4', first_noncoding_exon_color='#2ca02c', shift=0, label=None, label_color='#7f7f7f', **kwargs)[source]#
Draw an individual transcript as rectangular components on an axis.
CDS = protein coding sequence. UTR = untranslated region.
This function is used by
plot_transcripts
.- Parameters:
ax (
Axes
) – Matplotlib axis onto which to draw the transcript.transcript (
Transcript
) – Transcript to draw.interval (
Interval
) – Genomic interval at which to visualize the transcript.y (
float
) – Vertical position at which to draw the transcript.cds_height (
float
(default:0.7
)) – CDS height.utr_height (
float
(default:0.35
)) – UTR height.cds_color (
str
(default:'#7f7f7f'
)) – CDS color in hex string format.utr5_color (
str
(default:'#ff7f0e'
)) – 5’ UTR color in hex string format.utr3_color (
str
(default:'#1f77b4'
)) – 3’ UTR color in hex string format.first_noncoding_exon_color (
str
(default:'#2ca02c'
)) – Color of the first non-coding exon. This helps to indicate transcript directionality. Hex string format.shift (
int
(default:0
)) – X-axis shift.label (
Optional
[str
] (default:None
)) – Optional label to draw next to the transcript.label_color (
str
(default:'#7f7f7f'
)) – Label color.**kwargs – Additional keyword arguments passed to matplotlib plotting functions.
- Return type: