get_block_lengths | R Documentation |
A new block begins at the SNP after the first SNP which is not within blgsize
of the start of the last block.
dat
needs to be ordered first by 'CHR', then by 'POS' or 'cm'
get_block_lengths(dat, blgsize = 0.05, cpp = TRUE, verbose = TRUE)
dat |
Data frame with columns 'CHR' and either 'POS' or 'cm' |
blgsize |
SNP block size in Morgan. Default is 0.05 (5 cM). If |
cpp |
Should the faster C++ version be used? |
verbose |
Print progress updates |
A numeric vector where the ith element lists the number of SNPs in the ith block.
## Not run:
prefix = 'path/to/packedancestrymap_prefix'
pops = c('pop1', 'pop2', 'pop3')
afdat = packedancestrymap_to_afs(prefix, pops = pops)
block_lengths = get_block_lengths(afdat)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.