Create a subset GSNData object, containing only a subset of vertices or subnets.
gsnSubset(object, distance = NULL, vertex_names = c(), subnet_names = NULL)
A new GSNData
object is returned containing a subset of the vertices and subnets from the original
GSNData
object. For a given distance, the following data are subsetted for the included vertices and
copied:
$distances[[distance]]$matrix
The raw distance matrix, subsetted.
$distances[[distance]]$pared
The pared distance matrix, subsetted.
$distances[[distance]]$edges
The edge list, subsetted
$distances[[distance]]$vertex_subnets
The vertex assignments for each subnet, subsetted.
$distances[[distance]]$clusters
The cluster assignments for each subnet, subsetted (for hierarchical clustering).
$distances[[distance]]$optimal_extreme
Character vector of length 1 indicating whether min or max distances are close in the raw distance matrix.
$distances[[distance]]$pared_optimal_extreme
Character vector of length 1 indicating whether min or max distances are close in the pared distance matrix.
The hclust object generated by hierarchical clustering is not currently subsetted or copied.
The default_distance
is set as whichever distance matrix is copied. Currently, this function only supports
copying a single distance matrix.
The following pathways data are copied:
$pathways$data
Pathways results, subsetted.
$pathways$type
The type of pathways results, copied.
$pathways$id_col
The identifier, copied.
$pathways$stat_col
Statistical column name, copied.
$pathways$sig_order
The significance order of the pathways results, based on the stat_column; are the pathways results to be sorted by significance from 'loToHi' (most significant values are low) or 'hiToLo' (most significant values high)?
A GSNData
object.
Specifies a distance metric to use for subsetting. Defaults to the default_distance
.
A character vector specifying the vertex names/gene sets to include in the GSNData
subset object.
A character vector specifying the names of the subnets to include in the GSNData
subset object.
This function is useful for subsetting a single subnet, or a small set of subnets for the purpose of plotting just that subnet.
GSNData()