computeCorr: Gene Correlation analysis

View source: R/gene_correlation.R

computeCorrR Documentation

Gene Correlation analysis

Description

This function is a part of the data analysis functionality of tcgaCleaneR. It helps to run correlation analysis between gene expression level and unwanted variation effect because of Library Size or Purity. This function can help to quantify the association between an individual gene’s expression level and library size or tumor purity for a given Cancer type.

Usage

computeCorr(data, is.log, type, cor.method, n.cores)

Arguments

data

S4 data object

is.log

logical: Checks if the S4 data has log values. It 'False', it converts data to log scale.

type

character: Variation variable to perform correlation with. type included are 'librarysize', 'purity_HTseq_counts', 'purity_HTseq_FPKM' and 'purity_HTseq_FPKM.UQ'.

cor.method

a character string indicating which correlation coefficient is to be used for the test. One of "pearson", "kendall", or "spearman", can be abbreviated. Default is spearman.

n.cores

The number of cores to use, i.e. at most how many child processes will be run simultaneously. Must be at least one, and parallelization requires at least two cores.

Value

A S3 data frame. The output contains the correlation test output containing pvalue, adj p-value and Spearman's rank correlation coefficient. Along with the data frame output the function also returns a histogram for Spearman's rank correlation coefficient for easy analysis of the test results.

Examples

## Not run: 
df <- computeCorr(data = brca.data,is.log = FALSE,type = "purity",cor.method = 'spearman',n.cores = 1)
computeCorr(data = brca.data,is.log = FALSE,type = "librarysize",cor.method = 'pearson',n.cores = 1)

## End(Not run)

AbhishekSinha28/tcgaCleaneR documentation built on May 6, 2022, 6:46 a.m.