Learn R Programming

SeqArray (version 1.10.1)

seqSummary: Summarize the Sequence GDS File

Description

Gets the summary of sequence GDS file.

Usage

seqSummary(gdsfile, varname=NULL, check=c("check", "full.check", "none"), verbose=TRUE)

Arguments

gdsfile
varname
if NULL, check the whole GDS file; or a character specifying variable name, and return a description of that variable. See details.
check
should be one of "check", "full.check", "none"
verbose
if TRUE, display information

Value

If varname = NULL, then return a list:
filename
the file name
format.version
the sequencing format in GDS
num.of.sample
the number of samples
num.of.variant
the number of variants
info
the description of the INFO field: var.name, number, type and description
format
the description of the FORMAT field: var.name, number, type and description
sample.annot
the description of the sample annotation: var.name
If varname = "genotype" or "phase", then return a list:
dim
dim[1] -- ploidy, dim[2] -- the number of samples, dim[3] -- the number of variants
seldim
seldim[1] -- the number of selected samples, seldim[2] -- the number of selected variants

Details

If check = "check", this function performs regular checking: dimensions of variables, etc. If check = "full.check", it performs more checking: unique sample id, unique variant id, whether genotypic data are in a valid range or not, etc.

See Also

seqGetData, seqApply

Examples

Run this code
# the GDS file
(gds.fn <- seqExampleFileName("gds"))

seqSummary(gds.fn)

seqSummary(gds.fn, "genotype")


# open a GDS file
f <- seqOpen(gds.fn)

# get 'sample.id
samp.id <- seqGetData(f, "sample.id")
# get 'variant.id'
variant.id <- seqGetData(f, "variant.id")

# set sample and variant filters
seqSetFilter(f, sample.id=samp.id[c(2,4,6,8,10)])
set.seed(100)
seqSetFilter(f, variant.id=sample(variant.id, 10))

seqSummary(f, "genotype")

# close a GDS file
seqClose(f)

Run the code above in your browser using DataLab