matrix_ls_asc: ascQTL for nominal pass in matrix form

Description Usage Arguments Value Examples

View source: R/rlib_matrix_ls.R

Description

Perform ascQTL in matrix form which can be used for obtaining nominal p-value

Usage

1
matrix_ls_asc(asc1, asc2, x, asc_cutoff = 5, weight_cap = 100, asc_cap = 5000)

Arguments

asc1

allele-specific read count for haplotype 1 (dimension = N x 1)

asc2

allele-specific read count for haplotype 2 (dimension = N x 1)

x

'genotype' used in ascQTL (which is defined as x1 - x2) (dimension = N x P)

asc_cutoff

allele-specific read count cutoff to exclude observations with asc1 or asc2 lower than asc_cutoff

weight_cap

the maximum weight difference (in fold) is min(weight_cap, floor(sample_size / 10)). The ones exceeding the cutoff is capped.

asc_cap

exclude observations with asc1 or asc2 higher than asc_cap

Value

a list of summary statistics beta_hat: estimated log aFC (dimension = 1 x P) beta_se: standard deviation of log aFC (dimension = 1 x P) sample_size: number of observations used in regression

Examples

1
2
3
4
5
6
7
8
matrix_ls_asc(
  asc1 = rpois(100, 100),
  asc2 = rpois(100, 100),
  x = matrix(sample(c(0, 0.5, 1), 200, replace = TRUE), ncol = 2),
  asc_cutoff = 20,
  weight_cap = 10,
  asc_cap = 1000
)

liangyy/mixqtl documentation built on Sept. 17, 2020, 11:36 a.m.