if (require(ff) & require(genomewidesnp6Crlmm) & require(hapmapsnp6)){
ldPath(tempdir())
path <- system.file("celFiles", package="hapmapsnp6")
## the filenames with full path...
## very useful when genotyping samples not in the working directory
cels <- list.celfiles(path, full.names=TRUE)
## Note: one would need at least 10 CEL files for copy number estimation
## To use less RAM, specify a smaller argument to ocProbesets
ocProbesets(50e3)
batch <- rep("A", length(cels))
(cnSet <- genotype(cels, cdfName="genomewidesnp6", batch=batch))
##Segment faults that occur with the above step can often be traced to a
##corrupt cel file. To check if any of the files are corrupt, try
##reading the files in one at a time:
## Not run:
# require(affyio)
# validCEL(cels)
# ## End(Not run)
## when gender is not specified (as in the above example), crlmm tries
## to predict the gender from SNPs on chromosome X
cnSet$gender
## If gender is known, one should check that the assigned gender is
## correct. Alternatively, one can pass gender as an argument to the
## genotype function.
gender <- c("female", "female", "male")
gender[gender == "female"] <- 2
gender[gender == "male"] <- 1
dim(cnSet)
table(isSnp(cnSet))
}
Run the code above in your browser using DataLab