# NOT RUN {
db = system.file("exdata", "seqsimm.db", package="Mega2R")
ENV = read.Mega2DB(db)
show = function(m, r, e) {
print(r)
print(m)
print(head(getgenotypes(m, envir = e)))
}
# apply function "show" to all transcripts on genes ELL2 and CARD15
# }
# NOT RUN {
# donttestcheck: time
applyFnToGenes(show, genes_arg = c("CEP104"))
# }
# NOT RUN {
# apply function "show" to all genotypes on chromosomes 11 for two base
# pair ranges
applyFnToGenes(show, ranges_arg = matrix(c(1, 5000000, 10000000,
1, 10000000, 15000000), ncol = 3, nrow = 2, byrow = TRUE))
# apply function "show" to all genotypes for first marker in each chromosome
applyFnToGenes(show, markers_arg = ENV$markers[! duplicated(ENV$markers$chromosome), 3])
# apply function "show" to all genotypes on chromosomes 24 and 26
applyFnToGenes(show, chrs_arg=c(24, 26))
# }
Run the code above in your browser using DataLab