Usage
snpgdsSlidingWindow(gdsobj, sample.id=NULL, snp.id=NULL, FUN=NULL, winsize=100000L, shift=10000L, unit=c("basepair", "locus"), winstart=NULL, autosome.only=FALSE, remove.monosnp=TRUE, maf=NaN, missing.rate=NaN, as.is=c("list", "numeric", "array"), with.id=c("snp.id", "snp.id.in.window", "none"), num.thread=1, verbose=TRUE, ...)
Arguments
sample.id
a vector of sample id specifying selected samples;
if NULL, all samples are used
snp.id
a vector of snp id specifying selected SNPs; if NULL,
all SNPs are used
FUN
the user-defined function, see details
winsize
the size of sliding window
shift
the amount of shifting the sliding window
unit
"basepair"
-- winsize
and shift
are
applied with SNP coordinate of basepair; "locus"
--
winsize
and shift
are applied according to the SNP order
in the GDS file
winstart
NULL
-- no specific starting position; an integer
-- a starting position for all chromosomes; or a vector of integer
-- the starting positions for each chromosome
autosome.only
if TRUE
, use autosomal SNPs only; if it is a
numeric or character value, keep SNPs according to the specified
chromosome
remove.monosnp
if TRUE, remove monomorphic SNPs
maf
to use the SNPs with ">= maf" only; if NaN, no MAF threshold
missing.rate
to use the SNPs with "
as.is
save the value returned from FUN
as "list" or
"numeric"; "array" is equivalent to "numeric" except some cases,
see details
with.id
"snp.id", "snp.id.in.window" or "none"
num.thread
the number of (CPU) cores used; if NA
, detect
the number of cores automatically
verbose
if TRUE, show information
...
optional arguments to FUN