Command-line reference

Every command prints the same help with --help (e.g. gcen2 build --help). Options marked repeatable may be given several times; -t / --threads sets the number of threads.

Analysis commands

gcen2 normalize

Normalize gene expression data.

Option

Type

Default

Description

-i, --input

PATH

required

Input expression TSV file.

-o, --output

PATH

required

Output normalized TSV file.

-m, --method

TEXT

tmm

Normalization method: upqt, median, deseq, tmm, hkg.

-l, --log

TEXT

Log transform: log, log2, log10.

gcen2 filter

Filter genes by expression statistics.

Option

Type

Default

Description

-i, --input

PATH

required

Input expression TSV file.

-o, --output

PATH

required

Output filtered TSV file.

-p, --percent-mean

FLOAT

1

Retain top fraction by mean expression.

--percent-sd

FLOAT

1

Retain top fraction by standard deviation.

--cutoff-mean

FLOAT

0

Minimum mean expression.

--cutoff-sd

FLOAT

0

Minimum standard deviation.

gcen2 build

Build a gene co-expression network (streamed to the output file).

Option

Type

Default

Description

-i, --input

PATH

required

Input expression TSV file, or AnnData (.h5ad).

-o, --output

PATH

required

Output network TSV file.

-m, --method

TEXT

spearman

Correlation method: pearson, spearman, pearson_nonzero (only cells where both genes are non-zero) or pearson_pairwise_complete.

-c, --cor

FLOAT

0.1

Minimum correlation cutoff.

-p, --pval

FLOAT

0.001

P-value cutoff.

-f, --fdr

Apply FDR correction.

-s, --signed

Signed network: keep positive correlations only (as GCEN v1 -s).

-a, --all

Output all edges without any cutoff (-c/-p ignored).

-l, --log

TEXT

log(x+1) transform first: log, log2 or log10.

-t, --threads

INTEGER

2

Number of threads.

--max-pairs

INTEGER

Gene pairs computed per block; edges are written block by block (default 500000).

--layer

TEXT

.h5ad: adata.layers entry instead of X.

--hvg

.h5ad: only genes flagged in adata.var[‘highly_variable’].

--groupby

TEXT

.h5ad: adata.obs column to select cells by.

--group

TEXT

repeatable

.h5ad: keep cells whose –groupby value is this; repeatable.

--tom

Add WGCNA’s topological overlap as a ‘tom’ column (pearson/spearman; -s: signed adjacency). Holds a genes x genes float matrix in memory.

--power

TEXT

auto

–tom: soft-threshold power, or ‘auto’ (WGCNA pickSoftThreshold).

--tom-min

FLOAT

0

–tom: drop edges with TOM below this.

--kernel

TEXT

auto

pearson/spearman kernel: pairwise (as GCEN v1), gemm (matrix product, ~10x faster with hundreds of samples; r equal to rounding) or auto (gemm from 64 samples).

gcen2 module

Identify gene modules from a co-expression network (-i, Jaccard + DFS) or from an expression matrix or .h5ad (-e, WGCNA TOM + hierarchical clustering).

Option

Type

Default

Description

-i, --input

PATH

Input network TSV file.

-o, --output

PATH

required

Output module TSV file.

-s, --similarity

FLOAT

0.5

Jaccard similarity cutoff.

-t, --threads

INTEGER

2

Number of threads.

-e, --expr

PATH

Expression matrix instead of -i: WGCNA modules (TOM, average-linkage clustering, dynamic tree cut, eigengene merging; as blockwiseModules).

-m, --method

TEXT

pearson

-e: correlation for the TOM: pearson or spearman.

--signed

-e: signed network ((1 + r) / 2)^power, else |r|^power.

--power

TEXT

auto

-e: soft-threshold power, or ‘auto’ (pickSoftThreshold).

--min-size

INTEGER

-e: minimum module size [default: 20; hdwgcna 50].

--deep-split

INTEGER

-e: dynamic tree cut deepSplit, 0-4 [default: 2; hdwgcna 4].

--merge-cut

FLOAT

-e: merge modules whose eigengenes have 1 - r below this [default: 0.15; hdwgcna 0.2].

--preset

TEXT

wgcna

-e: wgcna (blockwiseModules defaults) or hdwgcna (hdWGCNA ConstructNetwork defaults: signed, deepSplit 4, no PAM stage, minKMEtoStay 0.2, min size 50, merge cut 0.2, power from bicor with R^2 >= 0.8 and power > 3).

-l, --log

TEXT

-e: log(x+1) transform first: log, log2 or log10.

--me

PATH

-e: write the module eigengenes (samples x ME<k> for module k of -o, and ME_unassigned) to this TSV file.

--kme

PATH

-e: write every gene’s kME (correlation with each eigengene) and its p-values to this TSV file.

--hubs

PATH

-e: write the hub genes (highest kME) of each module to this TSV file.

--n-hubs

INTEGER

10

-e: hub genes per module.

--traits

PATH

-e: sample traits TSV (samples as rows, numeric columns); needs –trait-cor.

--trait-cor

PATH

-e: write the eigengene-trait correlations (module, trait, cor, p, n) to this TSV file.

--layer

TEXT

-e .h5ad: adata.layers entry instead of X.

--hvg

-e .h5ad: only genes in adata.var[‘highly_variable’].

--groupby

TEXT

