From 6772765677c5558532850d8ab03f336b5aeb9f27 Mon Sep 17 00:00:00 2001 From: Alexander_Kabui Date: Tue, 29 Oct 2024 16:33:16 +0300 Subject: Refactor: refactor function to generate plots from scan1 function. --- scripts/rqtl2_wrapper.R | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/rqtl2_wrapper.R b/scripts/rqtl2_wrapper.R index 27c0195..3a0fcd5 100644 --- a/scripts/rqtl2_wrapper.R +++ b/scripts/rqtl2_wrapper.R @@ -272,7 +272,12 @@ scan_results # plot for the LOD scores from performing the genome scan generate_lod_plot <- function(cross, scan_result, method, base_dir = ".") { - # Plot LOD curves for a genome scan + #' @description Plot LOD curves for a genome scan + #' @param the cross object + #' @param scan1 results + #' @param the method used to compute the scan1 results HK,LMM or LOCO + #' @param base_dir the path to write the generated plot + #' @return a string with the file path for the plot color <- c("slateblue", "violetred", "green3") par(mar = c(4.1, 4.1, 1.6, 1.1)) ymx <- maxlod(scan_result) @@ -302,6 +307,7 @@ generate_lod_plot <- function(cross, scan_result, method, base_dir = ".") { return (image_loc) } + lod_file_path <- generate_lod_plot(dataset, scan_results, "HK") lod_file_path -- cgit 1.4.1