scanpy_plus.tl.tryumap module¶
- scanpy_plus.tl.tryumap.tryumap(adata, reqCols=['total_counts'], regress_vars=['S_score', 'G2M_score'], regress=0, scale=True, n_jobs=4, use_highly_variable=True, ncols=4, n_pcs=50, n_neighbors=15, knn=True, max_value_scale=8, save_prefix=None, reset_fig_params=True, **kwargs)¶
Generates UMAP from anndata¶
Input MUST be LOGNORM. If adata.X is scaled then use scale = False option
Try generating umap, plot reqCols. data: anndata. Expects anndata with logcounts as X. regress: bool. If you want to regress out regressed_vars then set it to 1 scale: True. Scale the data. This assumes that X is lognormed n_jobs: int. n procs for regress job use_highly_variable: bool. Used by sc.tl.pca ncols: int. Cols per row in UMAP. Used by sc.pl.umap n_pcs: int. Number of pcs to be used for sc.pp.neigbors n_neighbors, knn: int. Use by sc.pp.neighbours max_value_scale: float. Used by sc.pp.scale save_prefix: str. Write h5ad file as savedir_time.h5ad kwargs: UMAP arguments
returns: anndata.
Example: tryumap(adata.copy(), reqCols = [‘doublet_score’, ‘leiden’], regress = 0, n_jobs = 8, savedir=”outputdir/prefixname”) No regression, scale data. Here n_jobs var will not be used as no sc.pp.regress_out will be run.