Skip to content

Commit

Permalink
tweak verbose in snpgdsLDpruning
Browse files Browse the repository at this point in the history
  • Loading branch information
zhengxwen committed Mar 26, 2024
1 parent fbf14aa commit 36d7f07
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions R/LD.R
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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
Expand Down

0 comments on commit 36d7f07

Please sign in to comment.