Control function which specifies the quality flag settings. One or more settings can be customized. Not specified settings are left at defaults.
control_quality(
min_cpm = 1,
min_cpm_prop = 0.25,
min_corr = 0.5,
min_depth = NULL
)
(non-negative number
)
minimum Counts per Million (CPM) for
each gene within the sample.
(proportion
)
minimum proportion of samples with
acceptable CPM of certain gene for low expression flagging.
(proportion
)
minimum Pearson correlation coefficient of
CPM between samples for technical failure flagging.
(non-negative count
or NULL
)
minimum library depth
for low depth flagging. If NULL
, this will be calculated as the first
quartile minus 1.5 times the inter-quartile range of the library size
(depth) of all samples. (So anything below the usual lower boxplot whisker
would be too low.)
List with the above criteria to flag observations.
To be used with the add_quality_flags()
function.
# Default settings.
control_quality()
#> $min_cpm
#> [1] 1
#>
#> $min_cpm_prop
#> [1] 0.25
#>
#> $min_corr
#> [1] 0.5
#>
#> $min_depth
#> NULL
#>
# One or more settings can be customized.
control_quality(min_cpm = 5, min_cpm_prop = 0.001)
#> $min_cpm
#> [1] 5
#>
#> $min_cpm_prop
#> [1] 0.001
#>
#> $min_corr
#> [1] 0.5
#>
#> $min_depth
#> NULL
#>