SPADE.annotateGraph: Add attributes to graph

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Add specific and arbitrary attributes to a graph

Usage

1

Arguments

graph

The graph object to work on. Note that the original graph is never modified, a new graph object is returned instead; if you don't assign it to a variable your modifications will be lost!

layout

Optional numeric matrix with vertex x,y positions with the same number of rows as vertices and at least two columns, the x and y positions.

anno

List of annotations to add to the graph. Each entry in list must have a name and must be a matrix. All matrices must have the same number of rows as vertices. List entry name plus column names are used as attribute names (unless they match, then just the column name is used).

Details

Add specific arbitrary attributes to a graph.

Value

A new graph object with the attributes added.

Author(s)

Michael Linderman

See Also

set.graph.attribute, set.vertex.attribute, set.edge.attribute

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
	## 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. Annotated graphs will be
	## in output_dir. See SPADE.plot.trees to generate PDFs of annotated graphs.
	#output_dir <- tempdir()
	#SPADE.driver(data_file_path, out_dir=output_dir, cluster_cols=c("marker1","marker2"))

	## Add additional parameters to output graphs using SPADE.annotateGraph
	#old_graph <- igraph:::read.graph(paste(output_dir,"SimulatedRawData.fcs.density.fcs.cluster.fcs.medians.gml",sep=.Platform$file.sep),format="gml")
	#new_graph <- SPADE.annotateGraph(old_graph, layout=igraph:::layout.kamada.kawai(old_graph), anno=list(demo=matrix(1:igraph:::vcount(old_graph))))

olimora/mySPADE documentation built on May 9, 2019, 8:09 p.m.