R/deep_mutational_scan.R
validate_deep_mutational_scan.RdCheck properties of deep_mutational_scan object adhere to various baseline expectations, which would lead to downstream errors if not caught.
validate_deep_mutational_scan(x)
| x |
|
|---|
The input is returned unaltered, since the main purpose of the function is to raise an error if the object is erroneous.
The following assumptions are currently checked:
Correct class set
Correct fields present
data is a tibble
imputed is logical
annotated is logical
multi_study is logical
data contains the correct columns and no incorrect ones
data contains no duplicate rows
meta list is correctly structured
meta list contains values for each unique name
The correct additional columns are present when the object is annotated or imputed
No NA scores remain for imputed objects
Objects listed as multi_study contain data from multiple studies