, *, vdj_cols=('IR_VJ_1_v_call', 'IR_VJ_1_j_call', 'IR_VDJ_1_v_call', 'IR_VDJ_1_d_call', 'IR_VDJ_1_j_call'), normalize_to=False, ax=None, max_segments=None, max_labelled_segments=5, max_ribbons=10, barwidth=0.4, draw_bars=True, full_combination=True, fig_kws=None)

Creates a ribbon plot of the most abundant VDJ combinations.

Creates a ribbon plot of the most abundant VDJ combinations.

Currently works with primary alpha and beta chains only.

adata : AnnData

AnnData object to work on.

vdj_cols : Sequence (default: ('IR_VJ_1_v_call', 'IR_VJ_1_j_call', 'IR_VDJ_1_v_call', 'IR_VDJ_1_d_call', 'IR_VDJ_1_j_call'))

Columns containing gene segment information. Overwrite default only if you know what you are doing!

normalize_to : bool | str | Sequence[float]Union[bool, str, Sequence[float]] (default: False)

Either the name of a categorical column that should be used as the base for computing fractions, or an iterable specifying a size factor for each cell. By default, each cell count as 1, but due to normalization to different, for instance, sample sizes, it is possible that one cell in a small sample is weighted more than a cell in a large sample.

ax : Axes | NoneOptional[Axes] (default: None)

Custom axis if needed.

max_segments : int | NoneOptional[int] (default: None)

The maximum number of segments in a bar (number of different V, D or J segments that should be shown separately).

max_labelled_segments : int | NoneOptional[int] (default: 5)

The maximum number of segments that receive a gene label

max_ribbons : None | intOptional[int] (default: 10)

The maximum number of ribbons (individual VDJ combinations). If set to None, all ribbons are drawn. If full_combination=False, the max number of ribbons is additionally constrained by the number of segments.

barwidth : float (default: 0.4)

Width of bars.

draw_bars : bool (default: True)

If False, only ribbons are drawn and no bars.

full_combination : bool (default: True)

If set to False, the bands represent the frequency of a binary gene segment combination of the two connectec loci (e.g. combination of TRBD and TRBJ genes). By default each band represents an individual combination of all five loci.

fig_kws : dict | NoneOptional[dict] (default: None)

Dictionary of keyword args that will be passed to the matplotlib figure (e.g. figsize)

Return type



Axes object.