Skip to content

Commit

Permalink
update seqExport()
Browse files Browse the repository at this point in the history
  • Loading branch information
zhengxwen committed Mar 27, 2024
1 parent b29f95f commit ae90aa3
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 7 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Package: SeqArray
Type: Package
Title: Data Management of Large-Scale Whole-Genome Sequence Variant Calls
Version: 1.42.3
Date: 2024-03-22
Version: 1.43.4
Date: 2024-03-27
Depends: R (>= 3.5.0), gdsfmt (>= 1.31.1)
Imports: methods, parallel, IRanges, GenomicRanges, GenomeInfoDb, Biostrings,
S4Vectors
Expand Down
3 changes: 3 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ 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


CHANGES IN VERSION 1.42.3
-------------------------
Expand Down
8 changes: 5 additions & 3 deletions R/UtilsExport.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# Export to a GDS file
#
seqExport <- function(gdsfile, out.fn, info.var=NULL, fmt.var=NULL,
samp.var=NULL, optimize=TRUE, digest=TRUE, verbose=TRUE)
samp.var=NULL, optimize=TRUE, digest=TRUE, verbose=TRUE, verbose.clean=NA)
{
stopifnot(inherits(gdsfile, "SeqVarGDSClass"))
stopifnot(is.character(out.fn), length(out.fn)==1L)
Expand All @@ -23,6 +23,8 @@ seqExport <- function(gdsfile, out.fn, info.var=NULL, fmt.var=NULL,
stopifnot(is.logical(optimize), length(optimize)==1L)
stopifnot(is.logical(digest) | is.character(digest), length(digest)==1L)
stopifnot(is.logical(verbose), length(verbose)==1L)
stopifnot(is.logical(verbose.clean), length(verbose.clean)==1L)
if (is.na(verbose.clean)) verbose.clean <- verbose

#######################################################################

Expand Down Expand Up @@ -331,9 +333,9 @@ seqExport <- function(gdsfile, out.fn, info.var=NULL, fmt.var=NULL,
# optimize access efficiency
if (optimize)
{
if (verbose)
if (verbose.clean)
cat("Optimize the access efficiency ...\n")
cleanup.gds(out.fn, verbose=verbose)
cleanup.gds(out.fn, verbose=verbose.clean)
}

# output
Expand Down
7 changes: 5 additions & 2 deletions man/seqExport.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ by \code{seqSetFilter()}.
}
\usage{
seqExport(gdsfile, out.fn, info.var=NULL, fmt.var=NULL, samp.var=NULL,
optimize=TRUE, digest=TRUE, verbose=TRUE)
optimize=TRUE, digest=TRUE, verbose=TRUE, verbose.clean=NA)
}
\arguments{
\item{gdsfile}{a \code{\link{SeqVarGDSClass}} object}
Expand All @@ -24,14 +24,17 @@ seqExport(gdsfile, out.fn, info.var=NULL, fmt.var=NULL, samp.var=NULL,
"sha256", "sha384" or "sha512"); add md5 hash codes to the GDS file
if TRUE or a digest algorithm is specified}
\item{verbose}{if \code{TRUE}, show information}
\item{verbose.clean}{when \code{verbose.clean=NA}, set it to \code{verbose};
whether display information when calling \code{cleanup.gds} or not;
only applicable when \code{optimize=TRUE}}
}
\value{
Return the file name of GDS format with an absolute path.
}

\author{Xiuwen Zheng}
\seealso{
\code{\link{seqVCF2GDS}}
\code{\link{seqVCF2GDS}}, \code{\link{cleanup.gds}}
}

\examples{
Expand Down

0 comments on commit ae90aa3

Please sign in to comment.