Associate genotypes with user regions from a SNPhood object.

Share:

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)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.