Validates that GWAS summary statistics meet the requirements for B estimation. Checks for required columns, valid value ranges, and data consistency.
validate_B_training_data(data, method = "auto", verbose = 1)List with elements:
valid: Logical indicating if data is valid
errors: Character vector of error messages (empty if valid)
warnings: Character vector of warning messages
summary: Summary statistics about the data
Validation Checks:
Required for all methods:
MAF column present and values in (0, 1)
P column present and values in (0, 1)
N column present and values > 0
Additional for beta method:
BETA column present and numeric
Data consistency checks:
No duplicate rsIDs (warning if present)
Reasonable sample sizes (warning if very small or very large)
MAF harmonized to <= 0.5
Computational complexity: O(n x c) where n = number of variants, c = number of columns to validate. Current implementation makes multiple passes through the data.