scvi.data.organize_cite_seq_10x

scvi.data.organize_cite_seq_10x(adata, copy=False)[source]

Organize anndata object loaded from 10x for scvi models.

Parameters
adata : AnnDataAnnData

AnnData object with RNA and protein data in .X

copy : boolbool (default: False)

Whether to copy the anndata object

Return type

None | AnnDataOptional[AnnData]

Returns

If copy is True, returns anndata object organized for input to scvi models

Else, updates the anndata inplace

Examples

>>> adata = scanpy.read_10x_h5(<path_to_10x_h5_file>, gex_only=False)
>>> adata
AnnData object with n_obs × n_vars = 713 × 33555
    var: 'gene_ids', 'feature_types', 'genome'
>>> organize_cite_seq_10x(adata)
>>> adata
AnnData object with n_obs × n_vars = 713 × 33538
    var: 'gene_ids', 'feature_types', 'genome'
    obsm: 'protein_expression'