Control function which specifies the quality flag settings. One or more settings can be customized. Not specified settings are left at defaults.
Arguments
- min_cpm
(non-negative
number
)
minimum Counts per Million (CPM
) for each gene within the sample.- min_cpm_prop
(
proportion
)
minimum proportion of samples with acceptableCPM
of certain gene for low expression flagging.- min_corr
(
proportion
)
minimum Pearson correlation coefficient ofCPM
between samples for technical failure flagging.- min_depth
(non-negative
count
orNULL
)
minimum library depth for low depth flagging. IfNULL
, 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.)
Note
To be used with the add_quality_flags()
function.
Examples
# 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
#>