Parameters

Defaults

metacells.parameters.significant_gene_fraction: float = 1e-05

The generic minimal “significant” gene fraction. See metacells.tools.high.find_high_fraction_genes().

metacells.parameters.significant_gene_normalized_variance: float = 5.656854249492381

The generic minimal “significant” gene normalized variance. See metacells.tools.high.find_high_normalized_variance_genes().

metacells.parameters.significant_gene_relative_variance: float = 0.1

The generic minimal “significant” gene relative variance. See metacells.tools.high.find_high_relative_variance_genes().

metacells.parameters.significant_gene_similarity: float = 0.1

The generic minimal “significant” gene similarity. See bursty_lonely_max_gene_similarity and rare_min_module_correlation.

metacells.parameters.significant_gene_fold_factor: float = 3.0

The generic “significant” fold factor. See deviants_min_gene_fold_factor rare_min_convincing_gene_fold_factor, and dissolve_min_convincing_gene_fold_factor.

metacells.parameters.significant_noisy_gene_fold_factor: float = 2.0

The generic additional “significant” fold factor for noisy genes, in addition to significant_gene_fold_factor. See deviants_min_gene_fold_factor and rare_min_convincing_gene_fold_factor, and dissolve_min_convincing_gene_fold_factor.

metacells.parameters.significant_value: int = 7

The generic minimal value (number of UMIs) we can say is “significant” given the technical noise. See rare_min_gene_maximum, rare_min_cell_module_total, and cells_similarity_value_regularization.

metacells.parameters.downsample_min_samples: int = 750

The generic minimal samples to use for downsampling the cells for some purpose. See bursty_lonely_downsample_min_samples, select_downsample_min_samples, and metacells.tools.downsample.downsample_cells().

metacells.parameters.downsample_min_cell_quantile: float = 0.05

The generic minimal quantile of the cells total size to use for downsampling the cells for some purpose. See bursty_lonely_downsample_min_cell_quantile, select_downsample_min_cell_quantile, and metacells.tools.downsample.downsample_cells().

metacells.parameters.downsample_max_cell_quantile: float = 0.5

The generic maximal quantile of the cells total size to use for downsampling the cells for some purpose. See bursty_lonely_downsample_max_cell_quantile, select_downsample_max_cell_quantile, and metacells.tools.downsample.downsample_cells().

metacells.parameters.relative_variance_window_size: int = 100

The window size to use to compute relative variance. See metacells.utilities.computation.relative_variance_per() and metacells.tools.high.find_high_relative_variance_genes().

metacells.parameters.similarity_method: str = 'abs_pearson'

The method to use to compute similarities. See metacells.tools.similarity.compute_obs_obs_similarity(), and metacells.tools.similarity.compute_var_var_similarity().

metacells.parameters.logistics_location: float = 0.8

The default location for the logistics function. See metacells.pipeline.umap.compute_umap_by_markers(), metacells.tools.similarity.compute_obs_obs_similarity(), metacells.tools.similarity.compute_var_var_similarity(). and metacells.utilities.computation.logistics().

metacells.parameters.logistics_slope: float = 0.5

The default slope for the logistics function. See metacells.pipeline.umap.compute_umap_by_markers(), metacells.tools.similarity.compute_obs_obs_similarity(), metacells.tools.similarity.compute_var_var_similarity(). and metacells.utilities.computation.logistics().

metacells.parameters.min_target_pile_size: int = 8000

The minimal target number of observations (cells) in a pile, allowing us to directly compute groups (metacells) for it. See metacells.pipeline.divide_and_conquer.compute_divide_and_conquer_metacells() and metacells.pipeline.divide_and_conquer.divide_and_conquer_pipeline().

metacells.parameters.max_target_pile_size: int = 24000

The maximal target number of observations (cells) in a pile, allowing us to directly compute groups (metacells) for it. See metacells.pipeline.divide_and_conquer.compute_divide_and_conquer_metacells() and metacells.pipeline.divide_and_conquer.divide_and_conquer_pipeline().

metacells.parameters.target_metacells_in_pile: int = 100

The target number of metacells computed in each pile. See metacells.pipeline.divide_and_conquer.compute_divide_and_conquer_metacells() and metacells.pipeline.divide_and_conquer.divide_and_conquer_pipeline().

metacells.parameters.target_metacell_size: int = 48

The generic target total metacell size (in cells). See metacells.pipeline.direct.compute_direct_metacells(), metacells.pipeline.divide_and_conquer.compute_divide_and_conquer_metacells() and metacells.pipeline.divide_and_conquer.divide_and_conquer_pipeline().

metacells.parameters.target_metacell_umis: int = 160000

The generic target total metacell total UMIs. See metacells.pipeline.direct.compute_direct_metacells(), metacells.pipeline.divide_and_conquer.compute_divide_and_conquer_metacells() and metacells.pipeline.divide_and_conquer.divide_and_conquer_pipeline().

metacells.parameters.metacell_geo_mean: bool = True

Whether to use geometrical mean to compute metacell gene fractions. See metacells.pipeline.collect.collect_metacells().

metacells.parameters.metacell_umis_regularization: float = 0.0625

The number of UMIs to use for regularization when computing metacell gene fractions geometrical mean. See metacells.pipeline.collect.collect_metacells().

metacells.parameters.zeros_cell_size_quantile: float = 0.1

The quantile of the cell sizes to use for computing the number of zero-valued cells. See metacells.pipeline.collect.collect_metacells().

metacells.parameters.cell_umis: ndarray | None = None

