Applies quality control (QC) procedures to samples in a `SNPDataLong` object, based on heterozygosity and call rate thresholds.

qcSamples(x, ...)

# S4 method for class 'SNPDataLong'
qcSamples(
  x,
  heterozygosity = NULL,
  smp_cr = NULL,
  action = c("report", "filter", "both")
)

Arguments

x

An object of class `SNPDataLong`.

...

Additional optional arguments.

heterozygosity

A numeric threshold or range for heterozygosity. Samples outside this threshold are removed.

smp_cr

Minimum acceptable sample call rate (between 0 and 1). Samples below this value are removed.

action

Character string indicating the action to perform. One of: - `"report"`: only returns a list of samples to remove and those kept; - `"filter"`: returns a filtered object without reporting; - `"both"`: performs filtering and returns the filtered object.

Value

Depending on the `action` argument: - `"report"`: returns a list with removed and kept samples; - `"filter"`: returns a new `SNPDataLong` object with filtered genotypes; - `"both"`: returns a list with: - `filtered`: the filtered `SNPDataLong` object; - `report`: a list of removed and kept samples.