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 0x7fe3ccdbcff0>
)) – A function definining how thecdr3_col
columns should be merged, in case multiple ones were specified. (e.g. sum, mean, median, etc).normalize (
Union
[str
,bool
,None
] (default:None
)) – If True, compute fractions of abundances relative to thecdr3_col
column 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 theMuData
object. if anAnnData
object 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