Skip to contents

Base [ on a matrix drops attributes other than dim / dimnames. Use subset_catalog() when you want to keep the catalog's type / ref_genome / region / abundance metadata through a subset operation.

Usage

subset_catalog(x, rows = NULL, cols = NULL)

Arguments

x

A catalog.

rows, cols

Numeric, logical, or character indices (see base::Extract). If NULL, all rows / columns are kept.

Value

A catalog (numeric matrix) containing the selected rows and columns, with the type, counts_or_density, ref_genome, and region attributes of x preserved. The abundance attribute is preserved only when all rows are kept, because it is not meaningful for a subset of mutation types.