Scientific validation utilities
scientific_validation.RdDeterministic fixtures, independent numerical calculations, PCA subspace comparison, and the bundled scientific-validation suite.
Usage
validation_tolerances()
validation_statistics(
genotype,
sample_ids = rownames(genotype),
variant_ids = colnames(genotype)
)
align_pca_signs(target, reference)
compare_validation_values(
observed,
expected,
tolerance,
label = "comparison"
)
manual_ibs_matrix(genotype)
compare_pca_subspaces(observed, expected, components = 2L)
manual_population_diversity(genotype, populations)
run_scientific_validation(integration = FALSE, threads = 1L)Arguments
- genotype
Numeric sample-by-variant genotype dosage matrix containing values 0, 1, 2, or
NA.- sample_ids
Optional character vector of sample identifiers.
- variant_ids
Optional character vector of variant identifiers.
- target
Numeric PCA score matrix whose component signs will be aligned.
- reference
Numeric reference PCA matrix with matching dimensions.
- observed
Observed numeric vector or matrix. For PCA subspace comparison, the observed score or eigenvector matrix.
- expected
Expected numeric vector or matrix. For PCA subspace comparison, the independent reference matrix.
- tolerance
Maximum permitted absolute numerical difference.
- label
Character label attached to the comparison result.
- components
Positive integer number of leading PCA components.
- populations
Population label for every genotype-matrix row.
- integration
Logical; run the complete SNPRelate and independent reference integration checks.
- threads
Positive integer number of requested threads. LD validation is capped at four threads.