From e177ba8d9ad80261f980efca59a87aae2c0939c6 Mon Sep 17 00:00:00 2001 From: Alexander_Kabui Date: Mon, 11 Nov 2024 10:27:05 +0300 Subject: feat: export chromosome names and qtl effects. --- scripts/rqtl2_wrapper.R | 16 +++++++++++++--- 1 file 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) - - - -- cgit 1.4.1