epicarousel.core.Carousel
- class epicarousel.core.Carousel(data_name, data_dir, if_bi=1, if_mc_bi=1, threshold=0.0, filter_rate=0.01, chunk_size=10000, carousel_resolution=10, base='/home/metacell/data/metacell/carousel/output', step=4, threads=8, mc_mode='average', index='cell_type', neighbors_method='umap', n_components=50, svd_solver='arpack', shuffle=0, random_state=1)
- __init__(data_name, data_dir, if_bi=1, if_mc_bi=1, threshold=0.0, filter_rate=0.01, chunk_size=10000, carousel_resolution=10, base='/home/metacell/data/metacell/carousel/output', step=4, threads=8, mc_mode='average', index='cell_type', neighbors_method='umap', n_components=50, svd_solver='arpack', shuffle=0, random_state=1)
- Args:
data_name: Name of data.
data_dir: Path of an h5ad file where the scCAS data count matrix is stored in the compressed sparse row format. AnnData object of shape
n_obs×n_vars. Rows correspond to cells and columns to peaks/regions.if_bi: Whether to binarize the scCAS data count matrix.
if_mc_bi: Whether to binarize the metacell-by-region matrix.
threshold: Threshold for binarizing metacell-by-region matrix.
filter_rate: Proportion for feature selection.
chunk_size: Number of cells in each chunk.
carousel_resolution: Ratio of the number of cells to that of metacells.
base: Export path for EpiCarousel.
step: Length of Walktrap community detection.
threads: Number of parallel processes.
mc_mode: Mode of calculating metacell-by-region matrix.
index: (Optional) Ground truth cell type label of single cells for downstream analysis and evaluation.
Methods
__init__(data_name, data_dir[, if_bi, ...])Args:
Partition data sequentially into chunks.
Remove intermediate files.
Identify metacells.
# Create output directories.
Aggregate metacells from each chunk.
Cluster metacells.
metacell_preprocess([neighbors_method])Preprocess metacells.
Evaluation using four clustering strategies.
shuffle_data()Shuffle the initial data.