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. codeHaplo(objectGenoDat, blockSize, minAllele, saveRes = TRUE, file = NULL, ROI,intSNP=FALSE,phasing="inversion&BP")Genodat object; if phased data then provide file insteadnumeric. number of SNPs flanking each side of each candidate brake-point. Default value 3numeric. minimum allele frequency for each probe to be considered as a candidate brake-point. Default value 0.1logical. Whether results should be saved in file hapCode.RDatacharacter. File name with phased data 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])logical. whether build flanking blocks of uniform SNP density across the genome.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.HaploCode
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.
GenoDat, HaploCode, data(gDat)
hapCode <-codeHaplo(gDat,blockSize=3,minAllele=0.3,saveRes=FALSE)
hapCode
Run the code above in your browser using DataLab