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).

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 the HWE test.

Value

a tibble with 3 elements: maf, missingness and hwe_p

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 Aug. 28, 2025, 1:08 a.m.