find_matching_sites: this identifies variants which match the current row

Description Usage Arguments Value Examples

Description

Some variants in the same individual changed coordinates between studies. These are all indels, so are due to realignment calling the variant at slightly different locations. We can identify the initial position, by finding the variant that is closest to the validation coordinates.

Usage

1

Arguments

row

dataframe of a single row for a candidate, with columns for person_id, chrom, start_pos, ref_allele

de_novos

dataframe of all variants

Value

boolean vector for sites that match the current row (the current row should match at minimum).

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
sample = read.table(header=TRUE, text="
    person_id    chrom start_pos ref_allele alt_allele consequence study_phenotype
    sample_01    1     10000     AAA        A          frameshift_variant autism",
    stringsAsFactors=FALSE)

variants = read.table(header=TRUE, text="
    person_id    chrom start_pos ref_allele alt_allele consequence study_phenotype
    sample_01    1     10000     AAA        A          frameshift_variant autism
    sample_01.p1 1     10001     AAA        A          frameshift_variant normal_iq_autism
    sample_02    1     10001     AAA        A          frameshift_variant normal_iq_autism",
    stringsAsFactors=FALSE)
find_matching_sites(sample, variants)

jeremymcrae/publishedDeNovos documentation built on May 19, 2019, 5:08 a.m.