run_AF_SEG: run_AF_SEG

View source: R/segment.R

run_AF_SEGR Documentation

run_AF_SEG

Description

This function performs normal and tumor variant allele frequency segmentation. Rows with allele frequencies near 0 and 1 should be excluded before segmentation.

Usage

run_AF_SEG(
  DATA,
  num_divides,
  init_seg = NULL,
  binom = TRUE,
  clust_tVAF = TRUE,
  show_plot = FALSE,
  show_mess = FALSE,
  min_adj_seg = 20,
  min_nUniqIdx_pSeg = 10
)

Arguments

DATA

a R data.frame containing columns RD, AD, and index corresponding to reference depth, alternate depth, and the ordering and grouping of DATA's rows.

num_divides

A positive integer to specify the initial number of equally spaced segments prior to segmentation. This is used if init_seg is set to NULL.

init_seg

A vector specifying the user's initial segmentation.

binom

Boolean value set to TRUE to model read counts with binomial distribution. Otherwise model read counts with beta-binomial distribution.

clust_tVAF

If TRUE, DATA is assumed to originate from tumor read counts. Otherwise, DATA is assumed to originate from normal read counts.

show_plot

If TRUE, the function will generate a sequence of plots to visualize the points and ongoing segmentation.

show_mess

If TRUE, the function will output detailed segmentation messages. By default show_mess = FALSE.

min_adj_seg

An integer for the minimum number of indices to constitute a segment.

min_nUniqIdx_pSeg

An integer for the minimum number of unique indices per segment.

Value

List of segmentation results. Object INFER is a data.frame of segment-specific metrics. Object BIC contains the Bayesian Information Criterion for the overall segmentation. Object SEG is a numeric vector representing the indices of segment start and ends.


pllittle/UNMASC documentation built on June 1, 2025, 1 p.m.