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

Outlier thresholds for QC filtering. More...

#include <ChooseOutlierFilters.hpp>

Public Member Functions

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
 

Public Attributes

std::vector< double > lower
 
std::vector< double > upper
 

Detailed Description

Outlier thresholds for QC filtering.

Member Function Documentation

◆ 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
overwriteWhether to overwrite existing truthy entries in output.
InputNumeric type for the values.
OutputBoolean type for the outlier calls.
Parameters
nNumber of observations.
[in]inputPointer to an array of length n, containing the values to be filtered.
[out]outputPointer 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
OutputBoolean type for the outlier calls.
InputNumeric type for the values.
Parameters
nNumber of observations.
[in]inputPointer 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
overwriteWhether to overwrite existing truthy entries in output.
BlockInteger type for the block assignments.
InputNumeric type for the values.
OutputBoolean type for the outlier 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]inputPointer to an array of length n, containing the values to be filtered.
[out]outputPointer 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
OutputBoolean type for the outlier calls.
BlockInteger type for the block assignments.
InputNumeric type for the values.
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]inputPointer 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.

Member Data Documentation

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