flag_detection: Flag features with low detection rate

flag_detectionR Documentation

Flag features with low detection rate

Description

Flags features with too high amount of missing values. There are two detection rate limits, both defined as the minimum proportion of samples that need to have a value (not NA) for the feature to be kept. qc_limit is the detection rate limit for QC samples, group_limit is the detection rate limit for the actual study groups. If the group limit is passed for AT LEAST ONE GROUP, then the feature is kept. Features with low detection rate in QCs are flagged as "Low_qc_detection", while low detection rate in the study groups is flagged as "Low_group_detection". The detection rates for all the groups are recorded in fData(object).

Usage

flag_detection(
  object,
  qc_limit = 0.7,
  group_limit = 0.5,
  group = group_col(object)
)

Arguments

object

a MetaboSet object

qc_limit

the detection rate limit for QC samples

group_limit

the detection rate limit for study groups

group

the columns name in sample information to use as the grouping variable

Value

a MetaboSet object with the features flagged

Examples

ex_set <- flag_detection(merged_sample)
fData(ex_set)


antonvsdata/notame documentation built on Sept. 14, 2024, 11:09 p.m.