The function labels the haplotypes of size blockSize around each candidate brake-point. For labeling genotype data, the function takes objects of class genoDat as main argument. For phased data, this argument should be ignored and a file name passed instead.
Genodat object; if phased data then provide file instead
blockSize
numeric. number of SNPs flanking each side of each candidate brake-point. Default value 3
minAllele
numeric. minimum allele frequency for each probe to be considered as a candidate brake-point. Default value 0.1
saveRes
logical. Whether results should be saved in file hapCode.RData
file
character. File name with phased data
ROI
numeric. 2-vector specification passes a chromosome segment to be encoded. 4-vector specification passes the region of interest for the left brake-point (ROI[1] and ROI[2]) and the right brake-point (ROI[3] and ROI[4])
intSNP
logical. whether build flanking blocks of uniform SNP density across the genome.
phasing
character. Either c("ivenrsion&BP","forward", "forward&inverted"), defines the phasing strategy between all four flanking blocks of each break poin. ivenrsion&BP phases the internal flanking block first, then the external blocks to the internal bloks and match them. "forward" uses the blocks in the sequence assumming the forward population; in the inversion model, the backward population is obtained inverting the internal blocks. "forward&inverted" phases the forward and inverted population independently.
Details
When setUpGenodat is passed, the coding first computes the local haplotypes for each candidate-brake point form the genotype data and then encodes each haplotype into a decimal integer. The local haplotypes are computed with haplo.em form haplo.stats and assigns those with highest posterior probability to each chromosome. In the case of phased data, passed through file, no local haplotyping is needed and only the labeling is performed.
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(inveRsion)
Loading required package: haplo.stats
Hola!
welcome to inevRsion package.
type: manual() for full manual
vignette("inveRsion") for a quick start
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/inveRsion/codeHaplo.Rd_%03d_medium.png", width=480, height=480)
> ### Name: codeHaplo
> ### Title: Codes haplotypes into decimal integers
> ### Aliases: codeHaplo
> ### Keywords: constructor
>
> ### ** Examples
>
> data(gDat)
> hapCode <-codeHaplo(gDat,blockSize=3,minAllele=0.3,saveRes=FALSE)
-Code haplotypes-
preparing data
Number of brakepoints: 3
...
-computation done-
> hapCode
-Showing object of class: HaploCode-
@haploCode: Binary code for haplotypes of brake-points flanked by SNP blocks
* numeric matrix ~ 18 chromosomes by 3 brake points
* first elements =
0.001393 0.001467 0.001467 0.001531 0.001531 0.001761
[1,] 1 0 0 1 0 1
[2,] 2 2 6 4 5 2
[3,] 1 2 0 0 0 0
[4,] 4 4 3 4 7 1
[5,] 1 2 2 4 5 1
[6,] 1 2 2 4 5 1
[7,] 1 2 0 0 0 0
[8,] 4 4 3 4 7 1
[9,] 0 2 0 0 0 0
[10,] 1 4 3 4 7 1
[11,] 0 0 0 0 0 0
[12,] 0 0 0 0 0 0
[13,] 0 0 0 0 0 0
[14,] 4 1 0 2 0 4
[15,] 1 2 2 4 5 1
[16,] 1 2 2 4 5 1
[17,] 0 0 0 0 0 0
[18,] 0 2 0 4 1 1
attr(,"locilim")
[,1] [,2]
[1,] 1 6
[2,] 2 7
[3,] 3 8
attr(,"phasing")
[1] inversion&BP
@blockSize: Block Size of 3 SNPs
@minAllele: Brake points with minimum allele frequency of 0.3
-end showing HaploCode-
>
>
>
>
>
> dev.off()
null device
1
>