Finds index of clustering in clusterMatrix slot of object based on descriptions of clusters.
1 2 3 4 5 6 7 8 9
a ClusterExperiment object
argument that can be either numeric or character vector
indicating the clusterings to be used. See details of
how to handle if there is no match to an given value of
argument that can be a single numeric or character value
indicating the single clustering to be used. Giving values that result in more than one clustering will result in an error. See details of
other arguments passed to the function (only used internally)
Not for user use. Argument allows function
getClusterIndex is largely used internally to parse the argument
whichClusters which is used as an argument extensively across functions in this package. Note that some functions require the match return a single clustering, in which case those functions use the function
getSingleClusterIndex with the singular argument
whichCluster and returns an error if it indicates more than one clustering. Furthermore
getSingleClusterIndex does not allow for any mismatches (
noMatch="throwError". Otherwise the parsing of the two arguments
whichCluster is the same, and is described in what follows.
whichClusters is numeric, then the function just returns the
numeric values of
whichClusters, after checking that they are valid. If any are invalid, they are silently removed if
silentlyRemove=TRUE. The values will be returned in the order given, so this argument can also be used to defined by functions to give an
ordering for the clusterings (as relevant).
whichClusters is a character value, then it the function attempts to use the character value to identify the clustering. The value of the argument is first matched against a set of "special" values: "workflow","all","none","primaryCluster","dendro" using the argument
match.arg, which does partial matching. If whichClusters is a vector of values, only the first value of the vector is matched against these values and if it matches, the remaining values are ignored. If it matches one of these values, then the cluster indices are given as follows.
"workflow"all clusterings in the current workflow (see
"all"all clusterings, with the primary clustering put first.
"primaryCluster"the primary clustering index as given by
"dendro"the index of the clustering given to create the cluster dendrogram, if it exists
whichClusters is a character value, but its first element does not match these predesignated values, then all the values of
whichClusters are attempted to be matched to the
clusterTypes of the object. Note that there may be more than one clustering that matches a given type. For any entries that do not match a value in
clusterTypes(object) are then matched based on the value of
clusterLabels of the object.
getClusterIndex returns a vector of all numeric indices that are indicated by the requested
whichClusters. Note that there is not a one-to-one match between input values and returned values since there may be more than one value for a given value of
whichClusters or no value at all.
1 2 3 4 5 6
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.