CountsToAI: CountsToAI

Description Usage Arguments Value Examples

View source: R/CountsToAI.R

Description

Calculates allelic imbalances from merged counts over given replicates (ai(sum_reps(gene))).

Usage

1
2
3
4
5
6
7
8
CountsToAI(
  df,
  reps = NA,
  meth = "mergedToProportion",
  thr = NA,
  thrUP = NA,
  thrType = "each"
)

Arguments

df

Allele counts dataframe: with 2n+1 columns, "ID" and 2n columns with ref & alt counts (rep1_ref, rep1_alt, rep2_ref, rep2_alt, ...)

reps

Optional (default=NA, all replicates), a vector of replicate numbers for which the analysis should be applied

meth

Optional (default="mergedToProportion", also can be "meanOfProportions"), method to use, either sum(m)/sum(p) (default), or sum(m/p)

thr

Optional (default=NA), threshold on the overall number of counts for a gene to be considered in the analysis

thrUP

Optional (default=NA), threshold for max gene coverage (default = NA)

thrType

Optional (default = "each", also can be "average" for average coverage on replicates), threshold type

Value

A table with IDs and calculated AI estimate for given set of replicates

Examples

1
CountsToAI(allelicCountsTable, reps=c(1,2), thr=10, thrUP=1000)

gimelbrantlab/QCumber documentation built on Feb. 26, 2020, 6:17 p.m.