R/DsASC-analysis.R
ascPreferenceTable.RdSums the reads over the samples and returns the fraction of reads on the reference allele, joined with the motif preference of the SNPs. This is the table behind a plot of binding preference against allelic accessibility.
ascPreferenceTable(refMat, altMat, sampleIds, prefDt, minReads = 4)reference and alternative count matrices (sites x samples).
samples to sum over.
the output of ascMotifPreference, or any
table with the columns snpId, tf and preference.
SNPs with fewer reads in the summed samples are dropped (default 4).
A data.table with one row per SNP and motif: snpId, refFrac, total and
the columns of prefDt.