Description Usage Arguments Details Value See Also Examples
Creates the correlation matrix and tree for a metabolomic dataset. Produces the following files:
<filename>.pdf, containing the correlation matrix
<filename>_pairs.txt, containing the correlation pairs above <upperLimit> or less than <lowerLimit>;
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)
|
filename |
name of the datafile Must contain:
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. |
The significance of the correlation is noted with a "*" in the tile. Conditions for the Pearson's Correlation Test:
Independent samples;
normal distribution of the data; *
*Since this condition is not true for most metabolite, the test is set as a Spearman's rank Correlation test by default.*
the rcorr objet, with:
r
The correlation matrix
P
The P-value matrix
reshape2
packagehttps://www.rdocumentation.org/packages/reshape2
Hmisc
package https://www.rdocumentation.org/packages/Hmisc
gplot
package https://www.rdocumentation.org/packages/gplot
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")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.