Skip to contents

For each chromosome, rounds the B-allele frequency (BAF, or af) values into 20 bins (increments of 0.05).

Usage

RoundAI(ai)

Arguments

ai

A list of data frames or tibbles, one per chromosome. Each must include columns af, contig, start, stop, allele1Count, allele2Count.

Value

A data frame with columns: contig, start, stop, allele1Count, allele2Count, norm_af.

Details

  • BAF values (af) are rounded to the nearest 0.05.

  • Output is a single data frame combining all chromosomes.

Examples

# ai_list <- list(chr1 = data.frame(af = runif(10), contig = "1", start = 1:10, stop = 11:20, allele1Count = 1:10, allele2Count = 11:20))
# RoundAI(ai_list)