seqResetVariantID: Reset Variant ID in SeqArray GDS Files

View source: R/UtilsMerge.R

seqResetVariantIDR Documentation

Reset Variant ID in SeqArray GDS Files

Description

Resets the variant IDs in multiple SeqArray GDS files.

Usage

seqResetVariantID(gds.fn, set=NULL, digest=TRUE, optimize=TRUE, verbose=TRUE)

Arguments

gds.fn

a character vector of multiple GDS file names

set

NULL or a logical vector; NULL for resetting all files, or TRUE for resetting variant.id for that GDS file

digest

a logical value, if TRUE, add a md5 hash code

optimize

if TRUE, optimize the access efficiency by calling cleanup.gds

verbose

if TRUE, show information

Details

The variant IDs will be replaced by the numbers in sequential order and adjacent to each file. The variant ID starts from 1 in the first GDS file.

Value

None.

Author(s)

Xiuwen Zheng

See Also

seqVCF2GDS

Examples

fn <- seqExampleFileName("gds")

file.copy(fn, "tmp1.gds", overwrite=TRUE)
file.copy(fn, "tmp2.gds", overwrite=TRUE)

gds.fn <- c("tmp1.gds", "tmp2.gds")
seqResetVariantID(gds.fn)

f <- seqOpen("tmp1.gds")
head(seqGetData(f, "variant.id"))
seqClose(f)

f <- seqOpen("tmp2.gds")
head(seqGetData(f, "variant.id"))
seqClose(f)


# delete the temporary files
unlink(gds.fn, force=TRUE)

zhengxwen/SeqArray documentation built on Dec. 14, 2024, 8:36 p.m.