dynamo.pp.filter_genes_by_outliers¶
- dynamo.pp.filter_genes_by_outliers(adata, filter_bool=None, layer='all', min_cell_s=1, min_cell_u=1, min_cell_p=1, min_avg_exp_s=1e-10, min_avg_exp_u=0, min_avg_exp_p=0, max_avg_exp=inf, min_count_s=0, min_count_u=0, min_count_p=0, shared_count=30, inplace=False)[source]¶
Basic filter of genes based a collection of expression filters.
- Parameters:
adata (
AnnData) – an AnnData object.filter_bool (
Optional[ndarray] (default:None)) – A boolean array from the user to select genes for downstream analysis. Defaults to None.layer (
str(default:'all')) – the data from a particular layer (include X) used for feature selection. Defaults to “all”.min_cell_s (
int(default:1)) – minimal number of cells with expression for the data in the spliced layer (also used for X). Defaults to 1.min_cell_u (
int(default:1)) – minimal number of cells with expression for the data in the unspliced layer. Defaults to 1.min_cell_p (
int(default:1)) – minimal number of cells with expression for the data in the protein layer. Defaults to 1.min_avg_exp_s (
float(default:1e-10)) – minimal average expression across cells for the data in the spliced layer (also used for X). Defaults to 1e-10.min_avg_exp_u (
float(default:0)) – minimal average expression across cells for the data in the unspliced layer. Defaults to 0.min_avg_exp_p (
float(default:0)) – minimal average expression across cells for the data in the protein layer. Defaults to 0.max_avg_exp (
float(default:inf)) – maximal average expression across cells for the data in all layers (also used for X). Defaults to np.inf.min_count_s (
int(default:0)) – minimal number of counts (UMI/expression) for the data in the spliced layer (also used for X). Defaults to 0.min_count_u (
int(default:0)) – minimal number of counts (UMI/expression) for the data in the unspliced layer. Defaults to 0.min_count_p (
int(default:0)) – minimal number of counts (UMI/expression) for the data in the protein layer. Defaults to 0.shared_count (
int(default:30)) – the minimal shared number of counts for each genes across cell between layers. Defaults to 30.inplace (
bool(default:False)) – whether to update the layer inplace. Defaults to False.
- Return type:
Union[AnnData,DataFrame]- Returns:
An updated AnnData object with genes filtered if inplace is true. Otherwise, an array containing filtered genes.