Usage
allele_qc(
target_data,
ref_variants,
col_to_flip = NULL,
match_min_prop = 0.2,
remove_dups = TRUE,
remove_indels = FALSE,
remove_strand_ambiguous = TRUE,
flip_strand = FALSE,
remove_unmatched = TRUE,
remove_same_vars = FALSE
)Arguments
- target_data
A data frame with columns "chrom", "pos", "A2", "A1" (and optionally other columns like "beta" or "z"), or a vector of strings in the format of "chr:pos:A2:A1"/"chr:pos_A2_A1". Can be automatically converted to a data frame if a vector.
- ref_variants
A data frame with columns "chrom", "pos", "A2", "A1" or strings in the format of "chr:pos:A2:A1"/"chr:pos_A2_A1".
- col_to_flip
The name of the column in target_data where flips are to be applied.
- match_min_prop
Minimum proportion of variants in the smallest data to be matched, otherwise stops with an error. Default is 20
remove_dupsWhether to remove duplicates, default is TRUE.
remove_indelsWhether to remove INDELs, default is FALSE.
remove_strand_ambiguousWhether to remove strand SNPs (if any). Default is `TRUE`.
flip_strandWhether to output the variants after strand flip. Default is `FALSE`.
remove_unmatchedWhether to remove unmatched variants. Default is `TRUE`.
flipWhether the alleles must be flipped: A <–> T & C <–> G, in which case corresponding `col_to_flip` are multiplied by -1. Default is `TRUE`.
A single data frame with matched variants. Match by ("chrom", "A1", "A2" and "pos"), accounting for possible strand flips and major/minor allele flips (opposite effects and zscores).