Learn R Programming

SeqArray (version 1.8.0)

seqSummary: Get the summary of a GDS file

Description

Get the summary of a sequencing 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
sequence.variant.format
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
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
(gds.fn <- seqExampleFileName("gds"))
# or gds.fn <- "C:/YourFolder/Your_GDS_File.gds"

seqSummary(gds.fn)

seqSummary(gds.fn, "genotype")


######################################################
# display
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