From 12492df719a8daf40df9735ab384846a5f5f4e63 Mon Sep 17 00:00:00 2001 From: Qiong Yang Date: Sat, 23 Nov 2024 20:53:56 -0500 Subject: [PATCH] replace refDosage() by imputedDosage() to read DS from format --- .Rbuildignore | 2 ++ R/admixMap.R | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.Rbuildignore b/.Rbuildignore index 4862ac6..4ff7437 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -1,3 +1,5 @@ ^renv$ ^renv\.lock$ ^\.github$ +^.*\.Rproj$ +^\.Rproj\.user$ diff --git a/R/admixMap.R b/R/admixMap.R index 65ccf16..7c46ccd 100644 --- a/R/admixMap.R +++ b/R/admixMap.R @@ -81,7 +81,9 @@ admixMap <- function(admixDataList, if (is(admixDataList[[1]], "GenotypeIterator")) { local[,,i] <- getGenotypeSelection(admixDataList[[i]], scan=sample.index, order="selection", transpose=TRUE, use.names=FALSE, drop=FALSE) } else { - local[,,i] <- refDosage(admixDataList[[i]], use.names=FALSE)[sample.index,,drop=FALSE] + # local[,,i] <- refDosage(admixDataList[[i]], use.names=FALSE)[sample.index,,drop=FALSE] + local[,,i] <- imputedDosage(admixDataList[[i]], use.names=FALSE)[sample.index,,drop=FALSE] + } } if (any(is.na(local))) warning("missing values in local ancestry will produce NA output for this block")