asv.to.linf.csts: From counts to filtered, normalized, truncated dCSTs

View source: R/linf.R

asv.to.linf.cstsR Documentation

From counts to filtered, normalized, truncated dCSTs

Description

Convenience pipeline: runs filter.asv() on counts, computes L-infinity-normalized relatives on the filtered counts, and assigns truncated dCSTs.

Usage

asv.to.linf.csts(S.counts, ..., backend = c("auto", "dense", "sparse"))

Arguments

S.counts

Numeric matrix of counts (samples x features).

...

Arguments passed to filter.asv() (e.g., min.lib, prev.prop, min.count, min.rel).

backend

Character. Matrix backend to use: "auto", "dense", or "sparse".

Value

A list with:

  • filter: the full result from filter.asv().

  • linf.rel: L-infinity-normalized matrix on filtered counts.

  • csts: result from linf.csts() on linf.rel.

Examples

set.seed(1)
S <- matrix(rpois(100, lambda = 5), nrow = 20, ncol = 5)
res <- asv.to.linf.csts(S, min.lib = 10, prev.prop = 0.1, min.count = 1)
names(res)
apply(res$linf.rel, 1, max)  # should be 1 (or 0 for all-zero rows)


linf documentation built on Aug. 5, 2026, 9:08 a.m.