qc_report_loci: Create a Quality Control report for loci

View source: R/qc_report_loci.R

qc_report_lociR Documentation

Create a Quality Control report for loci

Description

Return QC information to assess loci (MAF, missingness and HWE test). For pseudohaploid data, HWE test is not calculated.

Usage

qc_report_loci(.x, ...)

## S3 method for class 'tbl_df'
qc_report_loci(.x, ...)

## S3 method for class 'grouped_df'
qc_report_loci(.x, ...)

Arguments

.x

a gen_tibble object.

...

currently unused

Value

either a tibble with 3 elements (maf, missingness and hwe_p). For pseudohaploid data, a tibble with 2 elements (maf and missingness).

Examples

# Create a gen_tibble of lobster genotypes
bed_file <-
  system.file("extdata", "lobster", "lobster.bed", package = "tidypopgen")
example_gt <- gen_tibble(bed_file,
  backingfile = tempfile("lobsters"),
  quiet = TRUE
)

# Get a QC report for the loci
example_gt %>% qc_report_loci()

# Group by population to calculate HWE within populations
example_gt <- example_gt %>% group_by(population)
example_gt %>% qc_report_loci()


tidypopgen documentation built on Jan. 23, 2026, 1:06 a.m.