Filter out low-quality cells.
This class removes low-quality cells from the input matrix by subsetting on the columns, typically using the filters defined in PerCellRnaQcFilters
and/or PerCellAdtQcFilters
. It is effectively a wrapper around the tatami::make_DelayedSubset
function.
template<class MAT , typename IDX = int, typename X = uint8_t>
std::shared_ptr< MAT > scran::FilterCells::run |
( |
std::shared_ptr< MAT > |
mat, |
|
|
const std::vector< X * > & |
filters |
|
) |
| |
|
inline |
Filter out low-quality cells by subsetting on the columns on the input matrix, taking the intersection or union of multiple filtering vectors according to set_intersect()
. The intersection is defined by setting the filtering value to 1 for a cell if the corresponding values across all supplied vectors are also 1, and zero otherwise; the union is defined by setting the filtering value to 1 for a cell if any corresponding value for any supplied vector is 1, and zero otherwise. The actual effect of filtering is determined by set_discard()
.
- Template Parameters
-
MAT | A matrix class, typically a tatami::Matrix . |
IDX | Integral type to use for the subsetting indices. |
X | Boolean type for the filtering vector. |
- Parameters
-
mat | Pointer to the input matrix to be subsetted. |
filters | Pointers to filtering vectors. Each vector should be of length equal to the number of columns in mat . |
- Returns
- A pointer to the submatrix.