-e .h5ad: adata.obs column to select cells by.

--group

TEXT

repeatable

-e .h5ad: keep cells whose –groupby value is this; repeatable.

--soft-power

PATH

-e: write the scale-free fit of every power tried to this TSV file (for gcen2 plot soft-power).

--dendrogram

PATH

-e: write the gene tree and modules to this JSON file (for gcen2 plot dendrogram).

--tom-hubs

PATH

-e: write the TOM of the module genes with each module’s 25 top-kME genes to this TSV file (hub networks, module UMAP).

--gs

PATH

-e: write the gene significance (correlation of every gene with every trait, and p) to this TSV file; needs –traits.

gcen2 annotate

GO/KEGG functional annotation of a network or of modules (GCEN v1 rules).

Option

Type

Default

Description

-g, --go, --go-obo

PATH

GO OBO file.

-k, --kegg

PATH

K2ko file (KEGG); ignored if -g is given.

-a, --assoc

PATH

required

Gene-term association file.

-n, --network

PATH

Input network file.

-m, --module

PATH

Module file (ignored if -n is given).

-o, --output

PATH

required

Output directory.

-p, --pval

FLOAT

0.05

P-value cutoff.

-t, --thread, --threads

INTEGER

2

Number of threads.

gcen2 enrich

Standalone enrichment analysis for an arbitrary gene list.

Option

Type

Default

Description

-e, --query

PATH

required

Query gene list.

-b, --background

PATH

required

Background gene list.

-g, --go-obo

PATH

required

GO OBO file.

-a, --assoc

PATH

required

Gene-term association file.

-o, --output

PATH

required

Output TSV file.

-p, --pval

FLOAT

0.05

P-value cutoff.

gcen2 rwr

Gene function prediction using Random Walk with Restart.

Option

Type

Default

Description

-n, --network

PATH

required

Input network TSV file.

-g, --genes

PATH

required

Seed genes list (one per line; GCEN v1 seed files accepted).

-o, --output

PATH

required

Output TSV file.

--gamma

FLOAT

0.5

Restart probability.

--prob-cutoff

FLOAT

0.01

Minimum probability.

gcen2 merge

Merge two or more co-expression networks.

Option

Type

Default

Description

-i, --input

PATH

required, repeatable

Input network files (repeat for each network).

-o, --output

PATH

required

Output merged network TSV file.

-c, --cor-cutoff

FLOAT

0.5

Minimum absolute aggregated correlation.

gcen2 extract

Extract a subnetwork for a list of genes.

Option

Type

Default

Description

-i, --input

PATH

required

Input network TSV file.

-g, --genes

PATH

required

Gene list file (one gene per line).

-o, --output

PATH

required

Output subnetwork TSV file.

gcen2 shuffle

Degree-preserving edge shuffle (null model generation).

Option

Type

Default

Description

-i, --input

PATH

required

Input network TSV file.

-o, --output

PATH

required

Output shuffled network TSV file.

--swap-factor

INTEGER

100

Number of swaps = swap_factor × edge_count.

--seed

INTEGER

42

Random seed.

gcen2 stats

Print network statistics.

Option

Type

Default

Description

-i, --input

PATH

required

Input network TSV file.

-t, --threads

INTEGER

2

Number of threads.

gcen2 diff

Differential co-expression analysis between two conditions (Fisher’s z test).

Option

Type

Default

Description

--network-a, -A

PATH

required

Network from condition A.

--network-b, -B

PATH

required

Network from condition B.

-o, --output

PATH

required

Output differential results TSV file.

-p, --pval

FLOAT

0.05

P-value cutoff.

--n-a

INTEGER

30

Number of samples in condition A.

--n-b

INTEGER

30

Number of samples in condition B.

-m, --method

TEXT

pearson

Correlation of the networks: pearson, or spearman (variance 1.06 / (n - 3)).

-f, --fdr

Call changed edges by FDR (Benjamini-Hochberg) <= -p.

-t, --threads

INTEGER

2

Threads for reading and writing the files.

gcen2 consensus-modules

Consensus modules of several expression sets (WGCNA blockwiseConsensusModules): modules.tsv, eigengenes.tsv (all samples), kme.tsv, hub_genes.tsv, sets.tsv (powers, calibration) and set_eigengenes.tsv in OUTPUT/.

Option

Type

Default

Description

-e, --expr

PATH

required, repeatable

Expression matrix of one set (genes x samples TSV); repeat for each set (same genes).

-o, --output

PATH

required

Output directory.

--set-name

TEXT

repeatable

Name of each set, in the order of -e (default: file names).

--preset

TEXT

wgcna

wgcna (blockwiseConsensusModules defaults) or hdwgcna (hdWGCNA ConstructNetwork(consensus = TRUE): signed, consensus quantile 0.3, deepSplit 4, no PAM stage, min size 50, merge cut 0.2, each set’s power from bicor with R^2 >= 0.8 and power > 3).

--signed

Signed networks (wgcna preset).

--power

TEXT

auto

Soft-threshold power: ‘auto’ (each set’s own), one number, or one per set (comma-separated).

--consensus-quantile

FLOAT

Quantile of the sets’ TOMs (0 = minimum) [default: 0; hdwgcna 0.3].

--min-size

INTEGER

Minimum module size.

--deep-split

INTEGER

Dynamic tree cut deepSplit, 0-4.

