diff --git a/R/MVP.Data.r b/R/MVP.Data.r index 17a0c57..5aaa77a 100755 --- a/R/MVP.Data.r +++ b/R/MVP.Data.r @@ -183,6 +183,8 @@ MVP.Data <- function(fileMVP = NULL, fileVCF = NULL, fileHMP = NULL, fileBed = N sep = sep.kin, cpu = ncpus ) + }else{ + K <- NULL } # get pc diff --git a/R/MVP.PCA.r b/R/MVP.PCA.r index 77430d4..9485120 100755 --- a/R/MVP.PCA.r +++ b/R/MVP.PCA.r @@ -60,7 +60,7 @@ function(M=NULL, K=NULL, maxLine=10000, ind_idx=NULL, mrk_idx=NULL, pcs.keep=5, if(is.null(K)){ K <- MVP.K.VanRaden(M=M, ind_idx = ind_idx, mrk_idx = mrk_idx, maxLine = maxLine, cpu = cpu, verbose = verbose) }else{ - K <- K[ind_idx, ind_idx] + if(!is.null(ind_idx)) K <- K[ind_idx, ind_idx] } logging.log("Eigen Decomposition on GRM", "\n", verbose = verbose) diff --git a/src/mvp_omp.h b/src/mvp_omp.h index 04c9e4d..8eb9c99 100755 --- a/src/mvp_omp.h +++ b/src/mvp_omp.h @@ -17,7 +17,6 @@ #if defined(_OPENMP) #include -// [[Rcpp::plugins(openmp)]] #else #endif