The pygenstability cli#

Command line interface.

cli#

App initialisation.

cli [OPTIONS] COMMAND [ARGS]...

plot_communities#

Plot communities on networkx graph.

cli plot_communities [OPTIONS] GRAPH_FILE RESULTS_FILE

Arguments

GRAPH_FILE#

Required argument

RESULTS_FILE#

Required argument

plot_scan#

Plot results in scan plot.

cli plot_scan [OPTIONS] RESULTS_FILE

Arguments

RESULTS_FILE#

Required argument

run#

Run pygenstability.

graph_file: path to either a .pkl with adjacency matrix in sparse format, or a text file with three columns encoding node indices and edge weight. The columns need a header, or the first line will be dropped. Notice that doubled edges with opposite orientations are needed for symetric graph.

See https://barahona-research-group.github.io/PyGenStability/ for more information.

cli run [OPTIONS] GRAPH_FILE

Options

--constructor <constructor>#

Name of the quality constructor.

Default:

linearized

--min-scale <min_scale>#

Minimum scale.

Default:

-2.0

--max-scale <max_scale>#

Maximum scale.

Default:

0.5

--n-scale <n_scale>#

Number of scale steps.

Default:

20

--log-scale <log_scale>#

Use linear or log scales.

Default:

True

--n-tries <n_tries>#

Number of Louvain evaluations.

Default:

100

--NVI, --no-NVI#

Compute the normalized variation of information between runs.

Default:

True

--n-NVI <n_nvi>#

Number of randomly chosen runs to estimate the NVI.

Default:

20

--postprocessing, --no-postprocessing#

Apply the final postprocessing step.

Default:

True

--ttprime, --no-ttprime#

Compute the ttprime matrix.

Default:

True

--spectral-gap, --no-spectral-gap#

Normalize scale by spectral gap.

Default:

True

--result-file <result_file>#

Path to the result file.

Default:

results.pkl

--n-workers <n_workers>#

Number of workers for multiprocessing.

Default:

4

--tqdm-disable <tqdm_disable>#

disable progress bars

Default:

False

--method <method>#

Method to solve modularity, either Louvain or Leiden

Default:

louvain

--with-optimal-scales, --no-with-optimal-scales#

Search for optimal scales

Default:

True

--exp-comp-mode <exp_comp_mode>#

Method to compute matrix exponential, can be ‘spectral’ or ‘expm’

Default:

spectral

Arguments

GRAPH_FILE#

Required argument