haplotyping: Haplotype genotypes

Description Usage Arguments Value Author(s) Examples

Description

Generate matrix of HapGenotypes for user-defined blocks.

Usage

1
2
ghap.haplotyping(phase, blocks, outfile, freq = c(0,1), drop.minor = FALSE,
 batchsize = 500, ncores = 1, verbose = TRUE)

Arguments

phase

A GHap.phase object.

blocks

A data frame containing block boundaries, such as supplied by the ghap.blockgen function.

outfile

A character value specifying the name for the output files.

freq

A numeric vector of length 2 specifying the range of haplotype allele frequency to be included in the output. Default is c(0,1), which includes all alleles.

drop.minor

A logical value specfying whether the minor allele should be excluded from the output (default = FALSE).

batchsize

A numeric value controlling the number of haplotype blocks to be processed and written to output at a time (default = 500).

ncores

A numeric value specifying the number of cores to be used in parallel computations (default = 1).

verbose

A logical value specfying whether log messages should be printed (default = TRUE).

Value

The function outputs three files with suffix:

Author(s)

Yuri Tani Utsunomiya <[email protected]>

Marco Milanesi <[email protected]>

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
# #### DO NOT RUN IF NOT NECESSARY ###
# 
# # Copy the example data in the current working directory
# ghap.makefile()
# 
# # Load data
# phase <- ghap.loadphase("human.samples", "human.markers", "human.phase")
# 
# # Subset data - markers with maf > 0.05
# maf <- ghap.maf(phase, ncores = 2)
# markers <- phase$marker[maf > 0.05]
# phase <- ghap.subsetphase(phase, unique(phase$id), markers)
# 
# # Generate blocks of 5 markers sliding 5 markers at a time
# blocks.mkr <- ghap.blockgen(phase, windowsize = 5, slide = 5, unit = "marker")
#
# 
# ### RUN ###
# 
# # Generate matrix of haplotype genotypes
# ghap.haplotyping(phase, blocks.mkr, batchsize = 100, ncores = 2, outfile = "human")

GHap documentation built on May 29, 2017, 9:56 p.m.