seqResetVariantID: Reset Variant ID in SeqArray GDS Files

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/UtilsMerge.R

Description

Resets the variant IDs in multiple SeqArray GDS files.

Usage

1
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
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)

SeqArray documentation built on Nov. 8, 2020, 5:08 p.m.