hapmap.read.haplotypes: Read hapmap haplotypes.

Description Usage Arguments Details Author(s) Examples

Description

Reads HapMap haplotypes and legend and stores in format expected by functions in gtx package.

Usage

1
hapmap.read.haplotypes(chr, path, sample = "CEU", release = 22)

Arguments

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

Details

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.

Author(s)

Toby Johnson Toby.x.Johnson@gsk.com

Examples

 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)

gtx documentation built on May 2, 2019, 5:08 a.m.