The number of UMIs in each cell for computing each metacell’s total UMIs. See metacells.pipeline.direct.compute_direct_metacells(), metacells.pipeline.divide_and_conquer.compute_divide_and_conquer_metacells(), metacells.pipeline.divide_and_conquer.divide_and_conquer_pipeline() and metacells.pipeline.collect.collect_metacells().

metacells.parameters.min_split_size_factor: float = 2.0

The generic maximal group size factor, above which we should split it. See piles_min_split_size_factor and candidates_min_split_size_factor.

metacells.parameters.min_robust_size_factor: float = 0.5

The generic minimal group size factor, below which we should consider dissolving it. See piles_min_robust_size_factor and dissolve_min_robust_size_factor.

metacells.parameters.max_merge_size_factor: float = 0.5

The generic maximal group size factor, below which we should merge it. See piles_max_merge_size_factor, candidates_max_merge_size_factor.

metacells.parameters.min_metacell_size: int = 12

The minimal number of cells in a metacell, below which we would merge it. See rare_min_cells_of_modules, metacells.tools.candidates.compute_candidate_metacells() and metacells.tools.dissolve.dissolve_metacells().

metacells.parameters.max_split_min_cut_strength: float = 0.1

The maximal strength of a min-cut of a metacell that will cause it to be split. See metacells.tools.candidates.compute_candidate_metacells().

metacells.parameters.min_cut_seed_cells: int = 7

The minimal number of cells to keep as a seed when cutting a metacell. See metacells.tools.candidates.compute_candidate_metacells().

metacells.parameters.piles_min_split_size_factor: float = 1.5

The minimal size factor of a pile, above which we can split it. See min_split_size_factor, metacells.pipeline.divide_and_conquer.compute_divide_and_conquer_metacells() and metacells.pipeline.divide_and_conquer.divide_and_conquer_pipeline().

metacells.parameters.piles_min_robust_size_factor: float = 0.3

The minimal pile size factor, below which we should consider dissolving it. See min_robust_size_factor, metacells.pipeline.divide_and_conquer.compute_divide_and_conquer_metacells() and metacells.pipeline.divide_and_conquer.divide_and_conquer_pipeline().

metacells.parameters.piles_max_merge_size_factor: float = 0.15

The maximal size factor of a pile, below which we should merge it. See min_robust_size_factor, max_merge_size_factor, metacells.pipeline.divide_and_conquer.compute_divide_and_conquer_metacells() and metacells.pipeline.divide_and_conquer.divide_and_conquer_pipeline().

metacells.parameters.properly_sampled_min_cell_total: int | None = None

The minimal total value for a cell to be considered “properly sampled”. See metacells.tools.properly_sampled.find_properly_sampled_cells() and metacells.pipeline.exclude.extract_clean_data().

Note

There’s no “reasonable” default value here. This must be tailored to the data.

metacells.parameters.properly_sampled_max_cell_total: int | None = None

The maximal total value for a cell to be considered “properly sampled”. See metacells.tools.properly_sampled.find_properly_sampled_cells() and metacells.pipeline.exclude.extract_clean_data().

Note

There’s no “reasonable” default value here. This must be tailored to the data.

metacells.parameters.properly_sampled_min_gene_total: int = 1

The minimal total value for a gene to be considered “properly sampled”. See metacells.tools.properly_sampled.find_properly_sampled_genes() and metacells.pipeline.exclude.extract_clean_data().

metacells.parameters.properly_sampled_max_excluded_genes_fraction: float | None = None

The maximal fraction of excluded gene UMIs from a cell for it to be considered “properly_sampled”. See metacells.tools.properly_sampled.find_properly_sampled_cells() and metacells.pipeline.exclude.extract_clean_data().

Note

There’s no “reasonable” default value here. This must be tailored to the data.

metacells.parameters.related_max_sampled_cells: int = 10000

The number of randomly selected cells to use for computing related genes. See metacells.pipeline.related_genes.relate_to_lateral_genes().

metacells.parameters.related_genes_similarity_method: str = 'abs_pearson'

How to compute gene-gene similarity for computing the related genes. See metacells.pipeline.related_genes.relate_to_lateral_genes().

metacells.parameters.related_genes_cluster_method: str = 'ward'

The hierarchical clustering method to use for computing the related genes. See metacells.pipeline.related_genes.relate_to_lateral_genes().

metacells.parameters.related_max_genes_of_modules: int = 64

The maximal number of genes in a related gene module. See metacells.pipeline.related_genes.relate_to_lateral_genes().

metacells.parameters.related_min_mean_gene_fraction: float = 1e-05

The minimal mean fraction of a related gene. See metacells.pipeline.related_genes.relate_to_lateral_genes().

metacells.parameters.related_min_gene_correlation: float = 0.1

The minimal correlation of a related gene to the base gene(s). See metacells.pipeline.related_genes.relate_to_lateral_genes().

metacells.parameters.bursty_lonely_max_sampled_cells: int = 10000

The number of randomly selected cells to use for computing “bursty lonely” genes. See metacells.tools.bursty_lonely.find_bursty_lonely_genes() and metacells.pipeline.exclude.extract_clean_data().

metacells.parameters.bursty_lonely_downsample_min_samples: int = 750

The minimal samples to use for downsampling the cells for computing “bursty lonely” genes. See downsample_min_cell_quantile, metacells.tools.bursty_lonely.find_bursty_lonely_genes(), and metacells.pipeline.exclude.extract_clean_data().

metacells.parameters.bursty_lonely_downsample_min_cell_quantile: float = 0.05

The minimal quantile of the cells total size to use for downsampling the cells for computing “bursty lonely” genes. See downsample_min_cell_quantile, metacells.tools.bursty_lonely.find_bursty_lonely_genes(), and metacells.pipeline.exclude.extract_clean_data().

