Learn R Programming

poolfstat (version 2.2.0)

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

Description

Generate block coordinates for block-jackknife

Usage

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

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

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

Examples

Run this code
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)

Run the code above in your browser using DataLab