larry._datasets.klein_lab_pp_recipe¶
Submodules¶
Package Contents¶
Classes¶
Functions¶
|
|
|
Calculate v-score (above-Poisson noise statistic) for genes in the input sparse counts matrix |
|
Filter genes by expression level and variability |
|
Remove signature-correlated genes from a list of test genes |
- larry._datasets.klein_lab_pp_recipe.cell_cycle_genes(genes_added=[])¶
- class larry._datasets.klein_lab_pp_recipe.RunningQuantile(n_bins: int = 50)¶
- __call__(x, y, p)¶
calculate the quantile of y in bins of x
- larry._datasets.klein_lab_pp_recipe.vscores(E, min_mean=0, nBins=50, fit_percentile=0.1, error_wt=1)¶
Calculate v-score (above-Poisson noise statistic) for genes in the input sparse counts matrix Return v-scores and other stats
- larry._datasets.klein_lab_pp_recipe.highly_variable_genes(adata, base_ix=[], min_vscore_pctl=85, min_counts=3, min_cells=3, show_vscore_plot=False, sample_name='', return_idx=False)¶
Filter genes by expression level and variability Return list of filtered gene indices
Remove signature-correlated genes from a list of test genes
- E: scipy.sparse.csc_matrix, shape (n_cells, n_genes)
full counts matrix
- gene_list: numpy array, shape (n_genes,)
full gene list
- exclude_corr_genes_list: list of list(s)
Each sublist is used to build a signature. Test genes correlated with this signature will be removed
- test_gene_idx: 1-D numpy array
indices of genes to test for correlation with the gene signatures from exclude_corr_genes_list
- min_corr: float (default=0.1)
Test genes with a Pearson correlation of min_corr or higher with any of the gene sets from exclude_corr_genes_list will be excluded
numpy array of gene indices (subset of test_gene_idx) that are not correlated with any of the gene signatures