Skip to content

Commit

Permalink
tweak display
Browse files Browse the repository at this point in the history
  • Loading branch information
zhengxwen committed Mar 28, 2024
1 parent ae90aa3 commit 169b9a1
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 13 deletions.
4 changes: 2 additions & 2 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ UTILITIES
sex chromosomes, when the alleles are partially missing (e.g., genotypes
on chromosome X for males)

o new 'verbose.clean' in `seqExport()` to control the level of information
display
o new 'verbose.clean' in `seqExport()` to control how much information to
be displayed


CHANGES IN VERSION 1.42.3
Expand Down
5 changes: 2 additions & 3 deletions R/UtilsMerge.R
Original file line number Diff line number Diff line change
Expand Up @@ -274,9 +274,8 @@ seqMerge <- function(gds.fn, out.fn, storage.option="LZMA_RA",

if (verbose)
{
cat(date(), "\n", sep="")
cat(sprintf("Preparing merging %d GDS files:\n",
length(gds.fn)))
.cat(sprintf("Preparing merging %d GDS files (%s):", length(gds.fn),
date()))
}

# open all GDS files
Expand Down
16 changes: 8 additions & 8 deletions src/Index.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1231,13 +1231,13 @@ void CProgress::ShowProgress()
ConnPutText(File, "[%s] %2.0f%%, %s %s", bar, p,
vCounter < vTotalCount ? "ETC:" : "completed,", time_str(s));
if (R_Process_Count && R_Process_Index && (*R_Process_Count>1))
ConnPutText(File, " (process %d)", *R_Process_Index);
ConnPutText(File, " (process %d/%d)", *R_Process_Index, *R_Process_Count);
ConnPutText(File, "\n");
} else {
ConnPutText(File, "\r[%s] %2.0f%%, %s %s", bar, p,
vCounter < vTotalCount ? "ETC:" : "completed,", time_str(s));
if (R_Process_Count && R_Process_Index && (*R_Process_Count>1))
ConnPutText(File, " (process %d)", *R_Process_Index);
ConnPutText(File, " (process %d/%d)", *R_Process_Index, *R_Process_Count);
ConnPutText(File, " ");
if (vCounter >= vTotalCount) ConnPutText(File, "\n");
}
Expand All @@ -1255,7 +1255,7 @@ void CProgress::ShowProgress()
} else
ConnPutText(File, "[: (0 line)] %s", dt);
if (R_Process_Count && R_Process_Index && (*R_Process_Count>1))
ConnPutText(File, " (process %d)", *R_Process_Index);
ConnPutText(File, " (process %d/%d)", *R_Process_Index, *R_Process_Count);
ConnPutText(File, "\n");
} else {
if (vCounter > 0)
Expand All @@ -1265,7 +1265,7 @@ void CProgress::ShowProgress()
} else
ConnPutText(File, "\r[: (0 line)] %s", dt);
if (R_Process_Count && R_Process_Index && (*R_Process_Count>1))
ConnPutText(File, " (process %d)", *R_Process_Index);
ConnPutText(File, " (process %d/%d)", *R_Process_Index, *R_Process_Count);
}
}
(*File->fflush)(File);
Expand Down Expand Up @@ -1329,8 +1329,8 @@ void CProgressStdOut::ShowProgress()
"\r[%s] 100%%, completed, %s", bar, time_str(s));
if (R_Process_Count && R_Process_Index && (*R_Process_Count>1))
{
snprintf(buffer+n, sizeof(buffer)-n, " (process %d)",
*R_Process_Index);
snprintf(buffer+n, sizeof(buffer)-n, " (process %d/%d)",
*R_Process_Index, *R_Process_Count);
}
Rprintf("%s\n", buffer);
} else if ((interval >= 5) || (vCounter <= 0))
Expand All @@ -1341,8 +1341,8 @@ void CProgressStdOut::ShowProgress()
"\r[%s] %2.0f%%, ETC: %s", bar, p, time_str(s));
if ((vCounter>0) && R_Process_Count && R_Process_Index && (*R_Process_Count>1))
{
n += snprintf(buffer+n, sizeof(buffer)-n, " (process %d)",
*R_Process_Index);
n += snprintf(buffer+n, sizeof(buffer)-n, " (process %d/%d)",
*R_Process_Index, *R_Process_Count);
}
strcpy(buffer+n, " ");
Rprintf("%s", buffer);
Expand Down

0 comments on commit 169b9a1

Please sign in to comment.