ppanggolin.mod package
Submodules
ppanggolin.mod.module module
- ppanggolin.mod.module.check_pangenome_former_modules(pangenome: Pangenome, force: bool = False)
Checks pangenome status and .h5 files for former modules, delete them if allowed or raise an error
- Parameters:
pangenome – Pangenome object
force – Allow to force write on pangenome by erasing already present modules
- ppanggolin.mod.module.compute_mod_graph(pangenome: Pangenome, t: int = 1, disable_bar: bool = False)
Computes a graph using all provided genomes with a transitive closure of size t
- Parameters:
pangenome – pangenome with organisms to compute the graph
t – the size of the transitive closure
disable_bar – whether to show a progress bar or not
- ppanggolin.mod.module.compute_modules(g: Graph, multi: set, weight: float = 0.85, min_fam: int = 2, size: int = 3)
Computes modules using a graph built by
ppanggolin.mod.module.compute_mod_graph()and different parameters defining how restrictive the modules will be.- Parameters:
g – The networkx graph from
ppanggolin.mod.module.compute_mod_graph()multi – a set of families
ppanggolin.geneFamily.GeneFamilyconsidered multigenicweight – the minimal jaccard under which edges are not considered
min_fam – the minimal number of presence under which the family is not considered
size – Minimal number of gene family in a module
- ppanggolin.mod.module.launch(args: Namespace)
Command launcher
- Parameters:
args – All arguments provide by user
- ppanggolin.mod.module.parser_module(parser: ArgumentParser)
Parser for specific argument of module command
- Parameters:
parser – parser for align argument
- ppanggolin.mod.module.predict_modules(pangenome: Pangenome, dup_margin: float = 0.05, size: int = 3, min_presence: int = 2, transitive: int = 4, jaccard: float = 0.85, force: bool = False, disable_bar: bool = False)
Main function to predict module
- Parameters:
pangenome – Pangenome object with Gene Families, Annotation and Partition
dup_margin – minimum ratio of organisms in which family must have multiple genes to be considered duplicated
size – Minimal number of gene family in a module
min_presence – Minimum number of times the module needs to be present in the pangenome to be reported.
transitive – Size of the transitive closure used to build the graph.
jaccard – minimum jaccard similarity used to filter edges between gene families.
force – Allow to force write on Pangenome file
disable_bar – Disable progress bar
- ppanggolin.mod.module.subparser(sub_parser: _SubParsersAction) ArgumentParser
Subparser to launch PPanGGOLiN in Command line
:param sub_parser : sub_parser for align command
:return : parser arguments for align command