1#ifndef SINGLEPP_CLASSIFY_INTEGRATED_HPP
2#define SINGLEPP_CLASSIFY_INTEGRATED_HPP
6#include "tatami/tatami.hpp"
8#include "annotate_cells_integrated.hpp"
12#include <unordered_map>
13#include <unordered_set>
26template<
typename Float_ = DefaultFloat>
58template<
typename RefLabel_ = DefaultRefLabel,
typename Float_ = DefaultFloat>
125template<
typename Value_,
typename Index_,
typename Label_,
typename RefLabel_,
typename Float_>
127 const tatami::Matrix<Value_, Index_>&
test,
128 const std::vector<const Label_*>&
assigned,
134 throw std::runtime_error(
"number of rows in 'test' is not the same as that used to build 'trained'");
136 internal::annotate_cells_integrated(
155template<
typename RefLabel_ = DefaultRefLabel,
typename Float_ = DefaultFloat>
162 for (
size_t r = 0;
r <
nrefs; ++
r) {
181 std::vector<std::vector<Float_> >
scores;
204template<
typename RefLabel_ = DefaultRefLabel,
typename Value_,
typename Index_,
typename Label_,
typename Float_>
206 const tatami::Matrix<Value_, Index_>&
test,
207 const std::vector<const Label_*>&
assigned,
217 buffers.scores.emplace_back(
s.data());
Common definitions for singlepp.
Cell type classification using the SingleR algorithm in C++.
Definition classify_single.hpp:19
void classify_integrated(const tatami::Matrix< Value_, Index_ > &test, const std::vector< const Label_ * > &assigned, const TrainedIntegrated< Index_ > &trained, ClassifyIntegratedBuffers< RefLabel_, Float_ > &buffers, const ClassifyIntegratedOptions< Float_ > &options)
Integrate classifications from multiple references.
Definition classify_integrated.hpp:126
std::vector< std::vector< std::vector< Index_ > > > Markers
Definition Markers.hpp:40
Output buffers for classify_single().
Definition classify_integrated.hpp:59
RefLabel_ * best
Definition classify_integrated.hpp:64
Float_ * delta
Definition classify_integrated.hpp:79
std::vector< Float_ * > scores
Definition classify_integrated.hpp:72
Options for classify_integrated().
Definition classify_integrated.hpp:27
bool fine_tune
Definition classify_integrated.hpp:44
int num_threads
Definition classify_integrated.hpp:50
Float_ quantile
Definition classify_integrated.hpp:32
Float_ fine_tune_threshold
Definition classify_integrated.hpp:38
Results of classify_integrated().
Definition classify_integrated.hpp:156
std::vector< std::vector< Float_ > > scores
Definition classify_integrated.hpp:181
std::vector< RefLabel_ > best
Definition classify_integrated.hpp:174
std::vector< Float_ > delta
Definition classify_integrated.hpp:187
Prepare for integrated classification across references.