scirpy.pl.vdj_usage¶
-
scirpy.pl.
vdj_usage
(adata, *, vdj_cols=['TRA_1_j_gene', 'TRA_1_v_gene', 'TRB_1_v_gene', 'TRB_1_d_gene', 'TRB_1_j_gene'], normalize_to=None, ax=None, bar_clip=5, top_n=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.
- Parameters
- adata :
AnnData
AnnData
AnnData object to work on.
- vdj_cols :
list
list
(default:['TRA_1_j_gene', 'TRA_1_v_gene', 'TRB_1_v_gene', 'TRB_1_d_gene', 'TRB_1_j_gene']
) Columns containing gene segment information. Overwrite default only if you know what you are doing!
- normalize_to :
None
,str
,Sequence
[float
]Union
[None
,str
,Sequence
[float
]] (default:None
) 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
,None
Optional
[Axes
] (default:None
) Custom axis if needed.
- bar_clip :
int
int
(default:5
) The maximum number of stocks for bars (number of different V, D or J segments that should be shown separately).
- top_n :
None
,int
Optional
[int
] (default:10
) The maximum number of ribbons (individual VDJ combinations). If set to
None
, all ribbons are drawn.- barwidth :
float
float
(default:0.4
) Width of bars.
- draw_bars :
bool
bool
(default:True
) If
False
, only ribbons are drawn and no bars.- full_combination :
bool
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
,None
Optional
[dict
] (default:None
) Dictionary of keyword args that will be passed to the matplotlib figure (e.g.
figsize
)
- adata :
- Return type
- Returns
Axes object.