# 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(getgenotypesraw(m, envir = e)))
}
# apply function "show" to all genotypes on chromosomes 1 for two base pair
# ranges
applyFnToRanges(show,
ranges_arg =
matrix(c(1, 2244000, 2245000,
1, 3762500, 3765000),
ncol = 3, nrow = 2, byrow = TRUE),
indices_arg = 1:3)
# apply function "show" to all genotypes on chromosomes 1 for two base pair
# ranges
applyFnToRanges(show,
ranges_arg =
matrix(c(1, 2240000, 2245000, "range1",
1, 3760000, 3765000, "range2"),
ncol = 4, nrow = 2, byrow = TRUE),
indices_arg = 1:4)
# }
Run the code above in your browser using DataLab