ppanggolin.metrics package
Submodules
ppanggolin.metrics.fluidity module
- ppanggolin.metrics.fluidity.compute_genomes_fluidity(pangenome: Pangenome, disable_bar: bool = False) dict
Compute the genomes’ fluidity from the pangenome
- Parameters:
pangenome – pangenome which will be used to compute the genomes’ fluidity
disable_bar – Disable the progress bar
- Returns:
Genomes fluidity value from the pangenome for each partition
- ppanggolin.metrics.fluidity.fam_fluidity(pangenome: Pangenome, disable_bar: bool = False) dict
Compute the family fluidity from the pangenome
- Parameters:
pangenome – pangenome which will be used to compute the genomes’ fluidity
disable_bar – Disable the progress bar
- Returns:
family fluidity value from the pangenome for each partition
- ppanggolin.metrics.fluidity.nb_fam_per_org(pangenome: Pangenome, disable_bar: bool = False) dict
Create a dictionary with for each organism the number of gene families
- Parameters:
pangenome – Pangenome which contain the organisms and gene families
disable_bar – Disable the progress bar
- Returns:
Dictionary with organisms as key and number of families as value
- ppanggolin.metrics.fluidity.nb_org_per_fam(pangenome: Pangenome, disable_bar: bool = False) dict
Create a dictionary with for each gene families the number of organism
- Parameters:
pangenome – Pangenome which contain the organisms and gene families
disable_bar – Disable the progress bar
- Returns:
Dictionary with organisms as key and number of families as value
ppanggolin.metrics.metrics module
- ppanggolin.metrics.metrics.check_already_computed_metric(pangenome: Pangenome, genomes_fluidity: bool = False, print_metric: bool = True, recompute: bool = False)
Check if one of the asked metrics is not already computed
- Parameters:
pangenome – pangenome object
genomes_fluidity – Ask to compute genome fluidity
print_metric – Print metrics if already computed
recompute – Are metrics going to be recompute
- ppanggolin.metrics.metrics.compute_metrics(pangenome: Pangenome, genomes_fluidity: bool = False, families_fluidity: bool = False, disable_bar: bool = False) dict
Compute the metrics
- Parameters:
pangenome – pangenome which will be used to compute the genomes’ fluidity
genomes_fluidity – Ask to compute genome fluidity
families_fluidity – Ask to compute family fluidity
disable_bar – Disable the progress bar
- Returns:
dictionary with all the metrics computed
- ppanggolin.metrics.metrics.launch(args: Namespace)
Command launcher
- Parameters:
args – All arguments provide by user
- ppanggolin.metrics.metrics.parser_metrics(parser: ArgumentParser)
Argument parser for the ‘metrics’ command.
- Parameters:
parser – Argument parser for the ‘metrics’ command.
- ppanggolin.metrics.metrics.print_computed_metric(metrics_dict: dict)
Print metrics in yaml format
- Params metrics_dict:
Dict of computed metrics
- ppanggolin.metrics.metrics.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
- ppanggolin.metrics.metrics.write_metrics(pangenome: Pangenome, metrics_dict: dict, print_metrics: bool = False)
Write the metrics computed in the pangenome
- Parameters:
pangenome – pangenome which will be used to compute the genomes’ fluidity
metrics_dict – dictionary with all the metrics computed
print_metrics – enable print of metrics