scran
C++ library for basic single-cell RNA-seq analyses
|
Compute typical per-cell quality control metrics from an RNA count matrix. More...
#include <PerCellRnaQcMetrics.hpp>
Classes | |
struct | Buffers |
Buffers for direct storage of the calculated statistics. More... | |
struct | Defaults |
Default parameters. More... | |
struct | Results |
Result store for QC metric calculations. More... | |
Public Member Functions | |
PerCellRnaQcMetrics & | set_num_threads (int n=Defaults::num_threads) |
template<class Matrix , typename Subset = const uint8_t*, typename Float , typename Integer > | |
void | run (const Matrix *mat, const std::vector< Subset > &subsets, Buffers< Float, Integer > &output) const |
template<class Matrix , typename Subset = const uint8_t*> | |
Results | run (const Matrix *mat, const std::vector< Subset > &subsets) const |
Compute typical per-cell quality control metrics from an RNA count matrix.
Given a feature-by-cell RNA count matrix, this class computes several QC metrics:
This class is just a pre-configured wrapper around PerCellQcMetrics
, with some careful division of the subset totals to obtain the subset proportions.
|
inline |
n | Number of threads to use. |
PerCellRnaQcMetrics
object.
|
inline |
Compute the QC metrics from an input matrix.
Matrix | Type of matrix, usually a tatami::NumericMatrix . |
Subset | Pointer to an array of values interpretable as booleans. |
Float | Floating point type to store the totals. |
Integer | Integer type to store the counts and indices. |
mat | Pointer to a feature-by-cells matrix containing counts. | |
[in] | subsets | Vector of pointers to arrays of length equal to mat->nrow() . Each array represents a feature subset and indicating whether each feature in mat belongs to that subset. Users can pass {} if no subsets are to be used. |
[out] | output | Buffers object in which to store the output. All pointers should be set to non-NULL values. |
|
inline |
Compute the QC metrics from an input matrix and return the results.
Matrix | Type of matrix, usually a tatami::NumericMatrix . |
Subset | Pointer to an array of values interpretable as booleans. |
mat | Pointer to a feature-by-cells tatami matrix containing counts. | |
[in] | subsets | Vector of pointers to arrays of length equal to mat->nrow() . Each array represents a feature subset and indicating whether each feature in mat belongs to that subset. Users can pass {} if no subsets are to be used. |
PerCellRnaQcMetrics::Results
object containing the QC metrics. Subset proportions are returned depending on the subsets
.