--merge-cut

FLOAT

Merge modules whose consensus eigengene dissimilarity is below this.

-l, --log

TEXT

log(x+1) transform first: log, log2 or log10.

--n-hubs

INTEGER

10

Hub genes per module.

-t, --threads

INTEGER

2

Number of threads.

gcen2 module-preservation

Preservation of reference modules in another data set (WGCNA modulePreservation, as hdWGCNA’s ModulePreservation): preservation.tsv (observed statistics) and preservation_Z.tsv (Z scores, Zsummary.pres).

Option

Type

Default

Description

-r, --ref

PATH

required

Reference expression the modules were built from (genes x samples TSV, e.g. metacells.tsv of celltype-modules –write-metacells).

-m, --modules

PATH

required

Reference modules: GCEN2 modules.tsv or a table with gene and module columns; genes not in it are unassigned.

-q, --query

PATH

required

Test expression: genes x samples TSV, or an .h5ad with counts (metacells are then built from it, as hdWGCNA’s query).

-o, --output

PATH

required

Output directory.

--permutations

INTEGER

500

Permutations (hdWGCNA default 500).

--seed

INTEGER

12345

Random seed (R’s set.seed; hdWGCNA 12345).

--network-type

TEXT

unsigned

unsigned (WGCNA’s and hdWGCNA’s), signed or ‘signed hybrid’.

--groupby

TEXT

.h5ad query: obs column to select cells.

--group

TEXT

repeatable

.h5ad query: only this –groupby value; repeatable.

-k, --k

INTEGER

25

.h5ad query: cells per metacell.

--max-shared

INTEGER

.h5ad query: max cells shared by metacells.

--max-metacells

INTEGER

1000

.h5ad query.

--use-rep

TEXT

.h5ad query: obsm key for the neighbours.

--n-pcs

INTEGER

30

.h5ad query: components for neighbours.

--metacell-seed

INTEGER

42

.h5ad query.

-t, --threads

INTEGER

2

Number of threads.

gcen2 project-modules

Eigengenes of reference modules on the cells of another data set (hdWGCNA ProjectModules): projected_eigengenes.tsv, with –harmonize-by projected_harmonized_eigengenes.tsv, and projected_modules.tsv.

Option

Type

Default

Description

-i, --input

PATH

required

Query AnnData (.h5ad), counts.

-m, --modules

PATH

required

Reference modules: GCEN2 modules.tsv (module, gene) or a table with gene and module columns (hdWGCNA).

-o, --output

PATH

required

Output directory.

--groupby

TEXT

adata.obs column to select query cells.

--group

TEXT

repeatable

Only cells with this –groupby value; repeatable.

--min-overlap

FLOAT

0.5

Project modules with at least this fraction of their genes in the query (hdWGCNA overlap_proportion).

--harmonize-by

TEXT

adata.obs column: also harmonized eigengenes (Harmony).

--layer

TEXT

adata.layers entry instead of X.

--npcs

INTEGER

50

With –harmonize-by: components per module.

--seed

INTEGER

0

Random seed (Harmony).

gcen2 celltype

Cell-type-specific co-expression networks from single-cell data.

Option

Type

Default

Description

-i, --input

PATH

required

AnnData (.h5ad) file.

--groupby

TEXT

required

adata.obs column with the cell types.

-o, --output

PATH

required

Output directory.

--group

TEXT

repeatable

Only this cell type; repeatable (default: all).

--strategy

TEXT

metacell

Samples per cell type: metacell, or pseudo_replicates (deprecated: random groups rank gene pairs at chance level).

-k, --k

INTEGER

25

Cells per metacell.

--max-shared

INTEGER

Max cells shared by two metacells (default min(10, k-1)).

--max-metacells

INTEGER

1000

Max metacells per cell type.

--min-cells

INTEGER

100

Skip cell types with fewer cells.

--use-rep

TEXT

adata.obsm key for the neighbours (default X_pca, else PCA).

--n-pcs

INTEGER

30

Components used for the neighbours.

--replicates

INTEGER

10

pseudo_replicates: random groups per cell type.

--layer

TEXT

adata.layers entry instead of X.

--normalize/--no-normalize

Log-normalise metacells (default: when the data are integer counts).

--hvg

Only genes flagged in adata.var[‘highly_variable’].

-m, --method

TEXT

spearman

pearson, spearman, pearson_nonzero or pearson_pairwise_complete.

-c, --cor

FLOAT

0.5

Minimum correlation cutoff.

-p, --pval

FLOAT

0.001

P-value cutoff.

--fdr/--no-fdr, -f

on

Benjamini-Hochberg FDR over all gene pairs, -p applying to it (default on; off before 2026-11-18).

--signed

Keep positive correlations only.

-l, --log

TEXT

log(x+1) transform first: log, log2 or log10.

--diff

Also compare every pair of cell-type networks (Fisher’s z on the networks’ effective sample sizes).

--diff-pval

FLOAT

0.05

P-value cutoff of the differential test.

--seed

INTEGER

42

Random seed.

--effective-samples

TEXT

overlap

Metacells: sample size of the p-values. overlap: per gene pair, from the cells the metacells share; cells: n_cells // k for every pair (before 2026-11-18).

-t, --threads

INTEGER

2

Number of threads.

gcen2 celltype-modules

WGCNA-style modules per cell type (the hdWGCNA workflow): genes expressed in enough cells, metacells, TOM modules, eigengenes, kME and hub genes in OUTPUT/<cell type>/. With –consensus-by, one consensus network over the samples of each type (sets.tsv, set_eigengenes.tsv); with –harmonize-by, harmonized cell eigengenes; –dme-by and –trait test and correlate the (harmonized) cell eigengenes.

Option

Type

Default

Description

-i, --input

PATH

required

AnnData (.h5ad) file.

--groupby

TEXT

required

adata.obs column with the cell types.

-o, --output

PATH

required

Output directory.

--group

TEXT

repeatable

Only this cell type; repeatable (default: all).

--fraction

FLOAT

0.05

Genes with a value > 0 in at least this fraction of the type’s cells (hdWGCNA gene_select = ‘fraction’).

--hvg

Only genes flagged in adata.var[‘highly_variable’].

-k, --k

INTEGER

25

Cells per metacell.

--max-shared

INTEGER

Max cells shared by two metacells (default min(10, k-1)).

--max-metacells

INTEGER

1000

Max metacells per cell type.

--min-cells

INTEGER

100

Skip cell types with fewer cells.

--use-rep

TEXT

adata.obsm key for the neighbours (default X_pca, else PCA).

--n-pcs

INTEGER

30

Components used for the neighbours.

--layer

TEXT

adata.layers entry instead of X.

--normalize/--no-normalize

Log-normalise metacells (default: when the data are integer counts).

--preset

TEXT

hdwgcna

hdwgcna (hdWGCNA ConstructNetwork defaults, bicor power) or wgcna (blockwiseModules defaults).

--power

TEXT

auto

Soft-threshold power, or ‘auto’ (the preset’s rule).

--min-size

INTEGER

Minimum module size (preset default).

--deep-split

INTEGER

Dynamic tree cut deepSplit, 0-4.

--merge-cut

FLOAT

Merge modules whose eigengenes have 1 - r below this.

--n-hubs

INTEGER

10

Hub genes per module.

--write-metacells

Also write each type’s metacells.tsv (genes x metacells; gcen2 module -e input).

--write-tom

Also write each type’s tom_hubs.tsv (TOM of the module genes with each module’s top-kME genes; for the hub-network and module-UMAP figures).

--seed

INTEGER

42

Random seed (metacell centres).

--cell-eigengenes/--no-cell-eigengenes

on

Eigengenes and kME of every cell (hdWGCNA ModuleEigengenes / ModuleConnectivity): cell_eigengenes.tsv, cell_kme.tsv.

--reassign/--no-reassign

on

Move genes with a negative cell kME for their module (hdWGCNA ModuleConnectivity); needs the cell eigengenes.

--backed

Leave the expression on disk and read one cell type’s cells at a time (less memory for an atlas; X must be stored as CSR).

--consensus-by

TEXT

adata.obs column (sample, study, …): a consensus network over its values (hdWGCNA ConstructNetwork(consensus = TRUE)); metacells within each value.

--consensus-quantile

FLOAT

With –consensus-by: quantile of the sets’ TOMs (0 = minimum; preset default: hdwgcna 0.3, wgcna 0).

--harmonize-by

TEXT

adata.obs column (sample, batch, …): also harmonized cell eigengenes (hdWGCNA ModuleEigengenes(group.by.vars = …), Harmony): cell_harmonized_eigengenes.tsv; the cell kME then uses them.

--npcs

INTEGER

50

With –harmonize-by: principal components per module.

--dme-by

TEXT

adata.obs column: differential module eigengenes of each value against the type’s other cells (hdWGCNA FindAllDMEs): dmes.tsv.

--trait

TEXT

repeatable

adata.obs column to correlate with the cell eigengenes (hdWGCNA ModuleTraitCorrelation); repeatable: trait_cor.tsv.

--trait-groupby

TEXT

With –trait: also per value of this adata.obs column.

-t, --threads

INTEGER

2

Number of threads.

gcen2 spatial-modules

WGCNA-style modules of a spatial sample (the hdWGCNA spatial workflow): metaspots within groups (Visium grid, or nearest spots for any platform), TOM modules, eigengenes, kME, hub genes and spot-level eigengenes in OUTPUT/.

Option

Type

Default

Description

-i, --input

PATH

required

Spatial AnnData (.h5ad) with counts: Visium (obs array_row / array_col) or any platform with obsm[‘spatial’].

-o, --output

PATH

required

Output directory.

--groupby

TEXT

adata.obs column (regions / clusters); metaspots are built within each group (default: all spots together).

--fraction

FLOAT

0.05

Genes with counts in at least round(fraction * spots) spots (hdWGCNA gene_select = ‘fraction’).

--hvg

Only genes flagged in adata.var[‘highly_variable’].

--genes

PATH

Use these genes (one per line) instead of –fraction / –hvg.

--min-spots

INTEGER

50

Skip groups with fewer spots.

--mode

TEXT

sum

Metaspot aggregation: sum or average.

--metaspots

TEXT

auto

grid (Visium, hdWGCNA MetaspotsByGroups), knn (each centre with its k - 1 nearest spots in obsm[–spatial-key]; any platform) or auto (grid when obs has a Visium hexagonal grid in –row-key / –col-key, else knn).

--row-key

TEXT

array_row

obs column: Visium grid row.

--col-key

TEXT

array_col

obs column: Visium grid column.

--spatial-key

TEXT

spatial

obsm entry with the coordinates (knn metaspots, –plot).

-k, --k-neighbors

INTEGER

7

knn metaspots: spots per metaspot (the centre included); 7 matches a Visium hexagon, about 100 for 10 um Slide-seq beads.

--max-shared

INTEGER

knn metaspots: at most this many spots shared by two metaspots (default round(2k/7), 2 for k = 7).

--seed

INTEGER

42

knn metaspots: seed for the centre order.

--layer

TEXT

adata.layers entry instead of X.

--preset

TEXT

hdwgcna

hdwgcna (hdWGCNA ConstructNetwork defaults, bicor power) or wgcna (blockwiseModules defaults).

--power

TEXT

auto

Soft-threshold power, or ‘auto’ (the preset’s rule).

--min-size

INTEGER

Minimum module size (preset default).

--deep-split

INTEGER

Dynamic tree cut deepSplit, 0-4.

--merge-cut

FLOAT

Merge modules whose eigengenes have 1 - r below this.

--n-hubs

INTEGER

10

Hub genes per module.

--spot-eigengenes/--no-spot-eigengenes

on

Eigengenes of every spot (hdWGCNA ModuleEigengenes), spot kME and group correlations.

--reassign/--no-reassign

on

Move genes with a negative spot kME for their module (hdWGCNA ModuleConnectivity); needs the spot eigengenes.

--plot

Also draw spatial_eigengenes.png (needs obsm[–spatial-key]).

--write-metaspots

Also write metaspots.tsv (genes x metaspots; gcen2 module -e input).

--write-tom

Also write tom_hubs.tsv (for the hub-network and module-UMAP figures).

-t, --threads

INTEGER

2

Number of threads.

gcen2 spatial-build

Spatial transcriptomics co-expression network analysis.

Option

Type

Default

Description

-i, --input

PATH

required

Input AnnData file (.h5ad) with obsm[‘spatial’].

-o, --output

PATH

required

Output .network file (filtered/weighted) or directory (regions).

-m, --mode

TEXT

filtered

Analysis mode: filtered | weighted | regions.

--n-neighbors

INTEGER

6

KNN neighbours. Use –radius to switch to radius mode.

--radius

FLOAT

Radius cutoff (overrides –n-neighbors).

--bandwidth

FLOAT

Gaussian bandwidth for weighted mode (auto if omitted).

--region-key

TEXT

obs column for region labels (regions mode).

--n-regions

INTEGER

5

Number of auto clusters when –region-key is omitted.

-c, --cor-cutoff

FLOAT

0.6

Minimum absolute correlation.

-p, --p-cutoff

FLOAT

0.05

Maximum p-value.

--method

TEXT

spearman

Correlation: spearman | pearson.

--layer

TEXT

adata.layers entry instead of X.

--fraction

FLOAT

0.05

Genes with a value > 0 in at least round(fraction * spots) spots (0: all genes).

--normalize/--no-normalize

Log-normalize (counts per 10,000; default: when the data are integer counts).

-t, --threads

INTEGER

2

Number of threads.

--kernel

TEXT

auto

Correlation kernel: auto, pairwise or gemm (see build).

--moran

PATH

Also write each gene’s Moran’s I (gene, morans_i, pval, fdr, mean, detected; weighted mode: also morans_i_smoothed) to this TSV (gcen2 plot moran).

--moran-fdr

FLOAT

0.05

filtered: keep edges between genes with Moran’s I > 0 and FDR <= this (one-sided test; 1: I > 0 only).

gcen2 trajectory

Co-expression networks in sliding windows along pseudotime.

Option

Type

Default

Description

-i, --input

PATH

required

AnnData (.h5ad) or expression TSV (genes x samples).

--pseudotime

TEXT

required

adata.obs column (.h5ad input), or a TSV file of sample / pseudotime pairs.

-o, --output

PATH

required

Output directory.

-w, --window

FLOAT

0.2

Cells per window (>= 3), or a fraction (< 1).

-s, --step

FLOAT

Shift between windows, count or fraction (default: half a window).

--metacell

INTEGER

1

Average this many consecutive cells into a metacell.

--layer

TEXT

AnnData layer instead of X.

-m, --method

TEXT

spearman

Correlation method: pearson or spearman.

-c, --cor

FLOAT

0.5

Minimum correlation cutoff.

-p, --pval

FLOAT

0.001

P-value cutoff.

-f, --fdr

Apply FDR correction.

--signed

Keep positive correlations only.

-l, --log

TEXT

log(x+1) transform first: log, log2 or log10.

-t, --threads

INTEGER

2

Number of threads.

--plot

Also write trajectory.png.

gcen2 fuse

Weighted fusion of heterogeneous networks (multi-omics integration).

Option

Type

Default

Description

-i, --input

PATH

required, repeatable

Layer edge-list files (co-expression, PPI, regulatory, …); repeat for each layer.

-o, --output

PATH

required

Output fused network TSV.

--name

TEXT

repeatable

Layer names, one per -i (default: file names).

-w, --weight

FLOAT

repeatable

Layer weights, one per -i (default 1).

--normalize

TEXT

max

Per-layer weight scaling: max, rank or none.

--min-layers

INTEGER

1

Keep edges found in at least this many layers.

--min-score

FLOAT

0

Minimum fused score.

-t, --threads

INTEGER

4

Threads for writing the table.

gcen2 rwr-multiplex

Random walk with restart on a multiplex (multi-layer) network (RWR-M).

Option

Type

Default

Description

-n, --network

PATH

required, repeatable

Layer edge-list files; repeat for each layer.

-g, --genes

PATH

required

Seed genes list.

-o, --output

PATH

required

Output TSV file.

--name

TEXT

repeatable

Layer names, one per -n.

--gamma

FLOAT

0.5

Restart probability.

--delta

FLOAT

0.5

Weight of the jumps between layers (their probability with –transition layer).

--weighted

Use layer edge weights for transitions.

--aggregate

TEXT

geometric

Per-gene score: geometric, arithmetic or sum.

--prob-cutoff

FLOAT

0

Minimum score.

--transition

TEXT

supra

supra: normalise the whole supra-adjacency matrix (RandomWalkRestartMH); layer: each layer first, every gene jumps with probability delta.

gcen2 report

Generate a comprehensive HTML research report (or PDF with a .pdf output) with vector figures and captions. With –me / –kme / –hubs / –trait-cor / –soft-power / –dendrogram / –tom-hubs, -m is shown as WGCNA-style modules with their figures (module sizes, soft power, dendrogram, eigengene network, module-trait, kME, hub network).

Option

Type

Default

Description

-n, --network

PATH

Input network TSV.

-m, --modules

PATH

Module TSV file.

-o, --output

PATH

report.html

Output report file.

--me

PATH

Eigengenes of -m (gcen2 module -e –me): WGCNA module section.

--kme

PATH

kME file of -m (module -e –kme).

--hubs

PATH

Hub genes of -m (module -e –hubs).

--trait-cor

PATH

Eigengene-trait correlations of -m (module -e –trait-cor).

--celltype-modules

PATH

Output directory of gcen2 celltype-modules: one module section per cell type.

--n-hubs

INTEGER

10

Hub genes shown per module.

--soft-power

PATH

Soft-power fits of -m (module -e –soft-power).

--dendrogram

PATH

Gene tree of -m (module -e –dendrogram).

--tom-hubs

PATH

Hub TOM of -m (module -e –tom-hubs; hub-network figure).

--figures-dir

PATH

Also save every report figure there as PDF, PNG and SVG (for a manuscript).

--coords

PATH

With –celltype-modules: cells’ embedding (.h5ad with obsm[–basis], or TSV of x, y by cell) for the metacell figure.

--basis

TEXT

X_umap

obsm key of –coords.

--moran

PATH

Moran’s I table of spatial-build –moran.

--merge-input

PATH

repeatable

Input network of gcen2 merge; repeat for each.

--merged

PATH

With –merge-input: the gcen2 merge output.

--extract-genes

PATH

Gene list of gcen2 extract; the network is -n (full network or subnetwork).

Figures (gcen2 plot)

Every gcen2 plot command also takes -o / --output (file stem, or one file by its extension), --size (single 89 mm, onehalf 120 mm, double 183 mm or a width in mm), --format (repeatable; default PDF, PNG and SVG) and --palette (wgcna or okabe-ito).

gcen2 plot celltype-networks

Edges and edge overlap of gcen2 celltype networks.

Option

Type

Default

Description

-i, --input

PATH

required

Output directory of gcen2 celltype.

gcen2 plot celltype-overview

Cells, metacells, genes and modules of every cell type.

Option

Type

Default

Description

-i, --input

PATH

required

celltypes.tsv of celltype-modules.

gcen2 plot degree-distribution

Degree histogram and scale-free plot of a network.

Option

Type

Default

Description

-i, --input

PATH

required

Network edge-list file.

gcen2 plot dendrogram

Gene dendrogram with module colours (PlotDendrogram, plotDendroAndColors).

Option

Type

Default

Description

-i, --input

PATH

required

dendrogram.json.

--unmerged/--no-unmerged

on

Also the modules before merging.

gcen2 plot diff-network

Network of the most changed edges.

Option

Type

Default

Description

-i, --input

PATH

required

gcen2 diff output.

--top

INTEGER

60

Edges drawn.

gcen2 plot diff-overview

Differential co-expression at a glance (categories, A vs B, change vs p).

Option

Type

Default

Description

-i, --input

PATH

required

gcen2 diff output.

gcen2 plot dme-lollipop

Differential module eigengenes: lollipop chart (PlotDMEsLollipop).

Option

Type

Default

Description

-i, --input

PATH

required

dmes.tsv.

-m, --modules

PATH

modules.tsv (dot size).

--alpha

FLOAT

0.05

Significance threshold (adjusted p).

gcen2 plot dme-volcano

Differential module eigengenes: volcano plot (PlotDMEsVolcano).

Option

Type

Default

Description

-i, --input

PATH

required

dmes.tsv.

--alpha

FLOAT

0.05

Significance threshold (adjusted p).

gcen2 plot edge-weights

Distribution of the edge weights.

Option

Type

Default

Description

-i, --input

PATH

required

Network edge-list file.

--column

TEXT

correlation

Weight column.

gcen2 plot eigengene-network

Eigengene dendrogram and correlation heatmap (plotEigengeneNetworks, ModuleCorrelogram).

Option

Type

Default

Description

-i, --input

PATH

required

eigengenes.tsv / cell_eigengenes.tsv.

--traits

PATH

Samples x numeric traits TSV.

gcen2 plot enrich-bar

Top enriched terms of one result (bars).

Option

Type

Default

Description

-i, --input

PATH

required

gcen2 enrich output / one annotate file.

--top

INTEGER

15

Terms shown.

gcen2 plot enrich-dot

Top terms of every module (dot plot; EnrichrDotPlot).

Option

Type

Default

Description

-i, --input

PATH

required

gcen2 annotate output directory.

--top

INTEGER

3

Terms per module.

gcen2 plot enrich-heatmap

Modules x top terms heatmap of -log10 p.

Option

Type

Default

Description

-i, --input

PATH

required

gcen2 annotate output directory.

--top

INTEGER

3

Terms per module.

gcen2 plot expression-qc

Per-sample expression distributions, before and after normalization.

Option

Type

Default

Description

-e, --expr

PATH

required

Expression TSV (genes x samples).

--normalized

PATH

Normalized expression (gcen2 normalize).

gcen2 plot extract-overview

Query genes of gcen2 extract: found in the network, and their degree.

Option

Type

Default

Description

-i, --input

PATH

required

Network, or the gcen2 extract output.

-g, --genes

PATH

required

Gene list given to gcen2 extract.

--top

INTEGER

20

Genes shown.

gcen2 plot fusion

A fused multi-layer network (gcen2 fuse).

Option

Type

Default

Description

-i, --input

PATH

required

gcen2 fuse output.

gcen2 plot hub-network

Hub-gene network of a module (ModuleNetworkPlot).

Option

Type

Default

Description

-t, --tom

PATH

required

tom_hubs.tsv (–write-tom / –tom-hubs).

-k, --kme

PATH

required

kme.tsv.

-m, --module

TEXT

One module (e.g. 0 or ME0); default: all modules, one file each (<output>_ME<k>).

--n-inner

INTEGER

10

Genes on the inner circle.

--n-outer

INTEGER

15

Genes on the outer circle.

gcen2 plot hub-network-all

Hub genes of all modules in one network (HubGeneNetworkPlot).

Option

Type

Default

Description

-t, --tom

PATH

required

tom_hubs.tsv.

-k, --kme

PATH

required

kme.tsv.

--n-hubs

INTEGER

6

Hub genes per module.

--n-other

INTEGER

3

Other genes per module.

--edge-prop

FLOAT

0.5

Fraction of the strongest edges drawn.

--seed

INTEGER

0

Layout seed.

gcen2 plot kme

Sorted kME of each module’s genes (PlotKMEs).

Option

Type

Default

Description

-i, --input

PATH

required

kme.tsv or cell_kme.tsv.

--n-label

INTEGER

5

Hub genes named per module.

gcen2 plot me-dotplot

Eigengenes by group: dot plot (DotPlot of MEs).

Option

Type

Default

Description

-i, --input

PATH

required

cell_eigengenes.tsv (or harmonized).

-g, --groups

PATH

required

.h5ad or TSV (first column cells).

--groupby

TEXT

required

Column with the groups.

-m, --module

TEXT

repeatable

Only this module; repeatable.

gcen2 plot me-embedding

Eigengenes of every cell on an embedding or in space (ModuleFeaturePlot).

Option

Type

Default

Description

-i, --input

PATH

required

cell_eigengenes.tsv, cell_harmonized_eigengenes.tsv, spot_eigengenes.tsv or projected_eigengenes.tsv.

-c, --coords

PATH

required

.h5ad (obsm[–basis]) or TSV of x, y by cell.

--basis

TEXT

X_umap

obsm key of an .h5ad (X_umap, spatial, …).

--spatial

Spatial map: equal axes, image y axis.

-m, --module

TEXT

repeatable

Only this module; repeatable.

--ncols

INTEGER

4

Panels per row.

gcen2 plot me-radar

Eigengenes by group: radar chart (ModuleRadarPlot).

Option

Type

Default

Description

-i, --input

PATH

required

cell_eigengenes.tsv (or harmonized).

-g, --groups

PATH

required

.h5ad or TSV (first column cells).

--groupby

TEXT

required

Column with the groups.

-m, --module

TEXT

repeatable

Only this module; repeatable.

gcen2 plot me-violin

Eigengenes by group: violins.

Option

Type

Default

Description

-i, --input

PATH

required

cell_eigengenes.tsv (or harmonized).

-g, --groups

PATH

required

.h5ad or TSV (first column cells).

--groupby

TEXT

required

Column with the groups.

-m, --module

TEXT

repeatable

Only this module; repeatable.

gcen2 plot mean-variance

Mean against coefficient of variation; genes kept by gcen2 filter in colour.

Option

Type

Default

Description

-e, --expr

PATH

required

Expression TSV.

--kept

PATH

Filtered expression (gcen2 filter output).

gcen2 plot merge-overlap

Edges shared by the inputs of gcen2 merge (Venn for 2-3 networks, UpSet for more).

Option

Type

Default

Description

-i, --input

PATH

required, repeatable

Input network of gcen2 merge; repeat for each.

-m, --merged

PATH

gcen2 merge output (edges kept per region).

--name

TEXT

repeatable

Network names, one per -i (default: file names).

gcen2 plot metacells

Metacells on the cell embedding (DimPlotMetacells), per cell type.

