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 |
|---|---|---|---|
|
PATH |
required |
Input expression TSV file. |
|
PATH |
required |
Output normalized TSV file. |
|
TEXT |
tmm |
Normalization method: upqt, median, deseq, tmm, hkg. |
|
TEXT |
Log transform: log, log2, log10. |
gcen2 filter¶
Filter genes by expression statistics.
Option |
Type |
Default |
Description |
|---|---|---|---|
|
PATH |
required |
Input expression TSV file. |
|
PATH |
required |
Output filtered TSV file. |
|
FLOAT |
1 |
Retain top fraction by mean expression. |
|
FLOAT |
1 |
Retain top fraction by standard deviation. |
|
FLOAT |
0 |
Minimum mean expression. |
|
FLOAT |
0 |
Minimum standard deviation. |
gcen2 build¶
Build a gene co-expression network (streamed to the output file).
Option |
Type |
Default |
Description |
|---|---|---|---|
|
PATH |
required |
Input expression TSV file, or AnnData (.h5ad). |
|
PATH |
required |
Output network TSV file. |
|
TEXT |
spearman |
Correlation method: pearson, spearman, pearson_nonzero (only cells where both genes are non-zero) or pearson_pairwise_complete. |
|
FLOAT |
0.1 |
Minimum correlation cutoff. |
|
FLOAT |
0.001 |
P-value cutoff. |
|
Apply FDR correction. |
||
|
Signed network: keep positive correlations only (as GCEN v1 -s). |
||
|
Output all edges without any cutoff (-c/-p ignored). |
||
|
TEXT |
log(x+1) transform first: log, log2 or log10. |
|
|
INTEGER |
2 |
Number of threads. |
|
INTEGER |
Gene pairs computed per block; edges are written block by block (default 500000). |
|
|
TEXT |
.h5ad: adata.layers entry instead of X. |
|
|
.h5ad: only genes flagged in adata.var[‘highly_variable’]. |
||
|
TEXT |
.h5ad: adata.obs column to select cells by. |
|
|
TEXT |
repeatable |
.h5ad: keep cells whose –groupby value is this; repeatable. |
|
Add WGCNA’s topological overlap as a ‘tom’ column (pearson/spearman; -s: signed adjacency). Holds a genes x genes float matrix in memory. |
||
|
TEXT |
auto |
–tom: soft-threshold power, or ‘auto’ (WGCNA pickSoftThreshold). |
|
FLOAT |
0 |
–tom: drop edges with TOM below this. |
|
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 |
|---|---|---|---|
|
PATH |
Input network TSV file. |
|
|
PATH |
required |
Output module TSV file. |
|
FLOAT |
0.5 |
Jaccard similarity cutoff. |
|
INTEGER |
2 |
Number of threads. |
|
PATH |
Expression matrix instead of -i: WGCNA modules (TOM, average-linkage clustering, dynamic tree cut, eigengene merging; as blockwiseModules). |
|
|
TEXT |
pearson |
-e: correlation for the TOM: pearson or spearman. |
|
-e: signed network ((1 + r) / 2)^power, else |r|^power. |
||
|
TEXT |
auto |
-e: soft-threshold power, or ‘auto’ (pickSoftThreshold). |
|
INTEGER |
-e: minimum module size [default: 20; hdwgcna 50]. |
|
|
INTEGER |
-e: dynamic tree cut deepSplit, 0-4 [default: 2; hdwgcna 4]. |
|
|
FLOAT |
-e: merge modules whose eigengenes have 1 - r below this [default: 0.15; hdwgcna 0.2]. |
|
|
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). |
|
TEXT |
-e: log(x+1) transform first: log, log2 or log10. |
|
|
PATH |
-e: write the module eigengenes (samples x ME<k> for module k of -o, and ME_unassigned) to this TSV file. |
|
|
PATH |
-e: write every gene’s kME (correlation with each eigengene) and its p-values to this TSV file. |
|
|
PATH |
-e: write the hub genes (highest kME) of each module to this TSV file. |
|
|
INTEGER |
10 |
-e: hub genes per module. |
|
PATH |
-e: sample traits TSV (samples as rows, numeric columns); needs –trait-cor. |
|
|
PATH |
-e: write the eigengene-trait correlations (module, trait, cor, p, n) to this TSV file. |
|
|
TEXT |
-e .h5ad: adata.layers entry instead of X. |
|
|
-e .h5ad: only genes in adata.var[‘highly_variable’]. |
||
|
TEXT |
-e .h5ad: adata.obs column to select cells by. |
|
|
TEXT |
repeatable |
-e .h5ad: keep cells whose –groupby value is this; repeatable. |
|
PATH |
-e: write the scale-free fit of every power tried to this TSV file (for gcen2 plot soft-power). |
|
|
PATH |
-e: write the gene tree and modules to this JSON file (for gcen2 plot dendrogram). |
|
|
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). |
|
|
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 |
|---|---|---|---|
|
PATH |
GO OBO file. |
|
|
PATH |
K2ko file (KEGG); ignored if -g is given. |
|
|
PATH |
required |
Gene-term association file. |
|
PATH |
Input network file. |
|
|
PATH |
Module file (ignored if -n is given). |
|
|
PATH |
required |
Output directory. |
|
FLOAT |
0.05 |
P-value cutoff. |
|
INTEGER |
2 |
Number of threads. |
gcen2 enrich¶
Standalone enrichment analysis for an arbitrary gene list.
Option |
Type |
Default |
Description |
|---|---|---|---|
|
PATH |
required |
Query gene list. |
|
PATH |
required |
Background gene list. |
|
PATH |
required |
GO OBO file. |
|
PATH |
required |
Gene-term association file. |
|
PATH |
required |
Output TSV file. |
|
FLOAT |
0.05 |
P-value cutoff. |
gcen2 rwr¶
Gene function prediction using Random Walk with Restart.
Option |
Type |
Default |
Description |
|---|---|---|---|
|
PATH |
required |
Input network TSV file. |
|
PATH |
required |
Seed genes list (one per line; GCEN v1 seed files accepted). |
|
PATH |
required |
Output TSV file. |
|
FLOAT |
0.5 |
Restart probability. |
|
FLOAT |
0.01 |
Minimum probability. |
gcen2 merge¶
Merge two or more co-expression networks.
Option |
Type |
Default |
Description |
|---|---|---|---|
|
PATH |
required, repeatable |
Input network files (repeat for each network). |
|
PATH |
required |
Output merged network TSV file. |
|
FLOAT |
0.5 |
Minimum absolute aggregated correlation. |
gcen2 extract¶
Extract a subnetwork for a list of genes.
Option |
Type |
Default |
Description |
|---|---|---|---|
|
PATH |
required |
Input network TSV file. |
|
PATH |
required |
Gene list file (one gene per line). |
|
PATH |
required |
Output subnetwork TSV file. |
gcen2 shuffle¶
Degree-preserving edge shuffle (null model generation).
Option |
Type |
Default |
Description |
|---|---|---|---|
|
PATH |
required |
Input network TSV file. |
|
PATH |
required |
Output shuffled network TSV file. |
|
INTEGER |
100 |
Number of swaps = swap_factor × edge_count. |
|
INTEGER |
42 |
Random seed. |
gcen2 stats¶
Print network statistics.
Option |
Type |
Default |
Description |
|---|---|---|---|
|
PATH |
required |
Input network TSV file. |
|
INTEGER |
2 |
Number of threads. |
gcen2 diff¶
Differential co-expression analysis between two conditions (Fisher’s z test).
Option |
Type |
Default |
Description |
|---|---|---|---|
|
PATH |
required |
Network from condition A. |
|
PATH |
required |
Network from condition B. |
|
PATH |
required |
Output differential results TSV file. |
|
FLOAT |
0.05 |
P-value cutoff. |
|
INTEGER |
30 |
Number of samples in condition A. |
|
INTEGER |
30 |
Number of samples in condition B. |
|
TEXT |
pearson |
Correlation of the networks: pearson, or spearman (variance 1.06 / (n - 3)). |
|
Call changed edges by FDR (Benjamini-Hochberg) <= -p. |
||
|
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 |
|---|---|---|---|
|
PATH |
required, repeatable |
Expression matrix of one set (genes x samples TSV); repeat for each set (same genes). |
|
PATH |
required |
Output directory. |
|
TEXT |
repeatable |
Name of each set, in the order of -e (default: file names). |
|
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 networks (wgcna preset). |
||
|
TEXT |
auto |
Soft-threshold power: ‘auto’ (each set’s own), one number, or one per set (comma-separated). |
|
FLOAT |
Quantile of the sets’ TOMs (0 = minimum) [default: 0; hdwgcna 0.3]. |
|
|
INTEGER |
Minimum module size. |
|
|
INTEGER |
Dynamic tree cut deepSplit, 0-4. |
|
|
FLOAT |
Merge modules whose consensus eigengene dissimilarity is below this. |
|
|
TEXT |
log(x+1) transform first: log, log2 or log10. |
|
|
INTEGER |
10 |
Hub genes per module. |
|
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 |
|---|---|---|---|
|
PATH |
required |
Reference expression the modules were built from (genes x samples TSV, e.g. metacells.tsv of celltype-modules –write-metacells). |
|
PATH |
required |
Reference modules: GCEN2 modules.tsv or a table with gene and module columns; genes not in it are unassigned. |
|
PATH |
required |
Test expression: genes x samples TSV, or an .h5ad with counts (metacells are then built from it, as hdWGCNA’s query). |
|
PATH |
required |
Output directory. |
|
INTEGER |
500 |
Permutations (hdWGCNA default 500). |
|
INTEGER |
12345 |
Random seed (R’s set.seed; hdWGCNA 12345). |
|
TEXT |
unsigned |
unsigned (WGCNA’s and hdWGCNA’s), signed or ‘signed hybrid’. |
|
TEXT |
.h5ad query: obs column to select cells. |
|
|
TEXT |
repeatable |
.h5ad query: only this –groupby value; repeatable. |
|
INTEGER |
25 |
.h5ad query: cells per metacell. |
|
INTEGER |
.h5ad query: max cells shared by metacells. |
|
|
INTEGER |
1000 |
.h5ad query. |
|
TEXT |
.h5ad query: obsm key for the neighbours. |
|
|
INTEGER |
30 |
.h5ad query: components for neighbours. |
|
INTEGER |
42 |
.h5ad query. |
|
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 |
|---|---|---|---|
|
PATH |
required |
Query AnnData (.h5ad), counts. |
|
PATH |
required |
Reference modules: GCEN2 modules.tsv (module, gene) or a table with gene and module columns (hdWGCNA). |
|
PATH |
required |
Output directory. |
|
TEXT |
adata.obs column to select query cells. |
|
|
TEXT |
repeatable |
Only cells with this –groupby value; repeatable. |
|
FLOAT |
0.5 |
Project modules with at least this fraction of their genes in the query (hdWGCNA overlap_proportion). |
|
TEXT |
adata.obs column: also harmonized eigengenes (Harmony). |
|
|
TEXT |
adata.layers entry instead of X. |
|
|
INTEGER |
50 |
With –harmonize-by: components per module. |
|
INTEGER |
0 |
Random seed (Harmony). |
gcen2 celltype¶
Cell-type-specific co-expression networks from single-cell data.
Option |
Type |
Default |
Description |
|---|---|---|---|
|
PATH |
required |
AnnData (.h5ad) file. |
|
TEXT |
required |
adata.obs column with the cell types. |
|
PATH |
required |
Output directory. |
|
TEXT |
repeatable |
Only this cell type; repeatable (default: all). |
|
TEXT |
metacell |
Samples per cell type: metacell, or pseudo_replicates (deprecated: random groups rank gene pairs at chance level). |
|
INTEGER |
25 |
Cells per metacell. |
|
INTEGER |
Max cells shared by two metacells (default min(10, k-1)). |
|
|
INTEGER |
1000 |
Max metacells per cell type. |
|
INTEGER |
100 |
Skip cell types with fewer cells. |
|
TEXT |
adata.obsm key for the neighbours (default X_pca, else PCA). |
|
|
INTEGER |
30 |
Components used for the neighbours. |
|
INTEGER |
10 |
pseudo_replicates: random groups per cell type. |
|
TEXT |
adata.layers entry instead of X. |
|
|
Log-normalise metacells (default: when the data are integer counts). |
||
|
Only genes flagged in adata.var[‘highly_variable’]. |
||
|
TEXT |
spearman |
pearson, spearman, pearson_nonzero or pearson_pairwise_complete. |
|
FLOAT |
0.5 |
Minimum correlation cutoff. |
|
FLOAT |
0.001 |
P-value cutoff. |
|
on |
Benjamini-Hochberg FDR over all gene pairs, -p applying to it (default on; off before 2026-11-18). |
|
|
Keep positive correlations only. |
||
|
TEXT |
log(x+1) transform first: log, log2 or log10. |
|
|
Also compare every pair of cell-type networks (Fisher’s z on the networks’ effective sample sizes). |
||
|
FLOAT |
0.05 |
P-value cutoff of the differential test. |
|
INTEGER |
42 |
Random seed. |
|
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). |
|
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 |
|---|---|---|---|
|
PATH |
required |
AnnData (.h5ad) file. |
|
TEXT |
required |
adata.obs column with the cell types. |
|
PATH |
required |
Output directory. |
|
TEXT |
repeatable |
Only this cell type; repeatable (default: all). |
|
FLOAT |
0.05 |
Genes with a value > 0 in at least this fraction of the type’s cells (hdWGCNA gene_select = ‘fraction’). |
|
Only genes flagged in adata.var[‘highly_variable’]. |
||
|
INTEGER |
25 |
Cells per metacell. |
|
INTEGER |
Max cells shared by two metacells (default min(10, k-1)). |
|
|
INTEGER |
1000 |
Max metacells per cell type. |
|
INTEGER |
100 |
Skip cell types with fewer cells. |
|
TEXT |
adata.obsm key for the neighbours (default X_pca, else PCA). |
|
|
INTEGER |
30 |
Components used for the neighbours. |
|
TEXT |
adata.layers entry instead of X. |
|
|
Log-normalise metacells (default: when the data are integer counts). |
||
|
TEXT |
hdwgcna |
hdwgcna (hdWGCNA ConstructNetwork defaults, bicor power) or wgcna (blockwiseModules defaults). |
|
TEXT |
auto |
Soft-threshold power, or ‘auto’ (the preset’s rule). |
|
INTEGER |
Minimum module size (preset default). |
|
|
INTEGER |
Dynamic tree cut deepSplit, 0-4. |
|
|
FLOAT |
Merge modules whose eigengenes have 1 - r below this. |
|
|
INTEGER |
10 |
Hub genes per module. |
|
Also write each type’s metacells.tsv (genes x metacells; gcen2 module -e input). |
||
|
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). |
||
|
INTEGER |
42 |
Random seed (metacell centres). |
|
on |
Eigengenes and kME of every cell (hdWGCNA ModuleEigengenes / ModuleConnectivity): cell_eigengenes.tsv, cell_kme.tsv. |
|
|
on |
Move genes with a negative cell kME for their module (hdWGCNA ModuleConnectivity); needs the cell eigengenes. |
|
|
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). |
||
|
TEXT |
adata.obs column (sample, study, …): a consensus network over its values (hdWGCNA ConstructNetwork(consensus = TRUE)); metacells within each value. |
|
|
FLOAT |
With –consensus-by: quantile of the sets’ TOMs (0 = minimum; preset default: hdwgcna 0.3, wgcna 0). |
|
|
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. |
|
|
INTEGER |
50 |
With –harmonize-by: principal components per module. |
|
TEXT |
adata.obs column: differential module eigengenes of each value against the type’s other cells (hdWGCNA FindAllDMEs): dmes.tsv. |
|
|
TEXT |
repeatable |
adata.obs column to correlate with the cell eigengenes (hdWGCNA ModuleTraitCorrelation); repeatable: trait_cor.tsv. |
|
TEXT |
With –trait: also per value of this adata.obs column. |
|
|
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 |
|---|---|---|---|
|
PATH |
required |
Spatial AnnData (.h5ad) with counts: Visium (obs array_row / array_col) or any platform with obsm[‘spatial’]. |
|
PATH |
required |
Output directory. |
|
TEXT |
adata.obs column (regions / clusters); metaspots are built within each group (default: all spots together). |
|
|
FLOAT |
0.05 |
Genes with counts in at least round(fraction * spots) spots (hdWGCNA gene_select = ‘fraction’). |
|
Only genes flagged in adata.var[‘highly_variable’]. |
||
|
PATH |
Use these genes (one per line) instead of –fraction / –hvg. |
|
|
INTEGER |
50 |
Skip groups with fewer spots. |
|
TEXT |
sum |
Metaspot aggregation: sum or average. |
|
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). |
|
TEXT |
array_row |
obs column: Visium grid row. |
|
TEXT |
array_col |
obs column: Visium grid column. |
|
TEXT |
spatial |
obsm entry with the coordinates (knn metaspots, –plot). |
|
INTEGER |
7 |
knn metaspots: spots per metaspot (the centre included); 7 matches a Visium hexagon, about 100 for 10 um Slide-seq beads. |
|
INTEGER |
knn metaspots: at most this many spots shared by two metaspots (default round(2k/7), 2 for k = 7). |
|
|
INTEGER |
42 |
knn metaspots: seed for the centre order. |
|
TEXT |
adata.layers entry instead of X. |
|
|
TEXT |
hdwgcna |
hdwgcna (hdWGCNA ConstructNetwork defaults, bicor power) or wgcna (blockwiseModules defaults). |
|
TEXT |
auto |
Soft-threshold power, or ‘auto’ (the preset’s rule). |
|
INTEGER |
Minimum module size (preset default). |
|
|
INTEGER |
Dynamic tree cut deepSplit, 0-4. |
|
|
FLOAT |
Merge modules whose eigengenes have 1 - r below this. |
|
|
INTEGER |
10 |
Hub genes per module. |
|
on |
Eigengenes of every spot (hdWGCNA ModuleEigengenes), spot kME and group correlations. |
|
|
on |
Move genes with a negative spot kME for their module (hdWGCNA ModuleConnectivity); needs the spot eigengenes. |
|
|
Also draw spatial_eigengenes.png (needs obsm[–spatial-key]). |
||
|
Also write metaspots.tsv (genes x metaspots; gcen2 module -e input). |
||
|
Also write tom_hubs.tsv (for the hub-network and module-UMAP figures). |
||
|
INTEGER |
2 |
Number of threads. |
gcen2 spatial-build¶
Spatial transcriptomics co-expression network analysis.
Option |
Type |
Default |
Description |
|---|---|---|---|
|
PATH |
required |
Input AnnData file (.h5ad) with obsm[‘spatial’]. |
|
PATH |
required |
Output .network file (filtered/weighted) or directory (regions). |
|
TEXT |
filtered |
Analysis mode: filtered | weighted | regions. |
|
INTEGER |
6 |
KNN neighbours. Use –radius to switch to radius mode. |
|
FLOAT |
Radius cutoff (overrides –n-neighbors). |
|
|
FLOAT |
Gaussian bandwidth for weighted mode (auto if omitted). |
|
|
TEXT |
obs column for region labels (regions mode). |
|
|
INTEGER |
5 |
Number of auto clusters when –region-key is omitted. |
|
FLOAT |
0.6 |
Minimum absolute correlation. |
|
FLOAT |
0.05 |
Maximum p-value. |
|
TEXT |
spearman |
Correlation: spearman | pearson. |
|
TEXT |
adata.layers entry instead of X. |
|
|
FLOAT |
0.05 |
Genes with a value > 0 in at least round(fraction * spots) spots (0: all genes). |
|
Log-normalize (counts per 10,000; default: when the data are integer counts). |
||
|
INTEGER |
2 |
Number of threads. |
|
TEXT |
auto |
Correlation kernel: auto, pairwise or gemm (see build). |
|
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). |
|
|
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 |
|---|---|---|---|
|
PATH |
required |
AnnData (.h5ad) or expression TSV (genes x samples). |
|
TEXT |
required |
adata.obs column (.h5ad input), or a TSV file of sample / pseudotime pairs. |
|
PATH |
required |
Output directory. |
|
FLOAT |
0.2 |
Cells per window (>= 3), or a fraction (< 1). |
|
FLOAT |
Shift between windows, count or fraction (default: half a window). |
|
|
INTEGER |
1 |
Average this many consecutive cells into a metacell. |
|
TEXT |
AnnData layer instead of X. |
|
|
TEXT |
spearman |
Correlation method: pearson or spearman. |
|
FLOAT |
0.5 |
Minimum correlation cutoff. |
|
FLOAT |
0.001 |
P-value cutoff. |
|
Apply FDR correction. |
||
|
Keep positive correlations only. |
||
|
TEXT |
log(x+1) transform first: log, log2 or log10. |
|
|
INTEGER |
2 |
Number of threads. |
|
Also write trajectory.png. |
gcen2 fuse¶
Weighted fusion of heterogeneous networks (multi-omics integration).
Option |
Type |
Default |
Description |
|---|---|---|---|
|
PATH |
required, repeatable |
Layer edge-list files (co-expression, PPI, regulatory, …); repeat for each layer. |
|
PATH |
required |
Output fused network TSV. |
|
TEXT |
repeatable |
Layer names, one per -i (default: file names). |
|
FLOAT |
repeatable |
Layer weights, one per -i (default 1). |
|
TEXT |
max |
Per-layer weight scaling: max, rank or none. |
|
INTEGER |
1 |
Keep edges found in at least this many layers. |
|
FLOAT |
0 |
Minimum fused score. |
|
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 |
|---|---|---|---|
|
PATH |
required, repeatable |
Layer edge-list files; repeat for each layer. |
|
PATH |
required |
Seed genes list. |
|
PATH |
required |
Output TSV file. |
|
TEXT |
repeatable |
Layer names, one per -n. |
|
FLOAT |
0.5 |
Restart probability. |
|
FLOAT |
0.5 |
Weight of the jumps between layers (their probability with –transition layer). |
|
Use layer edge weights for transitions. |
||
|
TEXT |
geometric |
Per-gene score: geometric, arithmetic or sum. |
|
FLOAT |
0 |
Minimum score. |
|
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 |
|---|---|---|---|
|
PATH |
Input network TSV. |
|
|
PATH |
Module TSV file. |
|
|
PATH |
report.html |
Output report file. |
|
PATH |
Eigengenes of -m (gcen2 module -e –me): WGCNA module section. |
|
|
PATH |
kME file of -m (module -e –kme). |
|
|
PATH |
Hub genes of -m (module -e –hubs). |
|
|
PATH |
Eigengene-trait correlations of -m (module -e –trait-cor). |
|
|
PATH |
Output directory of gcen2 celltype-modules: one module section per cell type. |
|
|
INTEGER |
10 |
Hub genes shown per module. |
|
PATH |
Soft-power fits of -m (module -e –soft-power). |
|
|
PATH |
Gene tree of -m (module -e –dendrogram). |
|
|
PATH |
Hub TOM of -m (module -e –tom-hubs; hub-network figure). |
|
|
PATH |
Also save every report figure there as PDF, PNG and SVG (for a manuscript). |
|
|
PATH |
With –celltype-modules: cells’ embedding (.h5ad with obsm[–basis], or TSV of x, y by cell) for the metacell figure. |
|
|
TEXT |
X_umap |
obsm key of –coords. |
|
PATH |
Moran’s I table of spatial-build –moran. |
|
|
PATH |
repeatable |
Input network of gcen2 merge; repeat for each. |
|
PATH |
With –merge-input: the gcen2 merge output. |
|
|
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 |
|---|---|---|---|
|
PATH |
required |
Output directory of gcen2 celltype. |
gcen2 plot celltype-overview¶
Cells, metacells, genes and modules of every cell type.
Option |
Type |
Default |
Description |
|---|---|---|---|
|
PATH |
required |
celltypes.tsv of celltype-modules. |
gcen2 plot degree-distribution¶
Degree histogram and scale-free plot of a network.
Option |
Type |
Default |
Description |
|---|---|---|---|
|
PATH |
required |
Network edge-list file. |
gcen2 plot dendrogram¶
Gene dendrogram with module colours (PlotDendrogram, plotDendroAndColors).
Option |
Type |
Default |
Description |
|---|---|---|---|
|
PATH |
required |
dendrogram.json. |
|
on |
Also the modules before merging. |
gcen2 plot diff-network¶
Network of the most changed edges.
Option |
Type |
Default |
Description |
|---|---|---|---|
|
PATH |
required |
gcen2 diff output. |
|
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 |
|---|---|---|---|
|
PATH |
required |
gcen2 diff output. |
gcen2 plot dme-lollipop¶
Differential module eigengenes: lollipop chart (PlotDMEsLollipop).
Option |
Type |
Default |
Description |
|---|---|---|---|
|
PATH |
required |
dmes.tsv. |
|
PATH |
modules.tsv (dot size). |
|
|
FLOAT |
0.05 |
Significance threshold (adjusted p). |
gcen2 plot dme-volcano¶
Differential module eigengenes: volcano plot (PlotDMEsVolcano).
Option |
Type |
Default |
Description |
|---|---|---|---|
|
PATH |
required |
dmes.tsv. |
|
FLOAT |
0.05 |
Significance threshold (adjusted p). |
gcen2 plot edge-weights¶
Distribution of the edge weights.
Option |
Type |
Default |
Description |
|---|---|---|---|
|
PATH |
required |
Network edge-list file. |
|
TEXT |
correlation |
Weight column. |
gcen2 plot eigengene-network¶
Eigengene dendrogram and correlation heatmap (plotEigengeneNetworks, ModuleCorrelogram).
Option |
Type |
Default |
Description |
|---|---|---|---|
|
PATH |
required |
eigengenes.tsv / cell_eigengenes.tsv. |
|
PATH |
Samples x numeric traits TSV. |
gcen2 plot enrich-bar¶
Top enriched terms of one result (bars).
Option |
Type |
Default |
Description |
|---|---|---|---|
|
PATH |
required |
gcen2 enrich output / one annotate file. |
|
INTEGER |
15 |
Terms shown. |
gcen2 plot enrich-dot¶
Top terms of every module (dot plot; EnrichrDotPlot).
Option |
Type |
Default |
Description |
|---|---|---|---|
|
PATH |
required |
gcen2 annotate output directory. |
|
INTEGER |
3 |
Terms per module. |
gcen2 plot enrich-heatmap¶
Modules x top terms heatmap of -log10 p.
Option |
Type |
Default |
Description |
|---|---|---|---|
|
PATH |
required |
gcen2 annotate output directory. |
|
INTEGER |
3 |
Terms per module. |
gcen2 plot expression-qc¶
Per-sample expression distributions, before and after normalization.
Option |
Type |
Default |
Description |
|---|---|---|---|
|
PATH |
required |
Expression TSV (genes x samples). |
|
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 |
|---|---|---|---|
|
PATH |
required |
Network, or the gcen2 extract output. |
|
PATH |
required |
Gene list given to gcen2 extract. |
|
INTEGER |
20 |
Genes shown. |
gcen2 plot fusion¶
A fused multi-layer network (gcen2 fuse).
Option |
Type |
Default |
Description |
|---|---|---|---|
|
PATH |
required |
gcen2 fuse output. |
gcen2 plot hub-network¶
Hub-gene network of a module (ModuleNetworkPlot).
Option |
Type |
Default |
Description |
|---|---|---|---|
|
PATH |
required |
tom_hubs.tsv (–write-tom / –tom-hubs). |
|
PATH |
required |
kme.tsv. |
|
TEXT |
One module (e.g. 0 or ME0); default: all modules, one file each (<output>_ME<k>). |
|
|
INTEGER |
10 |
Genes on the inner circle. |
|
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 |
|---|---|---|---|
|
PATH |
required |
tom_hubs.tsv. |
|
PATH |
required |
kme.tsv. |
|
INTEGER |
6 |
Hub genes per module. |
|
INTEGER |
3 |
Other genes per module. |
|
FLOAT |
0.5 |
Fraction of the strongest edges drawn. |
|
INTEGER |
0 |
Layout seed. |
gcen2 plot kme¶
Sorted kME of each module’s genes (PlotKMEs).
Option |
Type |
Default |
Description |
|---|---|---|---|
|
PATH |
required |
kme.tsv or cell_kme.tsv. |
|
INTEGER |
5 |
Hub genes named per module. |
gcen2 plot me-dotplot¶
Eigengenes by group: dot plot (DotPlot of MEs).
Option |
Type |
Default |
Description |
|---|---|---|---|
|
PATH |
required |
cell_eigengenes.tsv (or harmonized). |
|
PATH |
required |
.h5ad or TSV (first column cells). |
|
TEXT |
required |
Column with the groups. |
|
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 |
|---|---|---|---|
|
PATH |
required |
cell_eigengenes.tsv, cell_harmonized_eigengenes.tsv, spot_eigengenes.tsv or projected_eigengenes.tsv. |
|
PATH |
required |
.h5ad (obsm[–basis]) or TSV of x, y by cell. |
|
TEXT |
X_umap |
obsm key of an .h5ad (X_umap, spatial, …). |
|
Spatial map: equal axes, image y axis. |
||
|
TEXT |
repeatable |
Only this module; repeatable. |
|
INTEGER |
4 |
Panels per row. |
gcen2 plot me-radar¶
Eigengenes by group: radar chart (ModuleRadarPlot).
Option |
Type |
Default |
Description |
|---|---|---|---|
|
PATH |
required |
cell_eigengenes.tsv (or harmonized). |
|
PATH |
required |
.h5ad or TSV (first column cells). |
|
TEXT |
required |
Column with the groups. |
|
TEXT |
repeatable |
Only this module; repeatable. |
gcen2 plot me-violin¶
Eigengenes by group: violins.
Option |
Type |
Default |
Description |
|---|---|---|---|
|
PATH |
required |
cell_eigengenes.tsv (or harmonized). |
|
PATH |
required |
.h5ad or TSV (first column cells). |
|
TEXT |
required |
Column with the groups. |
|
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 |
|---|---|---|---|
|
PATH |
required |
Expression TSV. |
|
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 |
|---|---|---|---|
|
PATH |
required, repeatable |
Input network of gcen2 merge; repeat for each. |
|
PATH |
gcen2 merge output (edges kept per region). |
|
|
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 |
|---|---|---|---|
|
PATH |
required |
metacell_members.tsv, or a celltype-modules output directory. |
|
PATH |
required |
AnnData (.h5ad) or TSV of x, y by cell. |
|
TEXT |
X_umap |
obsm key of the embedding. |
gcen2 plot mm-gs¶
Module membership vs gene significance (verboseScatterplot).
Option |
Type |
Default |
Description |
|---|---|---|---|
|
PATH |
required |
kme.tsv. |
|
PATH |
required |
Gene significance (module -e –gs). |
|
TEXT |
required |
Module (e.g. 0 or ME0). |
|
TEXT |
required |
Trait name. |
gcen2 plot module-size-hist¶
Histogram of module sizes (many modules, e.g. gcen2 module -i).
Option |
Type |
Default |
Description |
|---|---|---|---|
|
PATH |
required |
Module file (module, gene). |
gcen2 plot module-sizes¶
Genes per module (bar chart in the module colours).
Option |
Type |
Default |
Description |
|---|---|---|---|
|
PATH |
required |
modules.tsv (module, gene). |
|
Also the unassigned genes. |
gcen2 plot module-trait¶
Module-trait correlation heatmap (labeledHeatmap, PlotModuleTraitCorrelation).
Option |
Type |
Default |
Description |
|---|---|---|---|
|
PATH |
required |
Trait correlations: module -e –trait-cor or trait_cor.tsv. |
|
TEXT |
p |
p (r and p), stars or none. |
|
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 |
|---|---|---|---|
|
PATH |
required |
tom_hubs.tsv. |
|
PATH |
required |
kme.tsv. |
|
INTEGER |
10 |
Hub genes per module used as UMAP features. |
|
INTEGER |
3 |
Hub genes named per module. |
|
INTEGER |
0 |
UMAP seed. |
gcen2 plot moran¶
Moran’s I of the genes (spatial-build –moran): distribution, top genes, smoothing.
Option |
Type |
Default |
Description |
|---|---|---|---|
|
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 |
|---|---|---|---|
|
PATH |
required |
Network edge-list file. |
|
PATH |
modules.tsv / module.txt. |
|
|
INTEGER |
150 |
Genes drawn. |
|
INTEGER |
12 |
Genes named. |
gcen2 plot null-distribution¶
A network statistic against degree-preserving shuffles (gcen2 shuffle).
Option |
Type |
Default |
Description |
|---|---|---|---|
|
PATH |
required |
Network edge-list file. |
|
PATH |
repeatable |
Shuffled network; repeatable. |
|
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 |
|---|---|---|---|
|
PATH |
required |
preservation_Z.tsv. |
|
PATH |
preservation.tsv (adds the median rank panel). |
|
|
Sorted Zsummary lollipop chart instead. |
gcen2 plot rwr-network¶
The seeds and the top candidates in the network.
Option |
Type |
Default |
Description |
|---|---|---|---|
|
PATH |
required |
Network edge-list file. |
|
PATH |
required |
gcen2 rwr output. |
|
PATH |
required |
Seed gene list. |
|
INTEGER |
20 |
Candidates shown. |
gcen2 plot rwr-rank¶
Top genes by random-walk score (seeds marked).
Option |
Type |
Default |
Description |
|---|---|---|---|
|
PATH |
required |
gcen2 rwr / rwr-multiplex output. |
|
PATH |
Seed gene list. |
|
|
INTEGER |
30 |
Genes shown. |
gcen2 plot sample-correlation¶
Sample-sample correlation heatmap (clustered).
Option |
Type |
Default |
Description |
|---|---|---|---|
|
PATH |
required |
Expression TSV. |
gcen2 plot sample-tree¶
Sample clustering tree with trait colours (outlier check).
Option |
Type |
Default |
Description |
|---|---|---|---|
|
PATH |
required |
Genes x samples expression TSV. |
|
PATH |
Samples x traits TSV (colour bars). |
|
|
FLOAT |
Draw this cut height. |
gcen2 plot set-eigengenes¶
Consensus modules: eigengenes in every set.
Option |
Type |
Default |
Description |
|---|---|---|---|
|
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 |
|---|---|---|---|
|
PATH |
required |
soft_power.tsv. |
|
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 |
|---|---|---|---|
|
PATH |
required |
Genes x samples (metacells.tsv, module -e input). |
|
PATH |
required |
modules.tsv. |
|
FLOAT |
required |
Soft power of the network. |
|
on |
Signed network (hdWGCNA). |
|
|
INTEGER |
400 |
Random genes shown. |
|
INTEGER |
0 |
Seed of the gene sample. |
gcen2 plot trajectory¶
Networks along pseudotime (windows, edge patterns, dynamic genes).
Option |
Type |
Default |
Description |
|---|---|---|---|
|
PATH |
required |
gcen2 trajectory output directory. |