Outlier thresholds for QC filtering.
More...
#include <ChooseOutlierFilters.hpp>
|
template<bool overwrite = true, typename Input , typename Output > |
void | filter (size_t n, Input *input, Output *output) const |
|
template<typename Output = uint8_t, typename Input > |
std::vector< Output > | filter (size_t n, const Input *input) const |
|
template<bool overwrite = true, typename Block , typename Input , typename Output > |
void | filter_blocked (size_t n, const Block *block, const Input *input, Output *output) const |
|
template<typename Output = uint8_t, typename Block , typename Input > |
std::vector< Output > | filter_blocked (size_t n, const Block *block, const Input *input) const |
|
|
std::vector< double > | lower |
|
std::vector< double > | upper |
|
Outlier thresholds for QC filtering.
◆ filter() [1/2]
template<bool overwrite = true, typename Input , typename Output >
void scran::ChooseOutlierFilters::Thresholds::filter |
( |
size_t |
n, |
|
|
Input * |
input, |
|
|
Output * |
output |
|
) |
| const |
|
inline |
- Template Parameters
-
overwrite | Whether to overwrite existing truthy entries in output . |
Input | Numeric type for the values. |
Output | Boolean type for the outlier calls. |
- Parameters
-
| n | Number of observations. |
[in] | input | Pointer to an array of length n , containing the values to be filtered. |
[out] | output | Pointer to an array of length n , to store the outlier calls. Values are set to true for outliers. If overwrite = true , values are set to false for non-outliers, otherwise the existing entry is preserved. |
Use filter_blocked()
instead for multi-block datasets.
◆ filter() [2/2]
template<typename Output = uint8_t, typename Input >
std::vector< Output > scran::ChooseOutlierFilters::Thresholds::filter |
( |
size_t |
n, |
|
|
const Input * |
input |
|
) |
| 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
-
Output | Boolean type for the outlier calls. |
Input | Numeric type for the values. |
- Parameters
-
| n | Number of observations. |
[in] | input | Pointer to an array of length n , containing the values to be filtered. |
- Returns
- Vector of outlier calls, of length equal to
n
.
◆ filter_blocked() [1/2]
template<bool overwrite = true, typename Block , typename Input , typename Output >
void scran::ChooseOutlierFilters::Thresholds::filter_blocked |
( |
size_t |
n, |
|
|
const Block * |
block, |
|
|
const Input * |
input, |
|
|
Output * |
output |
|
) |
| const |
|
inline |
- Template Parameters
-
overwrite | Whether to overwrite existing truthy entries in output . |
Block | Integer type for the block assignments. |
Input | Numeric type for the values. |
Output | Boolean type for the outlier 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] | input | Pointer to an array of length n , containing the values to be filtered. |
[out] | output | Pointer to an array of length n , to store the outlier calls. Values are set to true for outliers. If overwrite = true , values are set to false for non-outliers, otherwise the existing entry is preserved. |
◆ filter_blocked() [2/2]
template<typename Output = uint8_t, typename Block , typename Input >
std::vector< Output > scran::ChooseOutlierFilters::Thresholds::filter_blocked |
( |
size_t |
n, |
|
|
const Block * |
block, |
|
|
const Input * |
input |
|
) |
| 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
-
Output | Boolean type for the outlier calls. |
Block | Integer type for the block assignments. |
Input | Numeric type for the values. |
- 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] | input | Pointer to an array of length n , containing the values to be filtered. |
- Returns
- Vector of low-quality calls, of length equal to the number of cells in
metrics
.
◆ lower
std::vector<double> scran::ChooseOutlierFilters::Thresholds::lower |
Vector of lower thresholds, one per batch. Cells where the relevant QC metric is below this threshold are considered to be low quality. If empty, no lower threshold is to be used.
◆ upper
std::vector<double> scran::ChooseOutlierFilters::Thresholds::upper |
Vector of upper thresholds, one per batch. Cells where the relevant QC metric is above this threshold are considered to be low quality. If empty, no upper threshold is to be used.
The documentation for this struct was generated from the following file: