Skip to contents

Collects multiple NIPTeRSample objects into a NIPTeRControlGroup, the reference cohort used by nipter_z_score, nipter_ncv_score, nipter_chi_correct, and nipter_regression.

Usage

nipter_as_control_group(samples, description = "General control group")

Arguments

samples

A list of NIPTeRSample objects.

description

Label for the group (default "General control group").

Value

An object of class c("NIPTeRControlGroup", <strand_type>).

Details

All samples must share the same strand type ("CombinedStrands" or "SeparatedStrands"). Duplicate sample names are silently removed.

Examples

if (FALSE) { # \dontrun{
samples <- lapply(bam_files, nipter_bin_bam)
cg <- nipter_as_control_group(samples)
} # }