metacells.parameters.bursty_lonely_downsample_max_cell_quantile: float = 0.5

The maximal quantile of the cells total size to use for downsampling the cells for computing “bursty lonely” genes. See downsample_min_cell_quantile, metacells.tools.bursty_lonely.find_bursty_lonely_genes(), and metacells.pipeline.exclude.extract_clean_data().

metacells.parameters.bursty_lonely_min_gene_total: int = 100

The minimal total UMIs in the downsamples selected cells of a gene to be considered when computing “lonely” genes. See metacells.tools.bursty_lonely.find_bursty_lonely_genes() and metacells.tools.high.find_high_total_genes().

metacells.parameters.bursty_lonely_min_gene_normalized_variance: float = 5.656854249492381

The minimal normalized variance of a gene to be considered “bursty”. See significant_gene_normalized_variance, metacells.tools.bursty_lonely.find_bursty_lonely_genes() and metacells.pipeline.exclude.extract_clean_data().

metacells.parameters.bursty_lonely_max_gene_similarity: float = 0.1

The maximal similarity between a gene and another gene to be considered “lonely”. See significant_gene_similarity, metacells.tools.bursty_lonely.find_bursty_lonely_genes() and metacells.pipeline.exclude.extract_clean_data().

metacells.parameters.rare_max_genes: int = 500

The maximal number of candidate rare genes. See metacells.tools.rare.find_rare_gene_modules() and metacells.pipeline.divide_and_conquer.divide_and_conquer_pipeline().

metacells.parameters.rare_max_gene_cell_fraction: float = 0.001

The maximal fraction of the cells where a gene is expressed to be considered “rare”. See metacells.tools.rare.find_rare_gene_modules() and metacells.pipeline.divide_and_conquer.divide_and_conquer_pipeline().

metacells.parameters.rare_min_gene_maximum: int = 7

The minimal maximum-across-all-cells value of a gene to be considered as a candidate for rare gene modules. See significant_value, metacells.tools.rare.find_rare_gene_modules() and metacells.pipeline.divide_and_conquer.divide_and_conquer_pipeline().

metacells.parameters.rare_genes_similarity_method: str = 'repeated_pearson'

How to compute gene-gene similarity for computing the rare gene modules. See metacells.tools.rare.find_rare_gene_modules() and metacells.pipeline.divide_and_conquer.divide_and_conquer_pipeline().

metacells.parameters.rare_genes_cluster_method: str = 'ward'

The hierarchical clustering method to use for computing the rare gene modules. See metacells.tools.rare.find_rare_gene_modules() and metacells.pipeline.divide_and_conquer.divide_and_conquer_pipeline().

metacells.parameters.rare_min_genes_of_modules: int = 4

The minimal number of genes in a rare gene module. See metacells.tools.rare.find_rare_gene_modules() and metacells.pipeline.divide_and_conquer.divide_and_conquer_pipeline().

metacells.parameters.rare_min_cells_of_modules: int = 12

The minimal number of cells in a rare gene module. See min_metacell_size, metacells.tools.rare.find_rare_gene_modules() and metacells.pipeline.divide_and_conquer.divide_and_conquer_pipeline().

metacells.parameters.rare_max_cells_factor_of_random_pile: float = 0.5

The maximal mean number of cells (as a fraction of the target metacell size) in a random pile for a rare gene module to be considered rare. See min_metacell_size, metacells.tools.rare.find_rare_gene_modules() and metacells.pipeline.divide_and_conquer.divide_and_conquer_pipeline().

metacells.parameters.rare_min_module_correlation: float = 0.1

The minimal average correlation between the genes in a rare gene module. See metacells.parameters.significant_gene_similarity(), metacells.tools.rare.find_rare_gene_modules() and metacells.pipeline.divide_and_conquer.divide_and_conquer_pipeline().

The minimal fold factor between rare cells and the rest of the population for a gene to be considered related to the rare gene module. See metacells.tools.rare.find_rare_gene_modules() and metacells.pipeline.divide_and_conquer.divide_and_conquer_pipeline().

The maximal ratio of total cells to include as a result of adding a related gene to a rare gene module. See metacells.tools.rare.find_rare_gene_modules() and metacells.pipeline.divide_and_conquer.divide_and_conquer_pipeline().

metacells.parameters.rare_min_cell_module_total: int = 4

The minimal number of UMIs of a rare gene module in a cell to be considered as expressing the rare behavior. See metacells.tools.rare.find_rare_gene_modules() and metacells.pipeline.divide_and_conquer.divide_and_conquer_pipeline().

metacells.parameters.rare_deviants_max_cell_fraction: float | None = 0.25

The maximal fraction of cells to mark as “deviants” in rare gene module piles. See metacells.tools.deviants.find_deviant_cells(), metacells.pipeline.direct.compute_direct_metacells(), metacells.pipeline.divide_and_conquer.compute_divide_and_conquer_metacells() and metacells.pipeline.divide_and_conquer.divide_and_conquer_pipeline().

metacells.parameters.quick_and_dirty: bool = False

Whether to compute metacells more quickly with lower quality. See metacells.pipeline.divide_and_conquer.compute_divide_and_conquer_metacells() and metacells.pipeline.divide_and_conquer.divide_and_conquer_pipeline().

metacells.parameters.select_downsample_min_samples: int = 750

