knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
A tool to perform correlation in a batch mode and return tidy result
Correlation analysis is very common, here we wrap several functions for correlation analysis to help us analyze datasets such as TCGA (The Cancer Genome Atlas) dataset in bioinformatics
if(!require("remotes")){install.packages("remotes")} remotes::install_github("Byronxy/ezcor")
ezcor() ##run basic correlation ezcor_batch() ##run basic correlation in a batch mode ezcor_bicor() ##run WCGAA Biweight Midcorrelation correlation ezcor_bicor_batch() ##run WCGAA Biweight Midcorrelation correlation in a batch mode ezcor_partial_cor() ##run partial correlation ezcor_partial_cor_batch() ##run partial correlation in a batch mode
We select HALLMARK_HYPOXIA pathway genes from TCGA pan-cancer dataset to illustrate examples
data("exprSet", package = "ezcor", envir = environment()) exprSet[1:5,1:5] g1 <- colnames(exprSet)[3] g2 <- colnames(exprSet)[4] res <- ezcor::ezcor(data= exprSet, split = TRUE, split_var = "tissue", var1 = g1, var2 = g2, cor_method = "spearman", adjust_method = "none", sig_label = TRUE, verbose = TRUE) head(res)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.