JAMPred_SplitIntoPositiveDefiniteBlocks: Splits a list of SNPs into positive definite blocks.

Description Usage Arguments Value Author(s)

View source: R/JAMPred_SplitIntoPositiveDefiniteBlocks.R

Description

For a list of snps and corresponding individual level reference genotypes, this function can be used to split the SNPs into blocks of positive definite correlation structure, i.e. for use with JAMPred. After starting with an initial partitioning of the SNPs, either provided according to LD information, or naively formed based on a user specified initial block size, this function identifies any blocks which do not have infertible genotype matrices and splits them until all blocks have postivie definite genotype matrices in the reference data.

Usage

1
2
3
4
5
6
JAMPred_SplitIntoPositiveDefiniteBlocks(
  snps,
  initial.block.size = 100,
  initial.snps.blocks = NULL,
  ref.geno
)

Arguments

snps

List of SNPs to be split into blocks

initial.block.size

Block size for the initial partitioning. Default is 100. This is ignored when initial.snps.blocks is given.

initial.snps.blocks

A user specficied initial partitioning of the SNPs. This must be a list, each element of which is a vector of SNP names that correspond to the columns of ref.geno. This could be defined, for example, according to LD information.

ref.geno

Reference genotype matrix. Rows are people, columns are SNPs (named according to the vector snps) and elements are between 0 and 2 (can be dosages).

Value

A list each element of which is a vector of SNP names.

Author(s)

Paul Newcombe


pjnewcombe/R2BGLiMS documentation built on Feb. 10, 2020, 8:52 p.m.