pyani.scripts.subcommands.subcmd_classify module

Provides the classify subcommand for pyani.

class pyani.scripts.subcommands.subcmd_classify.SubgraphData[source]

Bases: tuple

Subgraph clique/classification output.

cliqueinfo

Alias for field number 2

graph

Alias for field number 1

interval

Alias for field number 0

pyani.scripts.subcommands.subcmd_classify.subcmd_classify(args: argparse.Namespace) → int[source]

Generate classifications for an analysis.

Parameters:args – Namespace, command-line arguments
pyani.scripts.subcommands.subcmd_classify.trimmed_graph_sequence(ingraph: networkx.classes.graph.Graph, args: argparse.Namespace, attribute: str = 'identity') → Generator[T_co, T_contra, V_co][source]

Return graphs trimmed from lowest to highest attribute value.

Parameters:
  • ingraph – nx.Graph of genomes as nodes, having edges weighted by the property named in attribute
  • args – Namespace, parsed command-line arguments
  • attribute – str, name of the property by which the graph edges should be trimmed

A generator which, starting from the initial graph, yields in sequence a series of graphs from which the edge(s) with the lowest threshold value attribute were removed. The generator returns a tuple of:

(threshold, graph, analyse_cliques(graph))

This will be slow with moderate-large graphs