CScompare: Compare CS Results.

Description Usage Arguments Value Examples

View source: R/CScompare.R

Description

After applying different CSanalysis on the same data, you can compare 2 different results of connectivity loadings, connectivity ranking scores and gene scores Unless the result came from a Zhang and Gant analysis, you choose from which component (factor, PC, bicluster) the scores should be derived. Further, for Zhang and Gant analysis, the "CRanking Scores" and "CLoadings" will be the same as the ZG Score as well as the p-values.

Usage

1
2
3
4
5
6
CScompare(CSresult1, CSresult2, component1.plot, component2.plot,
  threshold.pvalues = 0.05, which = c(1, 2, 3), color.columns = NULL,
  gene.thresP = NULL, gene.thresN = NULL, thresP.col = c("blue",
  "light blue"), thresN.col = c("red", "pink"), legend.names = NULL,
  legend.cols = NULL, legend.pos = "topright", labels = TRUE,
  plot.type = "device", basefilename = NULL)

Arguments

CSresult1

First result.

CSresult2

Second result.

component1.plot

If you are using a non-Zhang&Gant result, specify the bicluster, factor or principal component which should be used to derive connectivity scores from for the first result.

component2.plot

If you are using a non-Zhang&Gant result, specify the bicluster, factor or principal component which should be used to derive connectivity scores from for the second result.

threshold.pvalues

If both CSresult1 and CSresult contain pvalues (and adjusted pvalues), this threshold will be used to compare the number of overlapping significant results.

which

Choose one or both plots which should be created.

  1. CS Comparison Plot

  2. GS Comparison Plot

  3. CSRankScores (Normal CS for CSzhang) Comparison Plot

  4. CS p-values comparison plot (Raw & Adjusted).

  5. CRankScores p-values comparison plot (Raw & Adjusted).

color.columns

Vector of colors for the query and reference columns (compounds). If NULL, blue will be used for query and black for reference. Use this option to highlight query columns and reference columns of interest.

gene.thresP

Vector of length 2 containing the positive gene thresholds for CSresult1 and CSresult2. Genes above the threshold will be colored. (e.g. c(1,2))

gene.thresN

Vector of length 2 containing the negative gene thresholds for CSresult1 and CSresult2. Genes below the threshold will be colored. (e.g. c(-1,-2))

thresP.col

Vector of length 2 containing the colors for the high gene scores for CSresult1 and CSresult2 (e.g. c("blue","light blue")).

thresN.col

Vector of length 2 containing the colors for the low gene scores for CSresult1 and CSresult2 (e.g. c("red","pink")).

legend.names

Option to draw a legend (about the highlights in color.columns) in the CS plot. If NULL, only queries are in the legend.

legend.cols

Colors to be used for the legend.names.

legend.pos

The location of the legend: "bottomright", "bottom", "bottomleft", "left", "topleft", "top", "topright", "right" and "center".

labels

Boolean value (default=TRUE) to use row and/or column text labels in the comparison score plots.

plot.type

How should the plots be outputted? "pdf" to save them in pdf files, device to draw them in a graphics device (default), sweave to use them in a sweave or knitr file.

basefilename

Directory including filename of the graphs if saved in pdf files

Value

A list object with 2 slots. In the first slot, Pearson and Spearman correlation between the results (CLoadings, Gene Scores, CRanking Scores, (adjusted) p-values) can be found. The second slot, if permutation was applied, contains a small comparison between the significant results based on threshold.pvalues.

Examples

1
2
3
4
5
6
7
8
data("dataSIM",package="CSFA")
Mat1 <- dataSIM[,c(1:6)]
Mat2 <- dataSIM[,-c(1:6)]

MFA_analysis <- CSanalysis(Mat1,Mat2,"CSmfa",component.plot=1)
ZHANG_analysis <- CSanalysis(Mat1,Mat2,"CSzhang")

CScompare(MFA_analysis,ZHANG_analysis,1)

CSFA documentation built on May 2, 2019, 7:30 a.m.