corMatrix: Correlation Matrix and tree

Description Usage Arguments Details Value See Also Examples

View source: R/corMatrix.r

Description

Creates the correlation matrix and tree for a metabolomic dataset. Produces the following files:

Usage

1
2
3
4
5
6
corMatrix(filename, output = paste0(strsplit(filename, ".", fixed =
  TRUE)[[1]][1], "_Correlation.pdf"), na = F, landscape = F,
  dendrogram = T, heatmap = T, compound = NULL, metabolite = NULL,
  sampleStart = 3, corDigit = 3, testType = "spearman",
  plotWidth = 0.5, plotHeigth = 0.2, textSize = 0.3,
  upperLimit = 0.6, lowerLimit = -0.6)

Arguments

filename

name of the datafile Must contain:

  • a column "Compound";

  • a column "Metabolite";

  • and all the columns sample from <sampleStart> to the end of the file;

the rest doesn't matter and the names are optional, as long as the column position is entered.;

output

default <dataset filename>.pdf, name of the pdf file;

na

default FALSE, FALSE removes the untargeted meatabolite;

landscape

default FALSE, orientation of the pdf file;

dendrogram

default TRUE, presence of the correlation dendrogram;

heatmap

default TRUE, presence of the correlation matrix heatmap;

compound

default NULL, position of the compound column if named otherwise;

metabolite

default NULL, position of the metabolite column if named otherwise;

sampleStart

default 3, 1st column of the actual data.

corDigit

default 3,number of digit for the correlation coefficient;

testType

default spearman, type of correlation test. Can be "spearman"or "pearson";

plotWidth

default 0.5, width of the top space above the heatmap;

plotHeigth

default 0.2, width of the side space beside the heatmap;

textSize

default 2, size of the text in the heatmap tiles and the dendrogram;

upperLimit

default 0.6, positive correlation limit to output the metabolite pair;

lowerLimit

default -0.6, negative correlation limit to output the metabolite pair.

Details

The significance of the correlation is noted with a "*" in the tile. Conditions for the Pearson's Correlation Test:

*Since this condition is not true for most metabolite, the test is set as a Spearman's rank Correlation test by default.*

Value

the rcorr objet, with:

See Also

Examples

1
2
3
4
5
for a dataset with the following header ; Compound, m/z, Metabolite, RT, Sample #1, ...
corMatrix("dummySet.tsv", sampleStart=5, testType="spearman")

for a dataset with the following header ; compound, m/z, metabolite, RT, Sample #1, ...
corMatrix("dummySet.tsv", compound=1, metabolite=3, sampleStart=5, testType="spearman")

AurelieGuilbault/VIQCing documentation built on Oct. 30, 2019, 5:02 a.m.