Option

Type

Default

Description

-i, --input

PATH

required

metacell_members.tsv, or a celltype-modules output directory.

-c, --coords

PATH

required

AnnData (.h5ad) or TSV of x, y by cell.

--basis

TEXT

X_umap

obsm key of the embedding.

gcen2 plot mm-gs

Module membership vs gene significance (verboseScatterplot).

Option

Type

Default

Description

-i, --input

PATH

required

kme.tsv.

--gs

PATH

required

Gene significance (module -e –gs).

-m, --module

TEXT

required

Module (e.g. 0 or ME0).

--trait

TEXT

required

Trait name.

gcen2 plot module-size-hist

Histogram of module sizes (many modules, e.g. gcen2 module -i).

Option

Type

Default

Description

-m, --modules

PATH

required

Module file (module, gene).

gcen2 plot module-sizes

Genes per module (bar chart in the module colours).

Option

Type

Default

Description

-m, --modules

PATH

required

modules.tsv (module, gene).

--unassigned

Also the unassigned genes.

gcen2 plot module-trait

Module-trait correlation heatmap (labeledHeatmap, PlotModuleTraitCorrelation).

Option

Type

Default

Description

-i, --input

PATH

required

Trait correlations: module -e –trait-cor or trait_cor.tsv.

--annotate

TEXT

p

p (r and p), stars or none.

--group

TEXT

Only this group (celltype trait_cor).

gcen2 plot module-umap

UMAP of the module genes on their TOM with the hub genes (RunModuleUMAP).

Option

Type

Default

Description

-t, --tom

PATH

required

tom_hubs.tsv.

-k, --kme

PATH

required

kme.tsv.

--n-hubs

INTEGER

10

Hub genes per module used as UMAP features.

--n-label

INTEGER

3

Hub genes named per module.

--seed

INTEGER

0

UMAP seed.

gcen2 plot moran

Moran’s I of the genes (spatial-build –moran): distribution, top genes, smoothing.

Option

Type

Default

Description

-i, --input

PATH

required

spatial-build –moran output.

gcen2 plot network-view

Drawing of a network (best-connected genes, or –genes), coloured by module.

Option

Type

Default

Description

-i, --input

PATH

required

Network edge-list file.

-m, --modules

PATH

modules.tsv / module.txt.

--max-nodes

INTEGER

150

Genes drawn.

--n-label

INTEGER

12

Genes named.

gcen2 plot null-distribution

A network statistic against degree-preserving shuffles (gcen2 shuffle).

Option

Type

Default

Description

-i, --input

PATH

required

Network edge-list file.

-s, --shuffled

PATH

repeatable

Shuffled network; repeatable.

--metric

TEXT

clustering_coefficient

clustering_coefficient, transitivity, …

gcen2 plot preservation

Module preservation: Zsummary and median rank against module size (PlotModulePreservation), or a lollipop chart (PlotModulePreservationLollipop).

Option

Type

Default

Description

-i, --input

PATH

required

preservation_Z.tsv.

--observed

PATH

preservation.tsv (adds the median rank panel).

--lollipop

Sorted Zsummary lollipop chart instead.

gcen2 plot rwr-network

The seeds and the top candidates in the network.

Option

Type

Default

Description

-n, --network

PATH

required

Network edge-list file.

-i, --input

PATH

required

gcen2 rwr output.

-g, --genes

PATH

required

Seed gene list.

--top

INTEGER

20

Candidates shown.

gcen2 plot rwr-rank

Top genes by random-walk score (seeds marked).

Option

Type

Default

Description

-i, --input

PATH

required

gcen2 rwr / rwr-multiplex output.

-g, --genes

PATH

Seed gene list.

--top

INTEGER

30

Genes shown.

gcen2 plot sample-correlation

Sample-sample correlation heatmap (clustered).

Option

Type

Default

Description

-e, --expr

PATH

required

Expression TSV.

gcen2 plot sample-tree

Sample clustering tree with trait colours (outlier check).

Option

Type

Default

Description

-e, --expr

PATH

required

Genes x samples expression TSV.

--traits

PATH

Samples x traits TSV (colour bars).

--cut-height

FLOAT

Draw this cut height.

gcen2 plot set-eigengenes

Consensus modules: eigengenes in every set.

Option

Type

Default

Description

-i, --input

PATH

required

set_eigengenes.tsv (consensus network).

gcen2 plot soft-power

Scale-free fit and mean connectivity of each soft power (PlotSoftPowers).

Option

Type

Default

Description

-i, --input

PATH

required

soft_power.tsv.

--r2

FLOAT

0.8

R^2 threshold line (hdWGCNA 0.8, WGCNA 0.85).

gcen2 plot tom-heatmap

TOM heatmap of a random sample of genes (TOMplot).

Option

Type

Default

Description

-e, --expr

PATH

required

Genes x samples (metacells.tsv, module -e input).

-m, --modules

PATH

required

modules.tsv.

--power

FLOAT

required

Soft power of the network.

--signed/--unsigned

on

Signed network (hdWGCNA).

--n-genes

INTEGER

400

Random genes shown.

--seed

INTEGER

0

Seed of the gene sample.

gcen2 plot trajectory

Networks along pseudotime (windows, edge patterns, dynamic genes).

Option

Type

Default

Description

-i, --input

PATH

required

gcen2 trajectory output directory.