This function takes in a data object and genotype object that have been formatted for cape, as well as a string identifying a parameter file. It runs cape on the data using the parameters specified in the file.
run_cape(
pheno_obj,
geno_obj,
results_file = "cross.RDS",
p_or_q = 0.05,
n_cores = 4,
initialize_only = FALSE,
verbose = TRUE,
run_parallel = FALSE,
param_file = NULL,
yaml_params = NULL,
results_path = NULL,
plot_pdf = TRUE
)
This function invisibly returns the data object with all final data included. In addition, data saved to the data_obj$results_path directory
the cape object holding the phenotype data returned by
the genotype object
the name of the saved data_obj RDS file. The base name is used as the base name for all saved RDS files.
A threshold indicating the maximum adjusted p value considered significant. Or, if FDR p value correction is used, the the maximum q value considered significant.
The number of CPUs to use if run_parallel is set to TRUE
If TRUE, cape will not be run. Instead an initialized data object will be returned. This data object will contain normalized and mean-centered trait values, and eigentraits, and will have covariates specified. However, the singlescan, pairscan, etc. will not be run.
Whether progress should be printed to the screen
boolean, if TRUE runs certain parts of the code as parallel blocks
yaml full path to the parameter file
yaml string containing the parameters. Either the param_file or yaml_params can be null.
path that results should be written to.
boolean, TRUE by default. If FALSE no pdf will be generated by the analysis.
This function assumes you already have all required libraries and functions loaded.
if (FALSE) {
final_data_obj <- run_cape(pheno_obj, geno_obj)
}
Run the code above in your browser using DataLab