scran
C++ library for basic single-cell RNA-seq analyses
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
scran::SuggestCrisprQcFilters::Thresholds Struct Reference

Thresholds to define outliers on each metric. More...

#include <SuggestCrisprQcFilters.hpp>

Public Member Functions

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
 

Public Attributes

std::vector< double > max_count
 

Detailed Description

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.

Member Function Documentation

◆ 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
overwriteWhether to overwrite existing truthy entries in output.
FloatFloating point type for the metrics.
IntegerInteger for the metrics.
OutputBoolean type for the low-quality calls.
Parameters
nNumber of cells.
[in]buffersPointers 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]outputPointer 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>
std::vector< Output > scran::SuggestCrisprQcFilters::Thresholds::filter ( const PerCellCrisprQcMetrics::Results metrics) 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
OutputBoolean type for the low-quality calls.
Parameters
metricsCollection 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
BlockInteger type for the block assignments.
FloatFloating point type for the metrics.
IntegerInteger for the metrics.
OutputBoolean type for the low-quality calls.
Parameters
nNumber of cells.
[in]blockPointer 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]buffersPointers 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]outputPointer 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
BlockInteger type for the block assignments.
OutputBoolean type for the low-quality calls.
Parameters
metricsCollection 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]blockPointer 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.

Member Data Documentation

◆ 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: