@@ -27,6 +27,7 @@ seqGDS2VCF <- function(gdsfile, vcf.fn, info.var=NULL, fmt.var=NULL,
2727 stopifnot(is.character(chr_prefix ), length(chr_prefix )== 1L )
2828 stopifnot(is.logical(use_Rsamtools ), length(use_Rsamtools )== 1L )
2929 stopifnot(is.logical(verbose ), length(verbose )== 1L )
30+ show_timeheader <- ! isTRUE(attr(verbose , " header_no_time" ))
3031
3132 if (is.character(gdsfile ))
3233 {
@@ -130,7 +131,7 @@ seqGDS2VCF <- function(gdsfile, vcf.fn, info.var=NULL, fmt.var=NULL,
130131
131132 if (verbose )
132133 {
133- .cat(date ())
134+ if ( show_timeheader ) .cat(" ##< " , .tm ())
134135 .cat(" VCF Export: " , basename(vcf.fn ))
135136 s <- .seldim(gdsfile )
136137 .cat(" " , .pretty(s [2L ]), " sample" , .plural(s [2L ]), " , " ,
@@ -346,8 +347,16 @@ seqGDS2VCF <- function(gdsfile, vcf.fn, info.var=NULL, fmt.var=NULL,
346347 # finalize
347348 .Call(SEQ_ToVCF_Done )
348349 on.exit({
350+ if (outfmt == 2L )
351+ {
352+ if (verbose ) cat(" VCF indexing ...\n " )
353+ Rsamtools :: indexTabix(vcf.fn , format = " vcf" )
354+ }
349355 if (verbose )
350- cat(date(), " Done.\n " , sep = " " )
356+ {
357+ cat(" Done.\n " )
358+ if (show_timeheader ) .cat(" ##> " , .tm())
359+ }
351360 }, add = TRUE )
352361
353362 # output
0 commit comments