ghap.blockgen | R Documentation |
This function generates HapBlocks based on sliding windows. The window and the step size can be specified in markers or kbp. For each window, block coordinates are generated.
ghap.blockgen(object, windowsize = 10, slide = 5, unit = "marker", nsnp = 2)
object |
A GHap.phase object. |
windowsize |
A numeric value for the size of the window (default = 10). |
slide |
A numeric value for the step size (default = 5). |
unit |
A character value for the size unit used for the window and the step. It can be either "marker" or "kbp" (default = "marker"). |
nsnp |
A numeric value for the minimum number of markers per block. |
A data frame with columns:
BLOCK |
Block alias. |
CHR |
Chromosome name. |
BP1 |
Block start position. |
BP2 |
Block end position. |
SIZE |
Haplotype size. |
NSNP |
Number of marker. |
Yuri Tani Utsunomiya <ytutsunomiya@gmail.com>
# #### DO NOT RUN IF NOT NECESSARY ### # # # Copy phase data in the current working directory # exfiles <- ghap.makefile(dataset = "example", # format = "phase", # verbose = TRUE) # file.copy(from = exfiles, to = "./") # # # Load data # phase <- ghap.loadphase("example") # # ### RUN ### # # # Generate blocks of 5 markers sliding 5 markers at a time # blocks.mkr <- ghap.blockgen(phase, windowsize = 5, # slide = 5, unit = "marker") # # # Generate blocks of 100 kbp sliding 100 kbp at a time # blocks.kb <- ghap.blockgen(phase, windowsize = 100, # slide = 100, unit = "kbp")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.