batch_pcc: Batch way to calculate the partial correlation coefficient

View source: R/batch_pcc.R

batch_pccR Documentation

Batch way to calculate the partial correlation coefficient

Description

batch_pcc() provide a batch way to calculate the partial correlation coefficient between feature and others when controlling a third variable

Usage

batch_pcc(input, interferenceid, target, features, method = "pearson")

Arguments

input

A data frame containing both feature variables and the interference variable.

interferenceid

The name of the column in the feature_data data frame representing the interference variable.

target

The name of the column in the input data frame representing the target variable for correlation.

features

A character vector specifying the names of the feature variables.

method

The correlation method to be used. Default value is "pearson"; options are "pearson", "spearman", or "kendall".

pdata_group

matrix;data signature matrix with multiple features

Value

A tibble containing the feature names, partial correlation coefficients, p-values, adjusted p-values, log10 p-values, and significance stars.

Author(s)

Rongfang Shen

Examples

# Loading TCGA-STAD microenvironment signature data
data("sig_stad", package = "IOBR")
# Finding Pan_F_TBRs associated signature score excluding the effects of tumour purity.
res <- batch_pcc(input = sig_stad, interferenceid = "TumorPurity_estimate", target = "Pan_F_TBRs", method = "pearson", features = colnames(sig_stad)[70:ncol(sig_stad)])

IOBR/IOBR documentation built on April 3, 2025, 2:19 p.m.