View source: R/qc_report_indiv.R
qc_report_indiv | R Documentation |
Return QC information to assess loci (Observed heterozygosity and missingness).
qc_report_indiv(.x, ...)
## S3 method for class 'tbl_df'
qc_report_indiv(.x, kings_threshold = NULL, ...)
## S3 method for class 'grouped_df'
qc_report_indiv(.x, kings_threshold = NULL, ...)
.x |
either a |
... |
further arguments to pass |
kings_threshold |
an optional numeric giving a KING kinship coefficient, or one of:
|
Providing the parameter kings_threshold will return two additional columns, 'id' containing the ID of individuals, and 'to_keep' a logical vector describing whether the individual should be removed to retain the largest possible set of individuals with no relationships above the threshold. The calculated pairwise KING relationship matrix is also returned as an attribute of 'to_keep'. The kings_threshold parameter can be either a numeric KING kinship coefficient or a string of either "first" or "second", to remove any first degree or second degree relationships from the dataset. This second option is similar to using –unrelated –degree 1 or –unrelated –degree 2 in KING.
If no kings_threshold is provided, a tibble with 2 elements: het_obs and missingness. If kings_threshold is provided, a tibble with 4 elements: het_obs, missingness, id and to_keep.
# 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 QC report for individuals
example_gt %>% qc_report_indiv()
# Get QC report with kinship filtering
example_gt %>% qc_report_indiv(kings_threshold = "first")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.