Thresholds to define outliers on each metric.
More...
#include <SuggestAdtQcFilters.hpp>
|
template<bool overwrite = true, typename Float , typename Integer , typename Output > |
void | filter (size_t n, const PerCellAdtQcMetrics::Buffers< Float, Integer > &buffers, Output *output) const |
|
template<typename Output = uint8_t> |
std::vector< Output > | filter (const PerCellAdtQcMetrics::Results &metrics) const |
|
template<bool overwrite = true, typename Block , typename Float , typename Integer , typename Output > |
void | filter_blocked (size_t n, const Block *block, const PerCellAdtQcMetrics::Buffers< Float, Integer > &buffers, Output *output) const |
|
template<typename Output = uint8_t, typename Block > |
std::vector< Output > | filter_blocked (const PerCellAdtQcMetrics::Results &metrics, const Block *block) const |
|
Thresholds to define outliers on each metric.
SuggestAdtQcFilters::run()
and related methods will suggest some (hopefully) sensible thresholds based on outlier calls. Users can directly modify the thresholds in instances of this class if the default suggestions are not suitable. These thresholds can then be used to generate calls for low-quality cells via the filter()
methods.
◆ filter() [1/2]
template<bool overwrite = true, typename Float , typename Integer , typename Output >
void scran::SuggestAdtQcFilters::Thresholds::filter |
( |
size_t |
n, |
|
|
const PerCellAdtQcMetrics::Buffers< Float, Integer > & |
buffers, |
|
|
Output * |
output |
|
) |
| const |
|
inline |
- Template Parameters
-
overwrite | Whether to overwrite existing truthy entries in output . |
Float | Floating point type for the metrics. |
Integer | Integer for the metrics. |
Output | Boolean type for the low-quality calls. |
- Parameters
-
| n | Number of cells. |
[in] | buffers | Pointers to arrays of length n , containing the per-cell ADT-derived metrics. These should be comparable to the values used to create this Thresholds object. Only detected and subset_totals are used; sums does not need to be set. |
[out] | output | Pointer to an array of length n , to store the low-quality calls. Values are set to true for low-quality cells. If overwrite = true , values are set to false for high-quality cells, otherwise the existing entry is preserved. |
Use filter_blocked()
instead for multi-block datasets.
◆ filter() [2/2]
template<typename Output = uint8_t>
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
- Template Parameters
-
Output | Boolean type for the low-quality calls. |
- Parameters
-
metrics | Collection of arrays of per-cell ADT metrics. These should be comparable to the values used to create this Thresholds object. Only detected and subset_totals are used; sums does not need to be set. |
- Returns
- Vector of low-quality calls, of length equal to the number of cells in
metrics
.
◆ filter_blocked() [1/2]
template<bool overwrite = true, typename Block , typename Float , typename Integer , typename Output >
void scran::SuggestAdtQcFilters::Thresholds::filter_blocked |
( |
size_t |
n, |
|
|
const Block * |
block, |
|
|
const PerCellAdtQcMetrics::Buffers< Float, Integer > & |
buffers, |
|
|
Output * |
output |
|
) |
| const |
|
inline |
- Template Parameters
-
Block | Integer type for the block assignments. |
Float | Floating point type for the metrics. |
Integer | Integer for the metrics. |
Output | Boolean type for the low-quality calls. |
- Parameters
-
| n | Number of cells. |
[in] | block | Pointer to an array of length n , containing the block assignment for each cell. This may be NULL , in which case all cells are assumed to belong to the same block. |
[in] | buffers | Pointers to arrays of length n , containing the per-cell ADT-derived metrics. These should be comparable to the values used to create this Thresholds object. Only detected and subset_totals are used; sums does not need to be set. |
[out] | output | Pointer to an array of length n , to store the low-quality calls. Values are set to true for low-quality cells. If overwrite = true , values are set to false for high-quality cells, otherwise the existing entry is preserved. |
◆ filter_blocked() [2/2]
template<typename Output = uint8_t, typename Block >
std::vector< Output > scran::SuggestAdtQcFilters::Thresholds::filter_blocked |
( |
const PerCellAdtQcMetrics::Results & |
metrics, |
|
|
const Block * |
block |
|
) |
| const |
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
- Template Parameters
-
Block | Integer type for the block assignments. |
Output | Boolean type for the low-quality calls. |
- Parameters
-
| metrics | Collection of arrays of per-cell ADT metrics. These should be comparable to the values used to create this Thresholds object. Only detected and subset_totals are used; sums does not need to be set. |
[in] | block | Pointer to an array of length n , containing the block assignment for each cell. This may be NULL , in which case all cells are assumed to belong to the same block. |
- Returns
- Vector of low-quality calls, of length equal to the number of cells in
metrics
.
◆ detected
std::vector<double> scran::SuggestAdtQcFilters::Thresholds::detected |
Lower thresholds to define small outliers on the number of detected features. Each entry contains the threshold used for the corresponding block. For unblocked analyses, this will be of length 1 as all cells are assumed to belong to the same block.
◆ subset_totals
std::vector<std::vector<double> > scran::SuggestAdtQcFilters::Thresholds::subset_totals |
Upper thresholds to define large outliers on the subset totals. Each vector corresponds to a feature subset while each entry of the inner vector corresponds to a block of cells. For unblocked analyses, all cells are assumed to belong to a single block, i.e., all inner vectors have length 1.
The documentation for this struct was generated from the following file: