Thresholds to define outliers on each metric.
More...
#include <SuggestCrisprQcFilters.hpp>
|
template<bool overwrite = true, typename Float , typename Integer , typename Output > |
void | filter (size_t n, const PerCellCrisprQcMetrics::Buffers< Float, Integer > &buffers, Output *output) const |
|
template<typename Output = uint8_t> |
std::vector< Output > | filter (const PerCellCrisprQcMetrics::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 PerCellCrisprQcMetrics::Buffers< Float, Integer > &buffers, Output *output) const |
|
template<typename Output = uint8_t, typename Block > |
std::vector< Output > | filter_blocked (const PerCellCrisprQcMetrics::Results &metrics, const Block *block) const |
|
Thresholds to define outliers on each metric.
SuggestCrisprQcFilters::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::SuggestCrisprQcFilters::Thresholds::filter |
( |
size_t |
n, |
|
|
const PerCellCrisprQcMetrics::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 CRISPR-derived metrics. These should be comparable to the values used to create this Thresholds object. Only max_proportion and sums are used; detected is ignored and 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 CRISPR metrics. These should be comparable to the values used to create this Thresholds object. Only max_proportion and sums are used; detected is ignored and 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::SuggestCrisprQcFilters::Thresholds::filter_blocked |
( |
size_t |
n, |
|
|
const Block * |
block, |
|
|
const PerCellCrisprQcMetrics::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 CRISPR-derived metrics. These should be comparable to the values used to create this Thresholds object. Only max_proportion and sums are used; detected is ignored and 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::SuggestCrisprQcFilters::Thresholds::filter_blocked |
( |
const PerCellCrisprQcMetrics::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 CRISPR metrics. These should be comparable to the values used to create this Thresholds object. Only max_proportion and sums are used; detected is ignored and 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
.
◆ max_count
std::vector<double> scran::SuggestCrisprQcFilters::Thresholds::max_count |
Lower thresholds to define small outliers on the maximum count. 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.
The documentation for this struct was generated from the following file: