Scores the sequence around each SNP with a TF motif, once with the reference and once with the alternative allele. The window reaches from (w - 1) bp upstream to (w - 1) bp downstream of the SNP for a motif of width w, so that every placement of the motif overlaps the SNP. delta is the best motif score with the alternative allele minus the best score with the reference allele. A SNP is assigned a preference only if a motif match overlaps it on at least one allele.

ascMotifPreference(snpIds, pwms, genome, prefDelta = 1, matchPval = 0.002)

Arguments

snpIds

character vector of "chr:pos_REF_ALT" ids. Only single-nucleotide variants are scored.

pwms

a PWMatrixList or PFMatrixList of the TFBSTools package, or a list of such matrices.

genome

a BSgenome object, for example BSgenome.Hsapiens.UCSC.hg38.

prefDelta

a SNP prefers an allele if the score differs by more than this value (default 1).

matchPval

p-value threshold of the motif match (default 2e-3).

Value

A data.table with the columns snpId, tf (motif name and id), delta and preference ("Reference", "Alternative" or "No preference").

Author

Irem B. GUNDUZ