Compute the Connectivity Scores by Zhang and Gant (2008). One or multiple query compounds are possible in this analysis. In the case of multiple query compounds, the average of each pairwise score is taken.
# S4 method for matrix,matrix,CSzhang
CSanalysis(querMat, refMat,
type = "CSzhang", nquery = NULL, nref = NULL, ntop.scores = 20,
which = c(1), color.ref = NULL, legend.names = NULL,
legend.cols = NULL, legend.pos = "topright", labels = TRUE,
result.available = NULL, result.available.update = FALSE,
plot.type = "device", basefilename = NULL)
Query matrix (Rows = genes and columns = compounds)
Reference matrix
"CSzhang"
Zhang Parameter: Number of top up- and downregulated genes in query signature. If NULL
, all rows (genes) are used.
Zhang Parameter: Number of top up- and downregulated genes in reference signature. If NULL
, all rows (genes) are used. (Note that \(nquery >= nref\))
Zhang Parameter: Number of top positive and negative CS to be reported first.
Choose plot to draw.
Zhang and Gant Scores Plot
Vector of colors for the reference columns. You can use this option to highlight columns(compounds) of interest in the CS plot. (This does not include the query columns since they are not included in the CS plot.)
Option to draw a legend (about the highlights in color.ref
) in the CS plot. If NULL
, no legend will be drawn.
Colors to be used for the legend.names
.
Position of the legend in all requested plots, can be "topright"
, "topleft"
, "bottomleft"
, "bottomright"
, "bottom"
, "top"
, "left"
, "right"
, "center"
.
Boolean value (default=TRUE) to use column labels inside the ZG plot.
You can a previously returned object by CSanalysis
in order to only draw graphs, not recompute the scores. If this object also contains the permutation object, in the score plot the values with a (adjusted) pvalue smaller than 0.05 will be colored purple.
Logical value. If TRUE
, the CS and GS will be overwritten depending on the new component.plot
choice. This would also delete the p-values if permutation.object
was available.
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.
Directory including filename of the graphs if saved in pdf files
An object of the S4 Class CSresult-class
. The CS slot will also contain the top positive and negative scores as well as the top p-values. The GS slot will be empty for Zhang and Gant.