Filter Samples Based on Case Control Criteria
filter_case_control.RdThis function filters the samples in the provided data frame based on case control criteria. It excludes individuals without a matched caseset and those matched casesets with more than two individuals. It also provides information on excluded samples.
Arguments
- df
A data frame containing feature data where rows represent samples and columns represent features.
- df_meta_samples
A data frame containing sample metadata with at least the column specified by
col_case_control.- col_case_control
A string specifying the column name in
df_meta_samplesthat indicates case control groups.- col_samples
A string specifying the column name in
df_meta_samplesto use for sample filtering (e.g., ID column).