effect_plots | R Documentation |
Create effect plots for significant QTLs found with
qtl_perm_test
.
effect_plots(x_data_sim, qtl_data, cpus = 1, plots_dir = tempdir())
x_data_sim |
Cross-data frame simulated with |
qtl_data |
Significant QTL data. |
cpus |
Number of CPUs to be used in the computation. |
plots_dir |
Output directory for plots. |
qtl_perm_test
# Toy dataset excluded_columns <- c(1, 2) population <- 5 seed <- 1 example_data <- data.frame(ID = 1:population, P1 = c("one", "two", "three", "four", "five"), T1 = rnorm(population), T2 = rnorm(population)) example_data_normalised <- data.frame(index = rep(c(1, 2), each = 5), trait = rep(c("T1", "T2"), each = 5), values = c(example_data$T1, example_data$T2), flag = "Normal", transf = "", transf_val = NA, stringsAsFactors = FALSE) out_prefix <- here::here("metapipe") example_data_normalised_post <- MetaPipe:::assess_normality_postprocessing(example_data, excluded_columns, example_data_normalised, out_prefix = out_prefix) # Create and store random genetic map (for testing only) genetic_map <- MetaPipe:::random_map(population = population, seed = seed) write.csv(genetic_map, here::here("metapipe_genetic_map.csv"), row.names = FALSE) # Load cross file with genetic map and raw data for normal traits x <- qtl::read.cross(format = "csvs", dir = here::here(), genfile = "metapipe_genetic_map.csv", phefile = "metapipe_raw_data_norm.csv") set.seed(seed) x <- qtl::jittermap(x) x <- qtl::calc.genoprob(x, step = 1, error.prob = 0.001) x_qtl_perm <- MetaPipe::qtl_perm_test(x, n_perm = 5, model = "normal", method = "hk") x_sim <- qtl::sim.geno(x) MetaPipe::effect_plots(x_sim, x_qtl_perm) # Clean up example outputs MetaPipe:::tidy_up(c("EFF-", "LOD-", "metapipe"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.