Skip to contents

Smooths allelic imbalance (AI) bins by a specified window size, keeping up to 30 data points per bin using frequency-based downsampling.

Usage

SmoothAI(df, ai_binsize, gender)

Arguments

df

Data frame or tibble. Must include columns seqnames, start, and norm_af.

ai_binsize

Numeric. Bin size (in bases) for smoothing.

gender

Character. Sample gender ("male" or "female"). (Currently not used in this function, but included for compatibility.)

Value

A data frame with columns: seqnames, bin_start, bin_end, and smoothed AI values.

Details

  • Splits the data by chromosome.

  • For each bin, keeps up to 30 values using ai_bin_smooth.

Examples

# SmoothAI(df, ai_binsize = 10000, gender = "female")