add_snps {MultiDataSet} | R Documentation |
MultiDataSet
.This method adds or overwrites the slot "snps"
of an
MultiDataSet
with the content of the given SnpSet
. The fData of the
SnpSet
must contain the columns chromosome and position.
add_snps(object, snpSet, ...)
object |
|
snpSet |
|
... |
Arguments to be passed to |
A new MultiDataSet
with the slot "snps"
filled.
multi <- createMultiDataSet() geno <- matrix(c(3,1,2,1), ncol = 2) colnames(geno) <- c("VAL0156", "VAL0372") rownames(geno) <- c("rs3115860", "SNP1-1628854") map <- AnnotatedDataFrame(data.frame(chromosome = c("chr1", "chr2"), position = c(12414, 1234321), stringsAsFactors = FALSE)) rownames(map) <- rownames(geno) snpSet <- new("SnpSet", call = geno, featureData = map) pheno <- data.frame(id = c("VAL0156", "VAL0372")) rownames(pheno) <- c("VAL0156", "VAL0372") pData(snpSet) <- pheno multi <- add_snps(multi, snpSet)