scirpy.pl.spectratype#
- scirpy.pl.spectratype(adata, chain='VJ_1', *, color, cdr3_col='junction_aa', combine_fun=<function sum>, normalize=None, viztype='bar', airr_mod='airr', airr_key='airr', chain_idx_key='chain_indices', **kwargs)#
Show the distribution of CDR3 region lengths.
`Show the distribution of CDR3 region lengths.
Ignores NaN values.
- Parameters:
adata (
Union[AnnData,MuData,DataHandler]) – AnnData or MuData object that contains AIRR information.chain (
Union[Literal['VJ_1','VJ_2','VDJ_1','VDJ_2'],Sequence[Literal['VJ_1','VJ_2','VDJ_1','VDJ_2']]] (default:'VJ_1')) – One or multiple chains to include in the plot.color (
str) – Color by this column fromobs. E.g. sample or diagnosiscdr3_col (
str(default:'junction_aa')) – AIRR rearrangement column from which sequences are obtainedcombine_fun (
Callable(default:<function sum at 0x7f53973b02b0>)) – A function definining how thecdr3_colcolumns should be merged, in case multiple ones were specified. (e.g. sum, mean, median, etc).normalize (
None|str|bool(default:None)) – If True, compute fractions of abundances relative to thecdr3_colcolumn rather than reporting abosolute numbers. Alternatively, the name of a column containing a categorical variable can be provided according to which the values will be normalized.viztype (
Literal['bar','line','curve'] (default:'bar')) – Type of plot to produce.airr_mod (default:
'airr') – Name of the modality with AIRR information is stored in theMuDataobject. if anAnnDataobject is passed to the function, this parameter is ignored.airr_key (default:
'airr') – Key under which the AIRR information is stored in adata.obsm as an awkward array.chain_idx_key (default:
'chain_indices') – Key under which the chain indices are stored in adata.obsm. If chain indices are not present,index_chains()is run with default parameters.**kwargs – Additional parameters passed to the base plotting function
- Return type:
- Returns:
Axes object