shiftBed: Shift bed files

Description Usage Arguments Details Value Author(s)

Description

Generates collapsed genotypes by shifting the bed file (i.e. SNP1 collapsed with SNP2, SNP2 collapsed with SNP3, etc, when n_shift == 1).

Usage

1
shiftBed(rbed_info, n_shift, db_setup = FALSE, collapse_matrix = NULL)

Arguments

rbed_info

RbedInfoC object

n_shift

integer.

db_setup

logical. Whether to setup SQLite database for .bim, .fam and .frq files.

collapse_matrix

matrix of integers. See details.

Details

Collapsing matrix. The collapse_matrix parameter allows collapsing of two genotypes in a arbitrary way. Each genotype is represented by either 0, 1, 2, or 3:

0

Homozygote of the minor allele.

1

NA

2

Heterozygote.

3

Homozygote of the major allele.

The collapsing function is implemented as a matrix lookup function, i.e. Collapse(S1, S2) = CollapseMatrix[S1][S2].

The default collapsing matrix is:

0 0 0 0
0 1 1 1
0 1 0 3
0 1 3 3

Value

RbedInfoC object, with the shifted bed file path in it.

Author(s)

Kaiyin Zhong, Fan Liu


CollapsABEL documentation built on May 1, 2019, 7:28 p.m.