diff options
| author | Alexander_Kabui | 2024-11-11 10:27:05 +0300 |
|---|---|---|
| committer | Alexander_Kabui | 2024-11-11 10:27:05 +0300 |
| commit | e177ba8d9ad80261f980efca59a87aae2c0939c6 (patch) | |
| tree | 63ea8563e014a4660c1f4f0ee09fd53a3f5c8f27 /scripts/rqtl2_wrapper.R | |
| parent | 5a996dfe02abf9fa25563844662372f003dbd67e (diff) | |
| download | genenetwork3-e177ba8d9ad80261f980efca59a87aae2c0939c6.tar.gz | |
feat: export chromosome names and qtl effects.
Diffstat (limited to 'scripts/rqtl2_wrapper.R')
| -rw-r--r-- | scripts/rqtl2_wrapper.R | 16 |
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) - - - |