The minimal samples to use for downsampling the cells for computing “select” genes. See downsample_min_samples, metacells.tools.downsample.downsample_cells(), metacells.pipeline.select.extract_selected_data(), metacells.pipeline.direct.compute_direct_metacells(), metacells.pipeline.divide_and_conquer.compute_divide_and_conquer_metacells() and metacells.pipeline.divide_and_conquer.divide_and_conquer_pipeline().

metacells.parameters.select_downsample_min_cell_quantile: float = 0.05

The minimal quantile of the cells total size to use for downsampling the cells for computing “select” genes. See downsample_min_cell_quantile, metacells.tools.downsample.downsample_cells(), metacells.pipeline.select.extract_selected_data(), metacells.pipeline.direct.compute_direct_metacells(), metacells.pipeline.divide_and_conquer.compute_divide_and_conquer_metacells() and metacells.pipeline.divide_and_conquer.divide_and_conquer_pipeline().

metacells.parameters.select_downsample_max_cell_quantile: float = 0.5

The maximal quantile of the cells total size to use for downsampling the cells for computing “select” genes. See downsample_max_cell_quantile, metacells.tools.downsample.downsample_cells(), metacells.pipeline.select.extract_selected_data(), metacells.pipeline.direct.compute_direct_metacells(), metacells.pipeline.divide_and_conquer.compute_divide_and_conquer_metacells() and metacells.pipeline.divide_and_conquer.divide_and_conquer_pipeline().

metacells.parameters.select_min_gene_relative_variance: float | None = 0.1

The minimal relative variance of a gene to be considered a “select”. See metacells.tools.high.find_high_relative_variance_genes(), metacells.pipeline.select.extract_selected_data(), metacells.pipeline.direct.compute_direct_metacells(), metacells.pipeline.divide_and_conquer.compute_divide_and_conquer_metacells() and metacells.pipeline.divide_and_conquer.divide_and_conquer_pipeline().

metacells.parameters.select_min_gene_total: int | None = 50

The minimal number of downsampled UMIs of a gene to be “select”. See metacells.tools.high.find_high_total_genes(), metacells.pipeline.select.extract_selected_data(), metacells.pipeline.direct.compute_direct_metacells(), metacells.pipeline.divide_and_conquer.compute_divide_and_conquer_metacells() and metacells.pipeline.divide_and_conquer.divide_and_conquer_pipeline().

metacells.parameters.select_min_gene_top3: int | None = 4

The minimal number of the top-3rd downsampled UMIs of a gene to be “select”. See metacells.tools.high.find_high_topN_genes(), metacells.pipeline.select.extract_selected_data(), metacells.pipeline.direct.compute_direct_metacells(), metacells.pipeline.divide_and_conquer.compute_divide_and_conquer_metacells() and metacells.pipeline.divide_and_conquer.divide_and_conquer_pipeline().

metacells.parameters.select_min_genes: int = 100

The minimal number of “select” genes. See metacells.pipeline.select.extract_selected_data(), metacells.pipeline.direct.compute_direct_metacells(), metacells.pipeline.divide_and_conquer.compute_divide_and_conquer_metacells() and metacells.pipeline.divide_and_conquer.divide_and_conquer_pipeline().

metacells.parameters.cells_similarity_log_data: bool = True

Whether to compute cell-cell similarity using the log (base 2) of the data. See metacells.pipeline.direct.compute_direct_metacells(), metacells.pipeline.divide_and_conquer.compute_divide_and_conquer_metacells() and metacells.pipeline.divide_and_conquer.divide_and_conquer_pipeline().

metacells.parameters.cells_similarity_value_regularization: float = 0.14285714285714285

The regularization factor to use if/when computing the fractions of the data for directly computing the metacells. See significant_value, metacells.pipeline.direct.compute_direct_metacells(), metacells.pipeline.divide_and_conquer.compute_divide_and_conquer_metacells() and metacells.pipeline.divide_and_conquer.divide_and_conquer_pipeline().

metacells.parameters.cells_similarity_method: str = 'abs_pearson'

The method to use to compute cell-cell similarity. See metacells.tools.similarity.compute_obs_obs_similarity(), metacells.pipeline.direct.compute_direct_metacells() and metacells.pipeline.divide_and_conquer.divide_and_conquer_pipeline().

metacells.parameters.groups_similarity_log_data: bool = True

Whether to compute group-group similarity using the log (base 2) of the data. See metacells.pipeline.direct.compute_direct_metacells(), metacells.pipeline.divide_and_conquer.compute_divide_and_conquer_metacells() and metacells.pipeline.divide_and_conquer.divide_and_conquer_pipeline().

metacells.parameters.groups_similarity_method: str = 'abs_pearson'

The method to use to compute group-group similarity. See cells_similarity_method and metacells.pipeline.divide_and_conquer.divide_and_conquer_pipeline().

metacells.parameters.knn_k: int | None = None

The target K for building the K-Nearest-Neighbors graph. See metacells.tools.knn_graph.compute_obs_obs_knn_graph(), metacells.tools.knn_graph.compute_var_var_knn_graph(), metacells.pipeline.direct.compute_direct_metacells(), metacells.pipeline.divide_and_conquer.compute_divide_and_conquer_metacells() and metacells.pipeline.divide_and_conquer.divide_and_conquer_pipeline().

metacells.parameters.candidates_knn_k_size_factor: int = 2

The size of the default K for building the K-Nearest-Neighbors graph when computing metacells, multiplied by the median number of cells needed to reach the target_metacell_size. See metacells.pipeline.divide_and_conquer.compute_divide_and_conquer_metacells() metacells.pipeline.divide_and_conquer.divide_and_conquer_pipeline(), and metacells.pipeline.direct.compute_direct_metacells().

metacells.parameters.piles_knn_k_size_factor: int = 3

