1#ifndef SCRAN_QC_CHOOSE_FILTER_THRESHOLDS_HPP
2#define SCRAN_QC_CHOOSE_FILTER_THRESHOLDS_HPP
63template<
typename Float_>
85template<
typename Float_>
88 if (std::isinf(
val)) {
99template<
bool lower_,
typename Float_>
101 std::vector<Float_>
output;
103 for (
const auto&
r :
res) {
132template<
typename Float_>
134 static_assert(std::is_floating_point<Float_>::value);
138 lthresh = -std::numeric_limits<Float_>::infinity();
139 uthresh = std::numeric_limits<double>::infinity();
141 auto median =
mm.median;
143 if (!std::isnan(median) && !std::isnan(mad)) {
169template<
typename Index_,
typename Float_>
192template<
typename Index_,
typename Value_,
typename Float_>
216template<
typename Float_>
221 std::vector<ChooseFilterThresholdsResults<Float_> >
output;
223 for (
auto&
mm :
mms) {
245template<
typename Index_,
typename Value_,
typename Block_,
typename Float_>
Simple quality control for single-cell data.
Definition adt_quality_control.hpp:20
std::vector< ChooseFilterThresholdsResults< Float_ > > choose_filter_thresholds_blocked(const std::vector< FindMedianMadResults< Float_ > > mms, const ChooseFilterThresholdsOptions &options)
Definition choose_filter_thresholds.hpp:217
FindMedianMadResults< Float_ > find_median_mad(Index_ num, Float_ *metrics, const FindMedianMadOptions &options)
Definition find_median_mad.hpp:79
ChooseFilterThresholdsResults< Float_ > choose_filter_thresholds(const FindMedianMadResults< Float_ > &mm, const ChooseFilterThresholdsOptions &options)
Definition choose_filter_thresholds.hpp:133
std::vector< FindMedianMadResults< Output_ > > find_median_mad_blocked(Index_ num, const Value_ *metrics, const Block_ *block, FindMedianMadWorkspace< Output_, Index_ > *workspace, const FindMedianMadOptions &options)
Definition find_median_mad.hpp:261
Options for choose_filter_thresholds().
Definition choose_filter_thresholds.hpp:20
bool upper
Definition choose_filter_thresholds.hpp:31
bool log
Definition choose_filter_thresholds.hpp:56
double num_mads
Definition choose_filter_thresholds.hpp:38
double min_diff
Definition choose_filter_thresholds.hpp:45
bool lower
Definition choose_filter_thresholds.hpp:25
Results of compute_adt_qc_metrics().
Definition choose_filter_thresholds.hpp:64
Float_ upper
Definition choose_filter_thresholds.hpp:77
Float_ lower
Definition choose_filter_thresholds.hpp:70