The function requires the following inputs:
1) A sample-by-variable dataframe with phenotypes and covariates.
Column names should include an ID variable, sex variable,
genotypic covariate names, phenotypic covariate names,
and phenotype names. (N.B. a secondary ID variable can be included
in the genotypic covariate names.)
2) A string identifying the ID variable name (e.g., id.var="ID").
3) A vector of genotypic covariates
(e.g., geno.vars=c("ID2","Batch","PC1","PC2",...)).
4) Optional: within.sex = FALSE. Default is within.sex = TRUE
and will permute males and females separately.
5) If within.sex = TRUE (the default), a string identifying the
sex variable name (e.g., sex.var="Inferred_Sex").
6) If within.sex = TRUE (the default), male and female values
in the sex vector (e.g., male.val=1, female.val=2).
7) Optional: a seed for sampling. If a seed is not provided, one will be
chosen randomly during the sampling process (e.g., seed=123).
8) N.B. Any column names not specified in (2)-(6) are assumed to be
phenotypes or phenotypic covariates.