The list net must contain the named elements
igraph (of class igraph),
adjacency_matrix (a matrix or
dgCMatrix encoding edge connections),
and node_data (a data.frame containing node metadata),
all corresponding to the same network. The lists returned by
buildRepSeqNetwork() and
generateNetworkObjects()
are examples of valid inputs for the net argument.
Alternatively, the igraph may be passed to net and the node
metadata to data. However, this alternative functionality is
deprecated and will eventually be removed.
A clustering algorithm is used to partition the network graph into clusters
(densely-connected subgraphs). Each cluster represents a collection of
clones/cells with similar receptor sequences. The method used to partition
the graph depends on the choice of clustering algorithm, which is specified
using the cluster_fun argument.
The available options for cluster_fun are listed below. Each refers
to an igraph function implementing a
particular clustering algorithm. Follow the links to learn more about the
individual clustering algorithms.
Optional arguments to each clustering algorithm can have their
values specified using the ellipses (...) argument of
addClusterMembership().
Each cluster is assigned a numeric cluster ID. A cluster membership variable,
whose name is specified by cluster_id_name, is added to the node
metadata, encoding the cluster membership of the node for each row. The cluster
membership is encoded as the cluster ID number of the cluster to which the node
belongs.
The overwrite argument controls whether to overwrite pre-existing data.
If the variable specified by cluster_id_name is already present in
the node metadata, then overwrite must be set to TRUE in
order to perform clustering and overwrite the variable with new cluster
membership values. Alternatively, by specifying a value for
cluster_id_name that is not among the variables in the node metadata,
a new cluster membership variable can be created while preserving the old
cluster membership variable. In this manner, clustering can be performed
multiple times on the same network using different clustering algorithms,
without losing the results.