bin_specificity_into_quantiles: bin_specificity_into_quantiles

View source: R/bin_specificity_into_quantiles.r

bin_specificity_into_quantilesR Documentation

bin_specificity_into_quantiles

Description

bin_specificity_into_quantiles is an internal function used to convert add '$specificity_quantiles' to a ctd

Usage

bin_specificity_into_quantiles(
  ctdIN,
  numberOfBins,
  matrix_name = "specificity_quantiles",
  as_sparse = TRUE,
  verbose = TRUE
)

Arguments

ctdIN

A single annotLevel of a ctd, i.e. ctd[[1]] (the function is intended to be used via apply).

numberOfBins

Number of quantile 'bins' to use (40 is recommended).

matrix_name

Name of the specificity matrix to create (default: "specificity_quantiles").

as_sparse

Convert to sparseMatrix.

verbose

Print messages.

Value

A ctd with "specificity_quantiles" matrix in each level (or whatever matrix_name was set to.).

Examples

ctd <- ewceData::ctd()
ctd <- lapply(ctd, EWCE::bin_specificity_into_quantiles, numberOfBins = 40)
print(ctd[[1]]$specificity_quantiles[1:3, ])

NathanSkene/EWCE documentation built on Nov. 3, 2024, 8:16 a.m.