8 Jan 2002 mcxsubs version 1.00
mcxsubs - extract submatrices (subgraphs) of a matrix (graph) corresponding with index sets and sets of clusters. This can be used to inspect local cluster structure in a graph, for example by looking at the subgraph induced by a single cluster or a couple of clusterings, or the edge set where all tail nodes are from a set of clusters and all head nodes are from the complement of this set, and many other variants and refinements.
mcxsubs -imx <fname> [options] <specs>+
mcxsubs -imx <fname> (input matrix) [-icl <fname> (input clustering)] [-stem str (for output files)] [-digits k (set precision)] [--tag (tag nodes)] [-spec-defs (show spec syntax)] <specs>+
mcxsubs lets you extract submatrices/subgraphs corresponding with index sets and (possibly) sets of clusters from a given clustering. Columns and rows of the target submatrix can be specified both independently and simultaneously, and can be specified as unions of simple index and cluster ranges and complements of these.
Because a submatrix or subgraph specification is composed of type, location, column, row, index, and set specifications, the word specification is abbreviated as spec. Multiple submatrices can be specified simultaneously. A submatrix is created for each submatrix spec. Everything encountered after the mcxsubs options are exhausted should be a spec. The syntax of specs is described in the SUBMATRIX SPECIFICATIONS section.
<fname>
.
This option is obligatory.
A submatrix or subgraph spec consists of at most two spec parts, namely the column spec (or tail node part) and the row spec (or head node part). If there are two parts, they are simply concatenated. Each part consists of a colon separated pair, the type spec and the location spec. If the two parts have the same location spec, they can be collapsed by merging the type specs and using a single shared location spec. A shared location spec can occur in two cases: i) the spec of a principal submatrix or equivalently a subgraph, and ii) the spec of all edges between a set of nodes to the complement of that set. Examples of these are:
cr:i0-6,10,11-14
The c/r/C/R part is the type part of a column/row spec, indicating whether
it pertains to columns, rows, or both. The i/s/I/S part is the location
part.
c:i0-6,10,11-14r:i1-6,10,11-14
cR:i0-6,10,11-14
c:i0-6,10,11-14R:i1-6,10,11-14
c:i0-6,10,11-14r:I1-6,10,11-14
c:s3,5-9r:s8-14i10-30
cR:s0-2
The use of 'S' is analogous to that of 'C', 'R', and 'I'.
Thus, S0-3,8,21-30
specifies all indices which are in the
complement of the set formed by taking the union of
clusters 0-3,8,21-30.
As seen above, indices (either representing themselves or clusters) are entered as comma-separated lists of single indices or ranges of indices (ranges may overlap). The union of the corresponding elements is taken and passed along. Before anything else, the result set is replaced by its complement if 'I' is specified (for simple indices) or 'S' is specified (for clusters). If there is both an index and a set spec string, the union of the results of both is taken and passed along. If the latter result is passed to either 'C' or 'R', it is replaced by its complement.
If a column or row spec is missing, it is implicitly understood that all nodes should be taken for the missing type. A totally empty type spec (which is the case if the first character in the spec is the colon) indicates that the subgraph on all nodes must be taken, which is identical to the original graph. As an aside, this empty type spec renders any location spec useless, as it is ignored. This behaviour may still be useful in conjunction with the --tag option.
Additionally, a tag '#xyz' or '##xyz' may be concatenated to
the spec (where the xyz
part is up to your choice).
Normally, a generated submatrix is written to a file the name of
which contains the spec as a substring. If the '#xyz' tag is
present, the submatrix is written to the file 'stemxyz', where 'stem' can
be set with the -stem option.
If the '##xyz' tag is present, the submatrix is simply written to
the file 'xyz'. Examples:
cR:s0-2
cR:s0-2
#foo
cR:s0-2
##foo