Bins input MAF data into fixed-size windows or fixed-snp-count window and calculates summary metrics (e.g., estimated MAF, nonzero counts) for each bin.
Usage
BinMaf(
data,
datatype,
maxgap = 2e+06,
snpnum = 20,
maxbinsize = 1e+06,
minbinsize = 5e+05,
minsnpcov = 20
)Arguments
- data
A data frame or tibble containing at least
Chromosome,Pos,Start,Endandmafcolumns.- datatype
If individual tumor data then choose "tumor", if aggregated panel of normal samples choose "pon".
- maxgap
Maximum gap size inside a bin. If exceed then start another bin.( default: 2000000)
- snpnum
SNP number in each bin.( default: 20 )
- maxbinsize
Maximum bin size.( default: 1000000 )
- minbinsize
Minimum bin size.( default: 500000 )
- minsnpcov
Minimum coverage of SNP sites to be included. ( default: 20 )
Value
A tibble with one row per bin and columns:
- Chromosome
Chromosome identifier.
- bin
Bin start coordinate.
- Start
Minimum
Endvalue in the bin.- End
Maximum
Endvalue in the bin.- nonzero_count
Number of nonzero maf values in the bin.
- each_maf
Semicolon-separated string of nonzero maf values in the bin.
- gmm_mean, gmm_weight, gmm_G
Unnested maf or BAF metrics.
