diff options
| author | Alexander_Kabui | 2024-10-29 17:11:50 +0300 |
|---|---|---|
| committer | Alexander_Kabui | 2024-10-29 17:13:57 +0300 |
| commit | 741e88920bc71945b76702bc3ddd0bee2e93acd6 (patch) | |
| tree | d47a665fef8bfe17c288c3dee708a36bfdc39e35 | |
| parent | 965ba2a3878808fd05f36aca76f722b36ca64353 (diff) | |
| download | genenetwork3-741e88920bc71945b76702bc3ddd0bee2e93acd6.tar.gz | |
Refactor: refactor code to find lod peaks.
| -rw-r--r-- | scripts/rqtl2_wrapper.R | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/scripts/rqtl2_wrapper.R b/scripts/rqtl2_wrapper.R index 946b76e..d8cf755 100644 --- a/scripts/rqtl2_wrapper.R +++ b/scripts/rqtl2_wrapper.R @@ -23,8 +23,6 @@ if (length(args) == 0) { json_file_path = args[1] } -# TODO validation for the json file - if (!(file.exists(json_file_path))) { stop("The input file path does not exists") @@ -407,20 +405,19 @@ get_lod_significance <- function(perm, threshold = c(0.2, 0.05)){ cat("\n") summary(perm, alpha = threshold) } - lod_significance <- get_lod_significance(perm) -stop("Test kkk") -# function to perform the LOD peaks -find_lod_peaks <-function(scan_results, cross, threshold=4, drop=1.5){ -# can this take pmap??? which map should we use??? -# TODO add more ags -print("Finding the lod peaks with thresholds n and drop n\n") -return (find_peaks(scan_results, cross$gmap, threshold= threshold, drop=drop)) -} -# TODO! add the number of cores -lod_peaks <- find_lod_peaks(scan_results, dataset) -print(lod_peaks) -# TODO! format to return the data ??? \ No newline at end of file +# get the lod peaks +# fix issue with map + +cat("Fetching the lod peaks\n") +lod_peaks = find_peaks( + scan_results, + threshold =0, + map = dataset$gmap, + cores = NO_OF_CORES +) + +lod_peaks |
