citrus.createHierarchyGraph: Create a graph object from clustering hierarchy

View source: R/citrus.plot.R

citrus.createHierarchyGraphR Documentation

Create a graph object from clustering hierarchy

Description

Create a graph object from clustering hierarchy that may be used by other plotting functions.

Usage

citrus.createHierarchyGraph(citrus.clustering, selectedClusters)

Arguments

citrus.foldFeatureSet

A citrus.foldFeatureSet object. Clusters for which features are calculated are included in the graph.

citrus.foldClustering

A citrus.foldClustering object. Used to determine relationships between clusters.

Value

A graph object and other properties for plotting.

graph

An igraph graph object.

layout

An igraph layout for the graph.

plotSize

Size of PDF for plotting (inches) calculated based on the number of clusters to be plotted.

Author(s)

Robert Bruggner

Examples

# Where the data lives
dataDirectory = file.path(system.file(package = "citrus"),"extdata","example1")

# Create list of files to be analyzed
fileList = data.frame("unstim"=list.files(dataDirectory,pattern=".fcs"))

# Read the data
citrus.combinedFCSSet = citrus.readFCSSet(dataDirectory,fileList)

# List of columns to be used for clustering
clusteringColumns = c("Red","Blue")

# Cluster data
citrus.clustering = citrus.cluster(citrus.combinedFCSSet,clusteringColumns)

# Large enough clusters
largeEnoughClusters = citrus.selectClusters(citrus.clustering)

# Create graph for plotting
hierarchyGraphStuff = citrus.createHierarchyGraph(citrus.clustering,selectedClusters=largeEnoughClusters)

nolanlab/citrus documentation built on April 19, 2024, 6:49 p.m.