scvi.model.PEAKVI.get_accessibility_estimates

PEAKVI.get_accessibility_estimates(adata=None, indices=None, n_samples_overall=None, region_indices=None, transform_batch=None, use_z_mean=True, threshold=None, normalize_cells=False, normalize_regions=False, batch_size=128)[source]

Impute the full accessibility matrix.

Returns a matrix of accessibility probabilities for each cell and genomic region in the input (for return matrix A, A[i,j] is the probability that region j is accessible in cell i).

Parameters
adata : AnnData | NoneOptional[AnnData] (default: None)

AnnData object that has been registered with scvi. If None, defaults to the AnnData object used to initialize the model.

indices : Sequence[int] | NoneOptional[Sequence[int]] (default: None)

Indices of cells in adata to use. If None, all cells are used.

n_samples_overall : int | NoneOptional[int] (default: None)

Number of samples to return in total

region_indices : Sequence[int] | NoneOptional[Sequence[int]] (default: None)

Indices of regions to use. if None, all regions are used.

transform_batch : str | int | NoneUnion[str, int, None] (default: None)

Batch to condition on. If transform_batch is:

  • None, then real observed batch is used

  • int, then batch transform_batch is used

use_z_mean : boolbool (default: True)

If True (default), use the distribution mean. Otherwise, sample from the distribution.

threshold : float | NoneOptional[float] (default: None)

If provided, values below the threshold are replaced with 0 and a sparse matrix is returned instead. This is recommended for very large matrices. Must be between 0 and 1.

normalize_cells : boolbool (default: False)

Whether to reintroduce library size factors to scale the normalized probabilities. This makes the estimates closer to the input, but removes the library size correction. False by default.

normalize_regions : boolbool (default: False)

Whether to reintroduce region factors to scale the normalized probabilities. This makes the estimates closer to the input, but removes the region-level bias correction. False by default.

batch_size : intint (default: 128)

Minibatch size for data loading into model

Return type

ndarray | csr_matrixUnion[ndarray, csr_matrix]