Skip to contents

Select best-matching control subset for a sample

Usage

niptmer_select_reference_subset(
  count_table,
  sample,
  controls = NULL,
  top_n = 100,
  exclude_chromosomes = c("13", "18", "21", "X", "Y", "GC"),
  extra_columns = character()
)

Arguments

count_table

A NIPT count table data.frame/file path or a numeric coverage matrix with samples in rows.

sample

Sample identifier (character) or one-based row index.

controls

Optional control sample identifiers or row indices. If NULL, all samples except sample are candidates.

top_n

Number of best-matching controls to return.

exclude_chromosomes

Chromosomes excluded from fraction matching.

extra_columns

Optional additional predictor columns when count_table is a table/path.

Value

Character vector of selected control sample identifiers.