SnapATAC_BinarizeBmat: Binarize Bmat according SnapATAC

View source: R/FeatureFilter.R

SnapATAC_BinarizeBmatR Documentation

Binarize Bmat according SnapATAC

Description

  • Filter features if the covariances are smaller or larger than thresholds.

  • Too high values will be set as zeros.

Usage

SnapATAC_BinarizeBmat(
  bmat,
  cell_by_feature = FALSE,
  mu = NULL,
  sigma = NULL,
  z_threshold = 1.65,
  outlier = 0.001
)

Arguments

bmat

sparse matrix, feature by cells (default) or verse In SnapATAC package, bmat is cell by feature. Be sure to claim the format with the parameter cell_by_feature below.

cell_by_feature,

bool, if bmat is cell by feature or not, default is FALSE

mu

double or NULL, mean of log10 count to get z score, default is NULL, which will be estimated from the data.

sigma

double or NULL, standard deviation of log10 count to get z score, default is NULL, which will be estimated from the data.

z_threshold

double, z score threshold, features highter than it or lower than -it, will be removed, default is 1.65

outlier

double, count larger than quantile of 1- outlier will be treated as zero, default is 1e-3.

Value

list of two elements

  • bmat sparse matrix, cell by feature (consistent with SnapATAC)

  • featureIndexKept integer vector, feature index kept after filtering

  • mu double, mean for z_score

  • sigma double, standard deviation for z_score

  • z_threshold double, cutoff for z_threshold

  • outlier double, cutoff for count


beyondpie/smmtools documentation built on July 1, 2022, 4:33 a.m.