collapse.genomecache: Reduce genome caches by averaging together loci that are very...

View source: R/collapse.genomecache.R

collapse.genomecacheR Documentation

Reduce genome caches by averaging together loci that are very similar up to some set tolerance level of a specified criterion

Description

This function takes an inpute genome cache directory, and produces a smaller version with similar information. It is particularly useful for large, dense genome caches, with redundant loci.

Usage

## S3 method for class 'genomecache'
collapse(
  original.cache,
  new.cache,
  subjects = NULL,
  criterion = c("l2.norm", "max.category"),
  model = c("additive", "full"),
  proportion.tol = 0.01
)

Arguments

original.cache

The path of the genome cache to be reduced.

new.cache

The path of the new genome cache to be created.

subjects

DEFAULT: NULL. Allows for the specification of a reduced set of individuals from the original genome cache to be included in the new one. The default includes all individuals.

criterion

DEFAULT: "l2.norm". Option to specify criterion for collapsing loci founder probabilities/dosages. "l2.norm" means that max l2 norm or Euclidean distance is used, which means changes across all categories count. "max.category" means only changes in the max category (founder dosage or diplotype) are used.

model

DEFAULT: "additive". If "additive" is specified, criteria are based on dosages. If "full", probabilities of diplotypes are used.

proportion.tol

DEFAULT: 0.01. If the maximum criterion value at a pair of loci in a data set exceeds this value, the loci are not averaged. When all criterion values are below it, the two loci get averaged. The scale of the parameter is in terms of a proportion, regardless of criteria.

Examples

collapse.genomecache()

gkeele/miqtl documentation built on June 13, 2022, 4:20 p.m.