vcfR (version 1.8.0)

Windowing: Create window summaries of data

Description

Create windows of non-overlapping data and summarize.

Usage

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

z.score(x)

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

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

depr

logical (T/F), this function has been deprecated, set to FALSE to override.

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.