EpiCarousel
latest
  • Installation
  • Usage Principles
  • API
    • Carousel
      • epicarousel.core.Carousel
        • Carousel
    • Data processing
    • Metacell identification
    • Metacell aggregation
    • Downstream analysis
    • Evaluation
  • Release
EpiCarousel
  • API
  • epicarousel.core.Carousel
  • Edit on GitHub

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:

data_split()

Partition data sequentially into chunks.

delete_dirs()

Remove intermediate files.

identify_metacells()

Identify metacells.

make_dirs()

# Create output directories.

merge_metacells()

Aggregate metacells from each chunk.

metacell_data_clustering()

Cluster metacells.

metacell_preprocess([neighbors_method])

Preprocess metacells.

result_comparison()

Evaluation using four clustering strategies.

shuffle_data()

Shuffle the initial data.

Previous Next

© Copyright 2023, BioX-NKU. Revision 19715449.

Built with Sphinx using a theme provided by Read the Docs.