Description Usage Arguments Details Author(s) Examples
Reads HapMap haplotypes and legend and stores in format expected by functions in gtx package.
1 | hapmap.read.haplotypes(chr, path, sample = "CEU", release = 22)
|
chr |
chromosome to read |
path |
path to local mirror of ftp://ftp.ncbi.nlm.nih.gov/hapmap |
sample |
a HapMap sample, e.g. CEU or YRI |
release |
a HapMap release version, currently must be 21 or 22 |
You need a local mirror of HapMap data. To build this use e.g. a
shell command
rsync ftp://ftp.ncbi.nlm.nih.gov/hapmap ~
then use an argument path="~/hapmap"
for this function call.
Technically the local mirror only needs the contents of
ftp://ftp.ncbi.nlm.nih.gov/hapmap/phasing/2006-07_phaseII/phased/
and
ftp://ftp.ncbi.nlm.nih.gov/hapmap/phasing/2007-08_rel22/phased/
Other gtx functions expect to be passed a list with 22 elements; one for each chromosome. See the examples.
Toby Johnson Toby.x.Johnson@gsk.com
1 2 3 4 5 6 7 8 9 10 11 | ## Not run:
## chromosomes 1-22
hapmap <- lapply(1:22, hapmap.read.haplotypes, path = "~/hapmap")
## selected chromosomes only
hapmap <- lapply(1:22, function() return(NULL))
for (chr in c(1, 11, 17)) {
hapmap[[chr]] <- hapmap.read.haplotypes(chr, path = "~/hapmap")
}
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.