Iterate linear regression across all traits and celltypes

iterate_lm(
  xmat,
  ymat,
  correction_method = "BH",
  qvalue_thresh = 0.05,
  y_quantiles = NULL,
  nCores = NULL
)

Arguments

xmat

gene x trait matrix.

ymat

gene x celltype matrix.

correction_method

Multiple-testing correction method to be passed to stats::p.adjust.

qvalue_thresh

q.value threshold to use when report significant results summary.

y_quantiles

The number of quantiles to bin ymat data into.

nCores

Number of cores to use in parallel. Will optimize if NULL.

Examples

### DeGAs loadings data("DEGAS_seurat") xmat <- DEGAS_seurat@reductions$contributionGene@feature.loadings xmat <- xmat[, 1:10] # Let's use just 10 components as an example ### Celltype Dataset data("ctd_BlueLake2018_FrontalCortexOnly") ymat <- ctd_BlueLake2018_FrontalCortexOnly[[1]]$specificity res_lm <- iterate_lm(xmat = xmat, ymat = ymat)
#> + 10 core(s) assigned as workers (2 reserved).
#> 11410 intersecting genes between xmat and ymat
#> Running 80 tests: 10 traits x 8 celltypes.
#> #> 15 significant results @ BH<0.05