1#ifndef SCRAN_NORM_NORMALIZE_COUNTS_HPP
2#define SCRAN_NORM_NORMALIZE_COUNTS_HPP
80template<
typename OutputValue_ =
double,
typename InputValue_,
typename Index_,
class SizeFactors_>
83 SizeFactors_ size_factors,
88 for (
auto& x : size_factors) {
94 static_assert(std::is_floating_point<OutputValue_>::value);
95 if (
static_cast<size_t>(size_factors.size()) !=
static_cast<size_t>(counts->ncol())) {
96 throw std::runtime_error(
"length of 'size_factors' should be equal to the number of columns of 'counts'");
102 std::move(size_factors),
111 if (current_pseudo == 1) {
132template<
typename OutputValue_ =
double,
typename InputValue_,
typename Index_,
class SizeFactors_>
135 SizeFactors_ size_factors,
136 const NormalizeCountsOptions& options)
Scaling normalization of single-cell data.
Definition center_size_factors.hpp:18
std::shared_ptr< tatami::Matrix< OutputValue_, Index_ > > normalize_counts(std::shared_ptr< const tatami::Matrix< InputValue_, Index_ > > counts, SizeFactors_ size_factors, const NormalizeCountsOptions &options)
Definition normalize_counts.hpp:81
std::shared_ptr< Matrix< OutputValue_, Index_ > > make_DelayedUnaryIsometricOperation(std::shared_ptr< const Matrix< InputValue_, Index_ > > matrix, Operation_ operation)
Options for normalize_counts().
Definition normalize_counts.hpp:20
double log_base
Definition normalize_counts.hpp:48
double pseudo_count
Definition normalize_counts.hpp:28
bool log
Definition normalize_counts.hpp:42
bool preserve_sparsity
Definition normalize_counts.hpp:37