associateGenotypes {SNPhood} | R Documentation |
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).
associateGenotypes(SNPhood.o, genotypeMapping, verbose = TRUE)
SNPhood.o |
Object of class |
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? |
Object of class SNPhood
with the genotype information added to the slot annotation
, element genotype.
You may retrieve it via the accessor function annotation
.
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)