The size of the default K for building the K-Nearest-Neighbors graph when computing groups of metacells, multiplied by the median number of cells needed to reach the target_metacell_size. See metacells.pipeline.divide_and_conquer.compute_divide_and_conquer_metacells() metacells.pipeline.divide_and_conquer.divide_and_conquer_pipeline(), and metacells.pipeline.direct.compute_direct_metacells().

metacells.parameters.knn_k_umis_quantile: float = 0.1

The size of the default K for building the K-Nearest-Neighbors graph, based on the number of cells needed to reach the target_metacell_umis for a quantile of the cells. See metacells.pipeline.divide_and_conquer.compute_divide_and_conquer_metacells() metacells.pipeline.divide_and_conquer.divide_and_conquer_pipeline(), and metacells.pipeline.direct.compute_direct_metacells().

metacells.parameters.min_knn_k: int | None = 30

The minimal target K for building the K-Nearest-Neighbors graph. See metacells.tools.knn_graph.compute_obs_obs_knn_graph(), metacells.tools.knn_graph.compute_var_var_knn_graph(), metacells.pipeline.direct.compute_direct_metacells(), metacells.pipeline.divide_and_conquer.compute_divide_and_conquer_metacells() and metacells.pipeline.divide_and_conquer.divide_and_conquer_pipeline().

metacells.parameters.knn_balanced_ranks_factor: float = 3.1622776601683795

The factor of K edge ranks to keep when computing the balanced ranks for the K-Nearest-Neighbors graph. See metacells.tools.knn_graph.compute_obs_obs_knn_graph(), metacells.tools.knn_graph.compute_var_var_knn_graph(), metacells.pipeline.direct.compute_direct_metacells(), metacells.pipeline.divide_and_conquer.compute_divide_and_conquer_metacells(), metacells.pipeline.divide_and_conquer.divide_and_conquer_pipeline() and metacells.pipeline.umap.compute_umap_by_markers().

metacells.parameters.knn_incoming_degree_factor: float = 3.0

The factor of K of edges to keep when pruning the incoming edges of the K-Nearest-Neighbors graph. See metacells.tools.knn_graph.compute_obs_obs_knn_graph(), metacells.tools.knn_graph.compute_var_var_knn_graph(), metacells.pipeline.direct.compute_direct_metacells(), metacells.pipeline.divide_and_conquer.compute_divide_and_conquer_metacells(), metacells.pipeline.divide_and_conquer.divide_and_conquer_pipeline() and metacells.pipeline.umap.compute_umap_by_markers().

metacells.parameters.knn_outgoing_degree_factor: float = 1.0

The factor of K of edges to keep when pruning the outgoing edges of the K-Nearest-Neighbors graph. See metacells.tools.knn_graph.compute_obs_obs_knn_graph(), metacells.tools.knn_graph.compute_var_var_knn_graph(), metacells.pipeline.direct.compute_direct_metacells(), metacells.pipeline.divide_and_conquer.compute_divide_and_conquer_metacells(), metacells.pipeline.divide_and_conquer.divide_and_conquer_pipeline() and metacells.pipeline.umap.compute_umap_by_markers().

metacells.parameters.knn_min_outgoing_degree: int = 2

The minimal outgoing degree of nodes in the KNN graph. See metacells.tools.knn_graph.compute_obs_obs_knn_graph(), metacells.tools.knn_graph.compute_var_var_knn_graph(), metacells.pipeline.direct.compute_direct_metacells(), metacells.pipeline.divide_and_conquer.compute_divide_and_conquer_metacells(), metacells.pipeline.divide_and_conquer.divide_and_conquer_pipeline() metacells.pipeline.umap.compute_knn_by_markers() and metacells.pipeline.umap.compute_umap_by_markers().

metacells.parameters.markers_knn_min_outgoing_degree: int = 1

The minimal outgoing degree of nodes in the markers KNN graph. See metacells.pipeline.umap.compute_knn_by_markers() and metacells.pipeline.umap.compute_umap_by_markers().

metacells.parameters.min_seed_size_quantile: float = 0.85

The minimal quantile of a seed to be selected. See metacells.tools.candidates.choose_seeds(), metacells.tools.candidates.compute_candidate_metacells(), metacells.pipeline.direct.compute_direct_metacells(), metacells.pipeline.divide_and_conquer.compute_divide_and_conquer_metacells() and metacells.pipeline.divide_and_conquer.divide_and_conquer_pipeline().

metacells.parameters.max_seed_size_quantile: float = 0.95

The maximal quantile of a seed to be selected. See metacells.tools.candidates.choose_seeds(), metacells.tools.candidates.compute_candidate_metacells(), metacells.pipeline.direct.compute_direct_metacells(), metacells.pipeline.divide_and_conquer.compute_divide_and_conquer_metacells() and metacells.pipeline.divide_and_conquer.divide_and_conquer_pipeline().

metacells.parameters.cooldown_pass: float = 0.02

By how much (as a fraction) to cooldown the temperature after doing a pass on all the nodes. See metacells.tools.candidates.compute_candidate_metacells(), metacells.pipeline.direct.compute_direct_metacells(), metacells.pipeline.divide_and_conquer.compute_divide_and_conquer_metacells() and metacells.pipeline.divide_and_conquer.divide_and_conquer_pipeline().

metacells.parameters.cooldown_node: float = 0.25

By how much (as a fraction) to cooldown the node temperature after improving it. See metacells.tools.candidates.compute_candidate_metacells(), metacells.pipeline.direct.compute_direct_metacells(), metacells.pipeline.divide_and_conquer.compute_divide_and_conquer_metacells() and metacells.pipeline.divide_and_conquer.divide_and_conquer_pipeline().

