associateGenotypes: Associate genotypes with user regions from a _SNPhood_...

Description Usage Arguments Value Examples

View source: R/core.R

Description

The function associateGenotypes associates genotypes with SNP regions as defined in a SNPhood object. It is possible to assign genotypes only for a subset of datasets as defined in a SNPhood object. To avoid any ambiguities, a 1:1 for genotype and dataset mapping must be given (ses below).

Usage

1
associateGenotypes(SNPhood.o, genotypeMapping, verbose = TRUE)

Arguments

SNPhood.o

Object of class SNPhood

genotypeMapping

Data frame. A data frame that establishes the mapping between datasets in the object and the corresponding genotype file and column names. See the examples. must be provided. See the Vignette for a more detailed description of the supported file format.

verbose

Logical(1). Default TRUE. Should the verbose mode (i.e., diagnostic messages during execution of the script) be enabled?

Value

Object of class SNPhood with the genotype information added to the slot annotation, element genotype. You may retrieve it via the accessor function annotation.

Examples

1
2
3
4
data(SNPhood.o, package="SNPhood")
fileGenotypes = list.files(pattern = "*genotypes*",system.file("extdata", package = "SNPhoodData"), full.names = TRUE)
mapping = data.frame(samples = annotationDatasets(SNPhood.o), genotypeFile = rep(fileGenotypes, 2), sampleName = c("NA10847", "NA12890"))
SNPhood.o = associateGenotypes(SNPhood.o, mapping)

SNPhood documentation built on Nov. 8, 2020, 6:22 p.m.