scran_markers
Marker detection for single-cell data
Loading...
Searching...
No Matches
summarize_effects.hpp
Go to the documentation of this file.
1#ifndef SCRAN_MARKERS_SUMMARIZE_EFFECTS_HPP
2#define SCRAN_MARKERS_SUMMARIZE_EFFECTS_HPP
3
5
6#include <vector>
7
13namespace scran_markers {
14
23 int num_threads = 1;
24
29 bool compute_min = true;
30
35 bool compute_mean = true;
36
41 bool compute_median = true;
42
47 bool compute_max = true;
48
53 bool compute_min_rank = true;
54};
55
115template<typename Index_, typename Stat_, typename Rank_>
117 internal::compute_min_rank_pairwise(ngenes, ngroups, effects, summaries, options.num_threads);
118 internal::summarize_comparisons(ngenes, ngroups, effects, summaries, options.num_threads);
119}
120
140template<typename Stat_ = double, typename Rank_ = int, typename Index_>
141std::vector<SummaryResults<Stat_, Rank_> > summarize_effects(Index_ ngenes, size_t ngroups, const Stat_* effects, const SummarizeEffectsOptions& options) {
142 std::vector<SummaryResults<Stat_, Rank_> > output;
143 auto ptrs = internal::fill_summary_results(
144 ngenes,
145 ngroups,
146 output,
147 options.compute_min,
148 options.compute_mean,
149 options.compute_median,
150 options.compute_max,
151 options.compute_min_rank
152 );
154 return output;
155}
156
157}
158
159#endif
Marker detection for single-cell data.
Definition score_markers_pairwise.hpp:23
void summarize_effects(Index_ ngenes, size_t ngroups, const Stat_ *effects, const std::vector< SummaryBuffers< Stat_, Rank_ > > &summaries, const SummarizeEffectsOptions &options)
Definition summarize_effects.hpp:116
Buffers for score_markers_pairwise() and friends.
Definition score_markers_pairwise.hpp:82
Options for summarize_effects().
Definition summarize_effects.hpp:18
int num_threads
Definition summarize_effects.hpp:23
bool compute_median
Definition summarize_effects.hpp:41
bool compute_mean
Definition summarize_effects.hpp:35
bool compute_min_rank
Definition summarize_effects.hpp:53
bool compute_max
Definition summarize_effects.hpp:47
bool compute_min
Definition summarize_effects.hpp:29
Utilities for effect summarization.