metacells.parameters.cooldown_phase: float = 0.75

By how much (as a fraction) to reduce the cooldown each time we re-optimize a slightly modified partition. See metacells.tools.candidates.compute_candidate_metacells(), metacells.pipeline.direct.compute_direct_metacells(), metacells.pipeline.divide_and_conquer.compute_divide_and_conquer_metacells() and metacells.pipeline.divide_and_conquer.divide_and_conquer_pipeline().

metacells.parameters.candidates_min_split_size_factor: float = 2.0

The minimal size factor of clusters to split when clustering the nodes of the K-Nearest-Neighbors graph. See min_split_size_factor, metacells.tools.candidates.compute_candidate_metacells(), metacells.pipeline.direct.compute_direct_metacells(), metacells.pipeline.divide_and_conquer.compute_divide_and_conquer_metacells() and metacells.pipeline.divide_and_conquer.divide_and_conquer_pipeline().

metacells.parameters.candidates_max_merge_size_factor: float = 0.5

The maximal size factor of clusters to merge when clustering the nodes of the K-Nearest-Neighbors graph. See max_merge_size_factor, metacells.tools.candidates.compute_candidate_metacells(), metacells.pipeline.direct.compute_direct_metacells(), metacells.pipeline.divide_and_conquer.compute_divide_and_conquer_metacells() and metacells.pipeline.divide_and_conquer.divide_and_conquer_pipeline().

metacells.parameters.deviants_policy: str = 'gaps'

The policy to use for deciding which cell is “deviant”. See metacells.tools.deviants.find_deviant_cells(), metacells.pipeline.direct.compute_direct_metacells(), metacells.pipeline.divide_and_conquer.compute_divide_and_conquer_metacells() and metacells.pipeline.divide_and_conquer.divide_and_conquer_pipeline().

metacells.parameters.deviants_gap_skip_cells: int = 1

If using the gaps deviants policy, how many cells to skip ahead when computing gap sizes (0, 1, 2). See metacells.tools.deviants.find_deviant_cells(), metacells.pipeline.direct.compute_direct_metacells(), metacells.pipeline.divide_and_conquer.compute_divide_and_conquer_metacells() and metacells.pipeline.divide_and_conquer.divide_and_conquer_pipeline().

metacells.parameters.deviants_max_gap_cells_count: int = 3

Do not mark deviants by a gene in a metacell if it causes more than this number of cells to become deviant (unless the count is no more than deviants_max_gap_cells_fraction). See metacells.tools.deviants.find_deviant_cells(), metacells.pipeline.direct.compute_direct_metacells(), metacells.pipeline.divide_and_conquer.compute_divide_and_conquer_metacells() and metacells.pipeline.divide_and_conquer.divide_and_conquer_pipeline().

metacells.parameters.deviants_max_gap_cells_fraction: float = 0.1

Do not mark deviants by a gene in a metacell if it causes more than this fraction of cells to become deviant (unless the count is no more than deviants_max_gap_cells_count). See metacells.tools.deviants.find_deviant_cells(), metacells.pipeline.direct.compute_direct_metacells(), metacells.pipeline.divide_and_conquer.compute_divide_and_conquer_metacells() and metacells.pipeline.divide_and_conquer.divide_and_conquer_pipeline().

metacells.parameters.deviant_cells_regularization_quantile: float = 0.25

metacells.tools.deviants.find_deviant_cells(), metacells.pipeline.direct.compute_direct_metacells(), metacells.pipeline.divide_and_conquer.compute_divide_and_conquer_metacells() and metacells.pipeline.divide_and_conquer.divide_and_conquer_pipeline().

metacells.parameters.deviants_min_gene_fold_factor: float = 3.0

The minimal fold factor for a gene to indicate a cell is “deviant”. See significant_gene_fold_factor, metacells.tools.deviants.find_deviant_cells(), metacells.pipeline.direct.compute_direct_metacells(), metacells.pipeline.divide_and_conquer.compute_divide_and_conquer_metacells() and metacells.pipeline.divide_and_conquer.divide_and_conquer_pipeline().

metacells.parameters.deviants_min_compare_umis: int = 8

The minimal number of UMIs in the gene for two cells for using it as a certificate for a gap between the expression level of the gene in the cells for computinng deviants. See significant_gene_fold_factor, metacells.tools.deviants.find_deviant_cells(), metacells.pipeline.direct.compute_direct_metacells(), metacells.pipeline.divide_and_conquer.compute_divide_and_conquer_metacells() and metacells.pipeline.divide_and_conquer.divide_and_conquer_pipeline().

metacells.parameters.deviants_min_noisy_gene_fold_factor: float = 2.0

significant_gene_fold_factor, metacells.tools.deviants.find_deviant_cells(), metacells.pipeline.direct.compute_direct_metacells(), metacells.pipeline.divide_and_conquer.compute_divide_and_conquer_metacells() and metacells.pipeline.divide_and_conquer.divide_and_conquer_pipeline().

metacells.parameters.deviants_max_gene_fraction: float = 0.03

The maximal fraction of genes to use to indicate cell are “deviants”. See metacells.tools.deviants.find_deviant_cells(), metacells.pipeline.direct.compute_direct_metacells(), metacells.pipeline.divide_and_conquer.compute_divide_and_conquer_metacells() and metacells.pipeline.divide_and_conquer.divide_and_conquer_pipeline().

metacells.parameters.deviants_max_cell_fraction: float | None = 0.25

