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", plot.type = "device",
  basefilename = "CScompare")

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 reference and query columns (compounds). If NULL, blue will be used for reference and black for query. Use this option to highlight reference columns and query 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 references 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".

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

Basename of the graphs if saved in pdf files

Value

A list object with 2 slotes. 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, contaisn a small comparison between the significant results based on threshold.pvalues.

Examples

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

MFA_analysis <- CSanalysis(Mat1,Mat2,"CSmfa")
ZHANG_analysis <- CSanalysis(Mat1,Mat2,"CSzhang")

CScompare(MFA_analysis,ZHANG_analysis,1)

## End(Not run)

CSFA documentation built on May 2, 2019, 5:56 p.m.