about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAlexander_Kabui2024-11-11 10:27:05 +0300
committerAlexander_Kabui2024-11-11 10:27:05 +0300
commite177ba8d9ad80261f980efca59a87aae2c0939c6 (patch)
tree63ea8563e014a4660c1f4f0ee09fd53a3f5c8f27
parent5a996dfe02abf9fa25563844662372f003dbd67e (diff)
downloadgenenetwork3-e177ba8d9ad80261f980efca59a87aae2c0939c6.tar.gz
feat: export chromosome names and qtl effects.
-rw-r--r--scripts/rqtl2_wrapper.R16
1 files changed, 13 insertions, 3 deletions
diff --git a/scripts/rqtl2_wrapper.R b/scripts/rqtl2_wrapper.R
index b68c82f..7bdc29a 100644
--- a/scripts/rqtl2_wrapper.R
+++ b/scripts/rqtl2_wrapper.R
@@ -467,16 +467,29 @@ covar  <- NULL
 covar
 
 
+
 # TODO fix this hardcoded chromosome
 # TODO get all chromosomes and iterate coeff_results for a given chromosomes
 coeff_results  <- get_qtl_effect("5", Pr, pheno)
 
+meffects <- c()
+# TODO add plots for meffects
+
+for (chr in chr_names(dataset)){
+  cat("Getting the qtl effect for chromosome", chr)
+  cat("\n")
+   coeff_results  <- get_qtl_effect(chr, Pr, pheno)
+    meffects <- append(meffects, coeff_results)
+}
+
 output = list(lod_peaks = lod_peaks,
              scan_results =scan_results,
 	     genetic_probabilities = Pr,
 	     lod_significance = lod_significance,
 	     permutation_results = perm,
 	     lod_peaks = lod_peaks,
+	     chromosomes  = chr_names(dataset),
+	     meffects = meffects,
 	     lod_plot_path =lod_plot_path,
 	     scan_method = SCAN_METHOD  
 	     )
@@ -487,6 +500,3 @@ str_glue("The output file path is  {output_file_path}")
 cat("Writing to the output file\n")
 write(output_json_data, file=output_file_path)
 
-
-
-