Description Usage Arguments Author(s) See Also Examples
Plot trees for each vertex annotation setting vertex size and color based on the particular annotation.
1 | SPADE.plot.trees(graph, files, file_pattern = "*anno.Rsave", out_dir = ".", layout = SPADE.layout.arch, attr_pattern = "percent|medians|fold|cvs", scale = NULL, pctile_color=c(0.02,0.98), normalize="global", size_scale_factor=1, edge.color="grey", bare=FALSE, palette="bluered")
|
graph |
iGraph graph object |
files |
Either a vector of save annotation files or a directory. If a directory, all of the files matching the |
file_pattern |
Wildcard pattern to match files if |
out_dir |
Directory where output files are written. Will be created if it does not exist. |
layout |
Either a function or a numeric matrix specifying how vertices are placed on plot. If it is a matrix, the matrix must have two columns, x and y position, and as many rows as vertices. If |
attr_pattern |
A regular expression that matches the attributes that should be plotted for each graph. Parameter names matching regex "median|fraction|cvs" will be plotted with a scale range set to [min, max] for that attribute, while all other parameters will be plotted on a centered scale with the range [abs(min(parameter values),max(parameter values)), abs(min(parameter values),max(parameter values))] |
scale |
A two element vector, e.g. c(-1,1), specifying low and upper bound for color scale. Values below and above these bounds will be forced to the 'smallest' and 'largest' color respectively. If specified, overrides 'pctile_color'. |
pctile_color |
A two element vector specifying lower and upper percentiles that should be used to set the color scale. Values below and above these percentiles will be forced to the 'smallest' and 'largest' color respectively. Not in effect if 'scale' is specified. |
normalize |
A string (either "global" or "local"), specifying color scale normalization. Setting to "global" will set the scale range to the global min/max of all GML files in the folder, while "local" will set the scale range to the min/max of the particular GML file being plotted. |
size_scale_factor |
A scale factor for node size in drawing. Current function for node size: |
edge.color |
Set the edge color. See |
bare |
Boolean specifying whether to omit titles and gradient legend. |
palette |
A string (either "jet" or "bluered"), specifying color palette for nodes. "bluered" tends to show up better on LCD projectors. |
Michael Linderman
1 2 3 4 5 6 7 8 9 10 11 12 13 | ## Not run:
# Load two-parameters sample data included in package
data_file_path = paste(installed.packages()["spade","LibPath"],"spade","extdata","SimulatedRawData.fcs",sep=.Platform$file.sep)
# Run basic SPADE analyses, clustering on two parameters.
output_dir <- tempdir()
SPADE.driver(data_file_path, out_dir=output_dir, cluster_cols=c("marker1","marker2"))
# Generate PDFs of annotated graphs (into output_dir/pdf)
mst_graph <- igraph:::read.graph(paste(output_dir,"mst.gml",sep=.Platform$file.sep),format="gml")
SPADE.plot.trees(mst_graph, output_dir, out_dir=paste(output_dir,"pdf",sep=.Platform$file.sep), layout=igraph:::layout.kamada.kawai(mst_graph))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.