dotools_py.pp.sctransform_normalize#
- dotools_py.pp.sctransform_normalize(adata, batch_key=None, layer=None)[source]#
Normalization based on SCTransform.
This function performs an alternative normalization based on the SCTransform.
- Parameters:
- Return type:
- Returns:
Returns None. The input AnnData object will have two new layers containing the SCT counts and normalize data.
Example
>>> import dotools_py as do >>> adata = do.dt.example_10x_processed() >>> adata AnnData object with n_obs × n_vars = 700 × 1851 obs: 'batch', 'condition', 'n_genes_by_counts', 'log1p_n_genes_by_counts', 'total_counts', 'log1p_total_counts', 'total_counts_mt', 'log1p_total_counts_mt', 'pct_counts_mt', 'total_counts_ribo', 'log1p_total_counts_ribo', 'pct_counts_ribo', 'n_genes', 'n_counts', 'doublet_class', 'doublet_score', 'leiden', 'cell_type', 'autoAnnot', 'celltypist_conf_score', 'annotation', 'annotation_recluster' var: 'mean', 'std', 'highly_variable', 'means', 'dispersions', 'dispersions_norm', 'highly_variable_nbatches', 'highly_variable_intersection' uns: 'annotation_colors', 'annotation_recluster_colors', 'batch_colors', 'hvg', 'leiden', 'leiden_colors', 'log1p', 'neighbors', 'pca', 'umap' obsm: 'X_CCA', 'X_pca', 'X_umap' varm: 'PCs' layers: 'counts', 'logcounts' obsp: 'connectivities', 'distances' >>> >>> do.pp.sctransform_normalize(adata, batch_key="batch", layer="counts") >>> adata AnnData object with n_obs × n_vars = 700 × 1181 obs: 'batch', 'condition', 'n_genes_by_counts', 'log1p_n_genes_by_counts', 'total_counts', 'log1p_total_counts', 'total_counts_mt', 'log1p_total_counts_mt', 'pct_counts_mt', 'total_counts_ribo', 'log1p_total_counts_ribo', 'pct_counts_ribo', 'n_genes', 'n_counts', 'doublet_class', 'doublet_score', 'leiden', 'cell_type', 'autoAnnot', 'celltypist_conf_score', 'annotation', 'annotation_recluster' var: 'mean', 'std', 'highly_variable', 'means', 'dispersions', 'dispersions_norm', 'highly_variable_nbatches', 'highly_variable_intersection', 'SCT_rm' obsm: 'SCT_rm' varm: 'PCs' layers: 'counts', 'logcounts', 'SCT_norm', 'SCT_counts' obsp: 'connectivities', 'distances'