Learn R Programming

SeqArray (version 1.10.1)

seqSetFilterChrom: Chromosome Selection

Description

Selects the variants according to the specified chromosome(s).

Usage

seqSetFilterChrom(gdsfile, include=NULL, is.num=NA, from.bp=NaN, to.bp=NaN)

Arguments

gdsfile
include
NULL, or character for specified chromosome(s)
is.num
a logical variable: TRUE, chromosome code is numeric; FALSE, chromosome is not numeric
from.bp
numeric, the lower bound of position
to.bp
numeric, the upper bound of position

Value

None.

See Also

seqSetFilter

Examples

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

f <- seqOpen(gds.fn)
seqSummary(f)


seqSetFilterChrom(f, is.num=TRUE)
seqSummary(f, "genotype", check="none")

seqSetFilterChrom(f, is.num=FALSE)
seqSummary(f, "genotype", check="none")

seqSetFilterChrom(f, 1:4)
seqSummary(f, "genotype", check="none")
table(seqGetData(f, "chromosome"))

# HLA region
seqSetFilterChrom(f, 6, from.bp=29719561, to.bp=32883508)
seqSummary(f, "genotype", check="none")


# close the GDS file
seqClose(f)

Run the code above in your browser using DataLab