Learn R Programming

vcfR (version 1.0.0)

Windowing: Create window summaries of data

Description

Create windows of non-overlapping data and summarize.

Usage

NM2winNM(x, pos, maxbp, winsize = 100L)

z.score(x)

windowize.NM(x, pos, starts, ends, summary = "mean")

Arguments

x
A NumericMatrix
pos
A vector of chromosomal positions for each row of data (variants)
maxbp
Length of chromosome
winsize
Size (in bp) for windows
starts
integer vector of starting positions for windows
ends
integer vector of ending positions for windows
summary
string indicating type of summary (mean, median, sum)

Details

The numeric matrix where samples are in columns and variant data are in rows. The windowing process therefore occurs along columns of data. This matrix could be created with extract.gt.

The chromosome is expected to contain positions 1 though maxbp. If maxbp is not specified this can be inferred from the last element in pos.