pyrovelocity.data#
- pyrovelocity.data.assign_colors(max_spliced, max_unspliced, minlim_s, minlim_u)[source]#
- Return type:
List[str]
- pyrovelocity.data.copy_raw_counts(adata)[source]#
Copy unspliced and spliced raw counts to adata.layers and adata.obs.
- Parameters:
adata (anndata._core.anndata.AnnData) – AnnData object
- Returns:
AnnData object with raw counts.
- Return type:
anndata._core.anndata.AnnData
Examples
>>> from pyrovelocity.utils import generate_sample_data >>> adata = generate_sample_data() >>> copy_raw_counts(adata)
- pyrovelocity.data.get_high_us_genes(adata, minlim_u=0, minlim_s=0, unspliced_layer='unspliced', spliced_layer='spliced')[source]#
Function to select genes that have spliced and unspliced counts above a certain threshold. Genes of which the maximum u and s count is above a set threshold are selected. Threshold varies per dataset and influences the numbers of genes that are selected.
- Parameters:
adata – Annotated data matrix
minlim_u (int (default: 3)) – Threshold above which the maximum unspliced counts of a gene should fall to be included in the list of high US genes.
minlim_s (int (default: 3)) – Threshold above which the maximum spliced counts of a gene should fall to be included in the list of high US genes.
unspliced_layer (str (default: ‘unspliced’)) – Name of layer that contains the unspliced counts.
spliced_layer (str (default: ‘spliced’)) – Name of layer that contains the spliced counts.
- pyrovelocity.data.load_data(data='pancreas', top_n=2000, min_shared_counts=30, eps=1e-06, force=False, processed_path=None, process_cytotrace=False, use_sub=False, count_thres=0, thresh_histogram_path=None)[source]#
Preprocess data from scvelo.
- Parameters:
data (str, optional) – data set name. Defaults to scvelo’s “pancreas” data set.
top_n (int, optional) – number of genes to retain. Defaults to 2000.
min_shared_counts (int, optional) – minimum shared counts. Defaults to 30.
eps (float, optional) – tolerance. Defaults to 1e-6.
force (bool, optional) – force reprocessing. Defaults to False.
processed_path (str, optional) – path to read/write processed AnnData. Defaults to None.
- Returns:
processed AnnData object
- Return type:
anndata._core.anndata.AnnData
- pyrovelocity.data.load_larry(file_path='data/external/larry.h5ad')[source]#
In vitro Hemotopoiesis Larry datasets
Data from `CALEB WEINREB et al. (2020) <DOI: 10.1126/science.aaw3381>’ https://figshare.com/ndownloader/articles/20780344/versions/1
- Return type:
Returns adata object
- pyrovelocity.data.load_pbmc68k(data='pbmc68k', count_thres=0, thresh_histogram_path=None)[source]#
- Return type:
AnnData
- pyrovelocity.data.load_unipotent_larry(celltype='mono')[source]#
In vitro Hemotopoiesis Larry datasets Subset of Data from `CALEB WEINREB et al. (2020) <DOI: 10.1126/science.aaw3381>’ unipotent monocytes: https://figshare.com/ndownloader/files/37028572 unipotent neutrophils: https://figshare.com/ndownloader/files/37028575
- Return type:
Returns adata object