The maximal fraction of cells to mark as “deviants”. See metacells.tools.deviants.find_deviant_cells(), metacells.pipeline.direct.compute_direct_metacells(), metacells.pipeline.divide_and_conquer.compute_divide_and_conquer_metacells() and metacells.pipeline.divide_and_conquer.divide_and_conquer_pipeline().

metacells.parameters.dissolve_min_robust_size_factor: float = 0.5

The minimal size factor for a metacell to be considered “robust”. See min_robust_size_factor metacells.tools.dissolve.dissolve_metacells(), metacells.pipeline.direct.compute_direct_metacells(), metacells.pipeline.divide_and_conquer.compute_divide_and_conquer_metacells() and metacells.pipeline.divide_and_conquer.divide_and_conquer_pipeline().

metacells.parameters.rare_dissolve_min_robust_size_factor: float = 0.5

The minimal size factor for a metacell to be considered “robust” when grouping rare gene module cells. See min_robust_size_factor, max_merge_size_factor metacells.tools.dissolve.dissolve_metacells(), metacells.pipeline.direct.compute_direct_metacells(), metacells.pipeline.divide_and_conquer.compute_divide_and_conquer_metacells() and metacells.pipeline.divide_and_conquer.divide_and_conquer_pipeline().

metacells.parameters.rare_min_convincing_gene_fold_factor: float | None = None

The minimal fold factor of a gene in a rare metacell to make it “convincing”. See module cells. See max_merge_size_factor metacells.tools.dissolve.dissolve_metacells(), metacells.pipeline.direct.compute_direct_metacells(), metacells.pipeline.divide_and_conquer.compute_divide_and_conquer_metacells() and metacells.pipeline.divide_and_conquer.divide_and_conquer_pipeline().

metacells.parameters.dissolve_min_convincing_gene_fold_factor: float = 3.0

The minimal fold factor of a gene in a metacell to make it “convincing”. See significant_gene_fold_factor, metacells.tools.dissolve.dissolve_metacells(), metacells.pipeline.direct.compute_direct_metacells(), metacells.pipeline.divide_and_conquer.compute_divide_and_conquer_metacells() and metacells.pipeline.divide_and_conquer.divide_and_conquer_pipeline().

metacells.parameters.distinct_genes_count: int = 20

The number of most-distinct genes to collect for each cell. See metacells.tools.distinct.find_distinct_genes().

metacells.parameters.umap_max_marker_genes: int = 1000

The maximal number of marker genes to use for UMAP. See metacells.pipeline.umap.compute_knn_by_markers() and metacells.pipeline.umap.compute_umap_by_markers().

metacells.parameters.umap_ignore_lateral_genes: bool = True

Whether to ignore lateral genes when computing the UMAP. See metacells.pipeline.umap.compute_knn_by_markers() and metacells.pipeline.umap.compute_umap_by_markers().

metacells.parameters.umap_similarity_value_regularization: float = 1e-05

The regularization factor to use if/when computing the fractions of the data for UMAP. See metacells.parameters.significant_gene_fraction and metacells.pipeline.umap.compute_umap_by_markers().

metacells.parameters.umap_similarity_log_data: bool = True

Whether to compute metacell-metacell similarity using the log (base 2) of the data for UMAP. See metacells.pipeline.umap.compute_umap_by_markers().

metacells.parameters.umap_similarity_method: str = 'logistics_abs_pearson'

The method to use to compute similarities for UMAP. See metacells.tools.similarity.compute_obs_obs_similarity(), metacells.tools.similarity.compute_var_var_similarity(), and metacells.pipeline.umap.compute_umap_by_markers().

metacells.parameters.umap_min_dist: float = 0.5

The minimal UMAP point distance. See umap_spread and metacells.tools.layout.umap_by_distances() and metacells.pipeline.umap.compute_umap_by_markers().

metacells.parameters.umap_spread: float = 1.0

The minimal UMAP spread. This is automatically raised if the umap_min_dist is higher. See metacells.tools.layout.umap_by_distances() and metacells.pipeline.umap.compute_umap_by_markers().

metacells.parameters.umap_k: int = 15

The UMAP KNN graph degree. See metacells.tools.layout.umap_by_distances() and metacells.pipeline.umap.compute_umap_by_markers().

metacells.parameters.skeleton_k: int = 4

The UMAP KNN skeleton graph degree. See metacells.tools.knn_graph.compute_obs_obs_knn_graph(), metacells.tools.knn_graph.compute_var_var_knn_graph(), and metacells.pipeline.umap.compute_umap_by_markers().

metacells.parameters.umap_fraction_regularization: float = 1e-05

The value to add to gene fractions before applying the log function. See See metacells.pipeline.umap.compute_umap_by_markers().

metacells.parameters.spread_cover_fraction: float = 0.3333333333333333

The fraction of the UMAP plot area to cover with points. See metacells.utilities.computation.cover_diameter(), metacells.utilities.computation.cover_coordinates() and metacells.tools.layout.umap_by_distances(),

metacells.parameters.spread_noise_fraction: float = 0.1

The noise to add to the UMAP plot area. See metacells.utilities.computation.cover_coordinates() and metacells.tools.layout.umap_by_distances(),

metacells.parameters.quality_min_gene_total: int = 40

The minimal total number of UMIs for a gene to compute meaningful quality statistics for it. See metacells.tools.quality.compute_stdev_logs(), metacells.tools.quality.compute_inner_folds(), and metacells.tools.quality.compute_outliers_fold_factors().

metacells.parameters.max_gbs: float = -0.1

The maximal amount of memory to use when guessing the number of parallel piles. If zero or negative, is the fraction of the machine’s total RAM to use as a safety buffer. See metacells.pipeline.divide_and_conquer.guess_max_parallel_piles().

