scran_norm
Scaling normalization of single-cell data
Loading...
Searching...
No Matches
scran_norm::DelayedLogNormalizeHelper< OutputValue_, InputValue_, Index_, SizeFactors_ > Class Template Referencefinal

Helper for delayed log-normalization. More...

#include <normalize_counts.hpp>

Inheritance diagram for scran_norm::DelayedLogNormalizeHelper< OutputValue_, InputValue_, Index_, SizeFactors_ >:
Collaboration diagram for scran_norm::DelayedLogNormalizeHelper< OutputValue_, InputValue_, Index_, SizeFactors_ >:

Public Member Functions

 DelayedLogNormalizeHelper (SizeFactors_ size_factors, OutputValue_ log_base, OutputValue_ pseudo_count)
 
std::optional< Index_ > nrow () const
 
std::optional< Index_ > ncol () const
 
bool zero_depends_on_row () const
 
bool zero_depends_on_column () const
 
bool non_zero_depends_on_row () const
 
bool non_zero_depends_on_column () const
 
void dense (const bool row, const Index_ idx, const Index_ start, const Index_ length, const InputValue_ *input, OutputValue_ *const output) const
 
void dense (const bool row, const Index_ idx, const std::vector< Index_ > &indices, const InputValue_ *input, OutputValue_ *const output) const
 
bool is_sparse () const
 
void sparse (const bool row, const Index_ idx, const Index_ number, const InputValue_ *input_value, const Index_ *const index, OutputValue_ *const output_value) const
 
OutputValue_ fill (const bool row, const Index_ idx) const
 
- Public Member Functions inherited from tatami::DelayedUnaryIsometricOperationHelper< OutputValue_, InputValue_, Index_ >

Detailed Description

template<typename OutputValue_, typename InputValue_, typename Index_, typename SizeFactors_>
class scran_norm::DelayedLogNormalizeHelper< OutputValue_, InputValue_, Index_, SizeFactors_ >

Helper for delayed log-normalization.

This is a helper subclass that performs scaling normalization and log-transformation for each cell in tatami::DelayedUnaryIsometricOperation. It should be constructed with normalize_counts() and is equivalent to chaining tatami::DelayedUnaryIsometricDivideVectorHelper (for the scaling by size factors), with tatami::DelayedUnaryIsometricLog1pHelper and tatami::DelayedUnaryIsometricDivideScalarHelper (for log-transformation with a pseudo-count of 1 and an arbitrary base) or tatami::DelayedUnaryIsometricAddScalarHelper and tatami::DelayedUnaryIsometricCustomLogHelper (for log-transformation with a non-unity pseudo-count).

Template Parameters
OutputValue_Type of the result of the operation.
InputValue_Type of the matrix value used in the operation.
Index_Integer type for the row/column indices.
SizeFactors_Container for the size factors. This should support [], size(), begin() and end().

Constructor & Destructor Documentation

◆ DelayedLogNormalizeHelper()

template<typename OutputValue_ , typename InputValue_ , typename Index_ , typename SizeFactors_ >
scran_norm::DelayedLogNormalizeHelper< OutputValue_, InputValue_, Index_, SizeFactors_ >::DelayedLogNormalizeHelper ( SizeFactors_ size_factors,
OutputValue_ log_base,
OutputValue_ pseudo_count )
inline
Parameters
vectorVector of size factors, of length equal to the number of columns.
log_baseBase of the log, usually 2.
pseudo_countPseudo-count to add before log-transformation, usually 1.

Member Function Documentation

◆ nrow()

template<typename OutputValue_ , typename InputValue_ , typename Index_ , typename SizeFactors_ >
std::optional< Index_ > scran_norm::DelayedLogNormalizeHelper< OutputValue_, InputValue_, Index_, SizeFactors_ >::nrow ( ) const
inlinevirtual

◆ ncol()

template<typename OutputValue_ , typename InputValue_ , typename Index_ , typename SizeFactors_ >
std::optional< Index_ > scran_norm::DelayedLogNormalizeHelper< OutputValue_, InputValue_, Index_, SizeFactors_ >::ncol ( ) const
inlinevirtual

◆ zero_depends_on_row()

template<typename OutputValue_ , typename InputValue_ , typename Index_ , typename SizeFactors_ >
bool scran_norm::DelayedLogNormalizeHelper< OutputValue_, InputValue_, Index_, SizeFactors_ >::zero_depends_on_row ( ) const
inlinevirtual

◆ zero_depends_on_column()

template<typename OutputValue_ , typename InputValue_ , typename Index_ , typename SizeFactors_ >
bool scran_norm::DelayedLogNormalizeHelper< OutputValue_, InputValue_, Index_, SizeFactors_ >::zero_depends_on_column ( ) const
inlinevirtual

◆ non_zero_depends_on_row()

template<typename OutputValue_ , typename InputValue_ , typename Index_ , typename SizeFactors_ >
bool scran_norm::DelayedLogNormalizeHelper< OutputValue_, InputValue_, Index_, SizeFactors_ >::non_zero_depends_on_row ( ) const
inlinevirtual

◆ non_zero_depends_on_column()

template<typename OutputValue_ , typename InputValue_ , typename Index_ , typename SizeFactors_ >
bool scran_norm::DelayedLogNormalizeHelper< OutputValue_, InputValue_, Index_, SizeFactors_ >::non_zero_depends_on_column ( ) const
inlinevirtual

◆ dense() [1/2]

template<typename OutputValue_ , typename InputValue_ , typename Index_ , typename SizeFactors_ >
void scran_norm::DelayedLogNormalizeHelper< OutputValue_, InputValue_, Index_, SizeFactors_ >::dense ( const bool row,
const Index_ idx,
const Index_ start,
const Index_ length,
const InputValue_ * input,
OutputValue_ *const output ) const
inlinevirtual

◆ dense() [2/2]

template<typename OutputValue_ , typename InputValue_ , typename Index_ , typename SizeFactors_ >
void scran_norm::DelayedLogNormalizeHelper< OutputValue_, InputValue_, Index_, SizeFactors_ >::dense ( const bool row,
const Index_ idx,
const std::vector< Index_ > & indices,
const InputValue_ * input,
OutputValue_ *const output ) const
inlinevirtual

◆ is_sparse()

template<typename OutputValue_ , typename InputValue_ , typename Index_ , typename SizeFactors_ >
bool scran_norm::DelayedLogNormalizeHelper< OutputValue_, InputValue_, Index_, SizeFactors_ >::is_sparse ( ) const
inlinevirtual

◆ sparse()

template<typename OutputValue_ , typename InputValue_ , typename Index_ , typename SizeFactors_ >
void scran_norm::DelayedLogNormalizeHelper< OutputValue_, InputValue_, Index_, SizeFactors_ >::sparse ( const bool row,
const Index_ idx,
const Index_ number,
const InputValue_ * input_value,
const Index_ *const index,
OutputValue_ *const output_value ) const
inlinevirtual

◆ fill()

template<typename OutputValue_ , typename InputValue_ , typename Index_ , typename SizeFactors_ >
OutputValue_ scran_norm::DelayedLogNormalizeHelper< OutputValue_, InputValue_, Index_, SizeFactors_ >::fill ( const bool row,
const Index_ idx ) const
inlinevirtual

The documentation for this class was generated from the following file: