expr_cancor: Compute summary statistic based on gene expression features

View source: R/expr_cancor.R

expr_cancorR Documentation

Compute summary statistic based on gene expression features

Description

This function takes in a list of cluster-level PCA matrices as input and generates canonical correlation and p-value based on permutation test.

Usage

expr_cancor(
  pca.ls,
  sample_meta,
  response_variable,
  analysis_type,
  num_permutations,
  alternative,
  component_id = 1,
  ncores
)

Arguments

pca.ls

A list of cell cluster-specific PCA matrices

sample_meta

Sample-level metadata, where each row is a sample. Must contain 'sample' column and additional variables such as covariates or outcome of interest.

response_variable

A vector of response variables.

analysis_type

Either 'cancor' (canonical correlation) or 'regression' (F-statistic).

num_permutations

Number of permutations (by default: 1000).

alternative

A character string specifying the alternative hypothesis, must be one of "two.sided" (default), "greater" or "less".

ncores

Number of cores

componen_id

An index to extract canonical correlation component (by default: 1).

Value

A data frame for summary statistic (canonical correlation or F-stat), p-value and adjusted p-value for each node.

Author(s)

Boyang Zhang <bzhang34@jhu.edu>, Hongkai Ji


byzhang23/TreeCorTreat documentation built on May 7, 2024, 8:37 a.m.