metacells.parameters.project_filter_ranges: bool = True

Whether the projection will ignore genes where the ranges of the corrected vs. the projected expression is too low. See metacells.pipeline.projection.projection_pipeline().

metacells.parameters.project_ignore_range_quantile: float = 0.02

The quantile to use (on both low and high ends) to compute the range of expression of a corrected of a projected gene. See metacells.pipeline.projection.projection_pipeline().

metacells.parameters.project_ignore_range_min_overlap_fraction: float = 0.5

The minimal overlap (shared range divided by query range) for genes to keep projecting. See metacells.pipeline.projection.projection_pipeline().

metacells.parameters.project_min_query_markers_fraction: float = 0.3333333333333333

The minimal fraction of the query marker genes that are fitted for a query metacell to be considered “similar” to the atlas. See metacells.pipeline.projection.projection_pipeline().

metacells.parameters.project_fold_regularization: float = 1e-05

The regularization factor to use when computing fold factors for projecting a query onto an atlas. See metacells.tools.project.compute_projection_weights().

metacells.parameters.project_min_significant_gene_umis: int = 40

The minimal number of UMIs for a gene to be a potential cause to mark a metacell as dissimilar. See metacells.tools.project.compute_projection_weights().

metacells.parameters.project_candidates_count: int = 50

The number of atlas candidates to consider when projecting a query onto an atlas. See metacells.tools.project.compute_projection_weights().

metacells.parameters.project_min_candidates_fraction: float = 0.3333333333333333

The minimal number of atlas candidates to use even if they fail the consistency check as a fraction of project_candidates_count. See metacells.tools.project.compute_projection_weights().

metacells.parameters.project_min_usage_weight: float = 1e-05

The minimal weight of an atlas metacell used for the projection of a query metacell. See metacells.tools.project.compute_projection_weights().

metacells.parameters.project_max_projection_fold_factor: float = 3.0

The maximal fold factor of genes between the projection and the query metacell. See metacells.tools.project.compute_projection_weights().

metacells.parameters.project_max_projection_noisy_fold_factor: float = 2.0

metacells.tools.project.compute_projection_weights().

metacells.parameters.project_max_consistency_fold_factor: float = 2.0

The maximal fold factor of genes between the atlas metacells used for the projection of a query metacell. See metacells.tools.project.compute_projection_weights().

metacells.parameters.project_log_data: bool = True

Whether to compute projectio the log (base 2) of the data. See metacells.tools.project.compute_projection_weights().

metacells.parameters.outliers_fold_regularization: float = 1e-05

The regularization factor to use when computing log of fractions for finding the most similar group for outliers. See metacells.tools.quality.compute_outliers_matches().

metacells.parameters.ignore_atlas_lateral_genes: bool = True

Whether to ignore the lateral genes of the atlas when computing projections. See metacells.pipeline.projection.projection_pipeline().

metacells.parameters.consider_atlas_noisy_genes: bool = True

Whether to ignore the noisy genes of the atlas when computing projections. See metacells.pipeline.projection.projection_pipeline().

metacells.parameters.only_atlas_marker_genes: bool = True

Whether to ignore the non-marker genes of the atlas when computing projections. See metacells.pipeline.projection.projection_pipeline().

metacells.parameters.only_query_marker_genes: bool = False

Whether to ignore the non-marker genes of the query when computing projections. See metacells.pipeline.projection.projection_pipeline().

metacells.parameters.ignore_query_lateral_genes: bool = True

Whether to ignore the lateral genes of the query when computing projections. See metacells.pipeline.projection.projection_pipeline().

metacells.parameters.consider_query_noisy_genes: bool = True

Whether to ignore the noisy genes of the query when computing projections. See metacells.pipeline.projection.projection_pipeline().

metacells.parameters.misfit_min_metacells_fraction: float = 0.5

The minimal fraction of metacells where a gene has a high projection fold factor to mark the gene as “misfit”. See metacells.pipeline.projection.projection_pipeline().

metacells.parameters.min_marker_metacells_gene_range_fold_factor: float = 2.0

The minimal fold between the maximal and minimal gene expression in metacells to be a “marker”. See metacells.tools.high.find_metacells_marker_genes().

metacells.parameters.metacells_gene_range_regularization: float = 1e-05

The regularization factor to use after computing the fractions of the data for computing metacell gene range folds. See metacells.tools.high.find_metacells_marker_genes().

metacells.parameters.min_marker_max_metacells_gene_fraction: float = 0.0001

The minimal maximal gene expression in metacells to be a “marker”. See metacells.tools.high.find_metacells_marker_genes().

metacells.parameters.project_renormalize_query: bool = False

Whether to renormalize the query to account for missing atlas genes when computing projections. metacells.pipeline.projection.projection_pipeline().

metacells.parameters.project_corrections: bool = False

Whether to compute linear corrections for genes between the query and the atlas. See metacells.pipeline.projection.projection_pipeline().

metacells.parameters.project_min_corrected_gene_correlation: float = 0.8

The minimal correlation between observed and projected genes for considering linear correction of the query gene value. See metacells.pipeline.projection.projection_pipeline().

metacells.parameters.project_min_corrected_gene_factor: float = 0.15

The minimal strength of the correction between the mean query and projected mean value (for correlated genes). See metacells.pipeline.projection.projection_pipeline().

metacells.parameters.type_gene_normalized_variance_quantile: float = 0.95

The quantile of each gene’s normalized variance across the metacells to use for the overall gene’s variability. See metacells.tools.quality.compute_type_genes_normalized_variances().