matrix_ls_trc: trcQTL for nominal pass in matrix form

Description Usage Arguments Value Examples

View source: R/rlib_matrix_ls.R

Description

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

Usage

1
matrix_ls_trc(trc, lib_size, x, cov, trc_cutoff = 20)

Arguments

trc

total read count (dimension = N x 1)

lib_size

library size (dimension = N x 1)

x

'genotype' used in trcQTL (which is defined as (x1 + x2) / 2) (dimension = N x P)

cov

effect of covariates on log(trc/2) (dimension = N x 1)

trc_cutoff

total read count cutoff to exclude observations with trc lower than the cutoff

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
matrix_ls_trc(
  trc = rpois(100, 100),
  lib_size = rpois(100, 10000),
  x = matrix(sample(c(0, 0.5, 1), 200, replace = TRUE), ncol = 2),
  cov = rnorm(100),
  trc_cutoff = 20
)

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