generate.jackknife.blocks: Generate block coordinates for block-jackknife

View source: R/generate.jacknife.blocks.R

generate.jackknife.blocksR Documentation

Generate block coordinates for block-jackknife

Description

Generate block coordinates for block-jackknife

Usage

generate.jackknife.blocks(x, nsnp.per.bjack.block, verbose = TRUE)

Arguments

x

A pooldata or countdata object containing SNP positions (snp.info slot)

nsnp.per.bjack.block

Number of consecutive SNPs of each block-jackknife block

verbose

If TRUE extra information is printed on the terminal

Value

A list with the two following elements:

  1. "blocks.det": A matrix with three columns containing for each identified block (in row) the index of the start SNP, the index of the end SNP and the block Size in bp

  2. "snp.block.id": A vector containing the blocks assigned to each SNP eligible for block-Jacknife (non eligible SNPs ares assigned NA)

  3. "nblocks": A scalar corresponding to the number of blocks

  4. "nsnps": Number of SNPs eligible for block-jackknife 'i.e., included in one block

Examples

make.example.files(writing.dir=tempdir())
pooldata=popsync2pooldata(sync.file=paste0(tempdir(),"/ex.sync.gz"),poolsizes=rep(50,15))
bjack.blocks=generate.jackknife.blocks(pooldata,nsnp.per.bjack.block=50)

poolfstat documentation built on Sept. 8, 2023, 5:49 p.m.