For each motif, compares the reference allele fraction of the SNPs that prefer the reference allele with that of the SNPs that prefer the alternative allele. If the TF opens chromatin, the first group has the higher reference allele fraction.

ascPreferenceTest(
  prefTable,
  method = c("wilcoxon", "quasibinomial"),
  pAdjust = "bonferroni",
  minSites = 2
)

Arguments

prefTable

the output of ascPreferenceTable.

method

"wilcoxon" for a two-sided Wilcoxon rank-sum test, in which every SNP has the same weight, or "quasibinomial" for a logistic regression of the read counts, in which SNPs are weighted by their reads.

pAdjust

method of p.adjust applied over the motifs (default "bonferroni").

minSites

motifs with fewer SNPs in either group are not tested (default 2).

Value

A data.table with one row per motif: tf, the number of SNPs and the mean reference allele fraction of both groups, their difference (reference minus alternative preference), p, pAdj, and z, the standard normal quantile of the two-sided p-value with the sign of the difference.

Author

Irem B. GUNDUZ