about summary refs log tree commit diff
path: root/scripts/rqtl2_wrapper.R
diff options
context:
space:
mode:
authorAlexander_Kabui2024-10-29 16:33:16 +0300
committerAlexander_Kabui2024-10-29 16:33:16 +0300
commit6772765677c5558532850d8ab03f336b5aeb9f27 (patch)
tree7b044ebdecb8388c578afb2e3d817d72ce56d2b6 /scripts/rqtl2_wrapper.R
parent9043e19f7b5b79a1492af9fd1e20a9008b31e982 (diff)
downloadgenenetwork3-6772765677c5558532850d8ab03f336b5aeb9f27.tar.gz
Refactor: refactor function to generate plots from scan1 function.
Diffstat (limited to 'scripts/rqtl2_wrapper.R')
-rw-r--r--scripts/rqtl2_wrapper.R8
1 files changed, 7 insertions, 1 deletions
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