CorAnalysis: CorAnalysis:

Description Usage Arguments Value Examples

View source: R/correlation_functions.R

Description

Ranks correlation between a given gene and all other genes in a dataset. Plots both the given gene and highly correlated genes for a given correlation value

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
CorAnalysis(
  genename,
  dataset,
  threshold = 0.9,
  average = "mean",
  lag = 0,
  save = FALSE,
  print = TRUE,
  df = TRUE
)

Arguments

genename

the name of a gene intended for comparison with all other genes in the dataset. Must be a string.

dataset

A transcriptomics dataset. First columns should be gene names. All other columns should be expression levels.

threshold

Set correlation threshold value for which genes are considered significant and thus plotted. Defaults to 0.9

average

The average to be used for comparing the time points. Either 'median' or 'mean'.

lag

Setting any value other than 0 allows a gene to be correlated with lagged genes in the dataset. The number denotes the number of timesteps to lag by.

save

Logical. If TRUE, saves plots to working directory. Defaults to FALSE.

print

Logical. If TRUE renders highly correlated genes in the plot viewer. Defaults to TRUE

df

Logical. If TRUE a dataframe containing the correlations of the given gene with all genes in the dataset is returned. Defaults to TRUE.

Value

Prints or saves ggplot2 object(s). Optionally returns dataframe containing gene names and correlation values

Examples

1
cor_results <- CorAnalysis('comp100002_c0_seq2', Laurasmappings)

nathansam/CircadianTools documentation built on Dec. 26, 2019, 11:30 a.m.