From 36d7f0738ff427786ab6f6e372bb82665674c85e Mon Sep 17 00:00:00 2001 From: Xiuwen Zheng Date: Tue, 26 Mar 2024 18:55:47 -0500 Subject: [PATCH] tweak verbose in snpgdsLDpruning --- R/LD.R | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/R/LD.R b/R/LD.R index d55af19..556b769 100755 --- a/R/LD.R +++ b/R/LD.R @@ -193,6 +193,7 @@ snpgdsLDpruning <- function(gdsobj, sample.id=NULL, snp.id=NULL, } else { .Call(gnrSetSeqSpace, gdsobj, samp.flag, flag) } + if (verbose) cat(sprintf("Chrom %s: ", ch)) # call LD prune for this chromosome startidx <- switch(start.pos, @@ -214,10 +215,10 @@ snpgdsLDpruning <- function(gdsobj, sample.id=NULL, snp.id=NULL, if (verbose) { ntmp <- sum(rv); ntot <- sum(chr == ch) - cat(sprintf("Chromosome %s: %0.2f%%, %s / %s\n", - as.character(ch), 100*ntmp/ntot, + cat(sprintf(" %0.2f%%, %s / %s (%s)\n", 100*ntmp/ntot, prettyNum(ntmp, ",", scientific=FALSE), - prettyNum(ntot, ",", scientific=FALSE))) + prettyNum(ntot, ",", scientific=FALSE), + date())) } # autosave