scran_variances
Model per-gene variance in expression
Loading...
Searching...
No Matches
scran_variances::FitVarianceTrendOptions Struct Reference

Options for fit_variance_trend(). More...

#include <fit_variance_trend.hpp>

Public Attributes

double minimum_mean = 0.1
 
bool mean_filter = true
 
bool transform = true
 
double span = 0.3
 
bool use_minimum_width = false
 
double minimum_width = 1
 
int minimum_window_count = 200
 
int num_threads = 1
 

Detailed Description

Options for fit_variance_trend().

Member Data Documentation

◆ minimum_mean

double scran_variances::FitVarianceTrendOptions::minimum_mean = 0.1

Minimum mean log-expression for trend fitting. Genes with lower means do not participate in the LOWESS fit, to ensure that windows are not skewed towards the majority of low-abundance genes. Instead, the fitted values for these genes are defined by extrapolating the left edge of the fitted trend is extrapolated to the origin. The default value is chosen based on the typical distribution of means of log-expression values across genes. Only used if FitVarianceTrendOptions::mean_filter = true.

◆ mean_filter

bool scran_variances::FitVarianceTrendOptions::mean_filter = true

Should any filtering be performed on the mean log-expression of each gene (see FitVarianceTrend::minimum_mean)? The default of true assumes that there is a bulk of low-abundance genes that are uninteresting and should be removed to avoid skewing the windows of the LOWESS smoother.

◆ transform

bool scran_variances::FitVarianceTrendOptions::transform = true

Should any quarter-root transformation of the variances be performed prior to LOWESS smoothing? This transformation is copied from limma::voom() and shrinks all values towards 1, flattening any sharp gradients in the trend for an easier fit. The default of true assumes that the variances are computed from log-expression values, in which case there is typically a strong "hump" in the mean-variance relationship.

◆ span

double scran_variances::FitVarianceTrendOptions::span = 0.3

Span for the LOWESS smoother, as a proportion of the total number of points. Larger values improve stability at the cost of sensitivity to changes in low-density regions. This is only used if FitVarianceTrendOptions::use_minimum_width = false.

◆ use_minimum_width

bool scran_variances::FitVarianceTrendOptions::use_minimum_width = false

Should a minimum width constraint be applied to the LOWESS smoother? This replaces the proportion-based span for defining each window. Instead, the window for each point must be of a minimum width (see FitVarianceTrendOptions::minimum_width) and is extended until it contains a minimum number of points (see FitVarianceTrendOptions::minimum_window_count). Setting this to true ensures that sensitivity is maintained in the trend fit at low-density regions for the distribution of means, e.g., at high abundances. It also avoids overfitting from very small windows in high-density intervals.

◆ minimum_width

double scran_variances::FitVarianceTrendOptions::minimum_width = 1

Minimum width of the window to use when FitVarianceTrendOptions::use_minimum_width = true. This should be appropriate for the range of means used in fit_variance_trend(). The default value is chosen based on the typical range in single-cell RNA-seq data.

◆ minimum_window_count

int scran_variances::FitVarianceTrendOptions::minimum_window_count = 200

Minimum number of observations in each window when FitVarianceTrendOptions::use_minimum_width = true. This ensures that each window contains at least a given number of observations for a stable fit. If the minimum width window contains fewer observations, it is extended using the standard LOWESS logic until the minimum number is achieved.

◆ num_threads

int scran_variances::FitVarianceTrendOptions::num_threads = 1

Number of threads to use in the LOWESS fit. The parallelization scheme is defined by WeightedLowess::parallelize().


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