panorama package#
Subpackages#
- panorama.alignment package
- Submodules
- panorama.alignment.align module
_execute_alignment()_validate_alignment_parameters()_validate_directory_access()align_db()align_pangenomes()align_pangenomes_pair()all_against_all_align()check_align_parameters()check_pangenome_align()inter_pangenome_align()launch()launch_pangenomes_alignment()merge_aln_res()parser_align()parser_mmseqs2_align()subparser()write_alignment()- AlignmentConfig
- AlignmentError
- AlignmentValidationError
- panorama.alignment.cluster module
_execute_cluster()_execute_clustering_command()_execute_linclust()_prepare_mmseqs2_options()_validate_clustering_parameters()_validate_directory_access()check_cluster_parameters()check_pangenome_cluster()cluster_gene_families()cluster_launcher()create_tsv()launch()linclust_launcher()parser_cluster()parser_mmseqs2_cluster()subparser()write_clustering()- ClusteringMethod
- ClusteringConfig
- ClusteringError
- ClusteringValidationError
- panorama.alignment.utils module
- panorama.annotate package
- Submodules
- panorama.annotate.annotate module
annot_pangenomes()annot_pangenomes_with_hmm()check_annotate_args()check_pangenome_annotation()get_k_best_hit()keep_best_hit()launch()parser_annot()parser_annot_hmm()read_families_metadata()read_families_metadata_mp()remove_redundant_annotation()subparser()write_annotations_to_pangenome()write_annotations_to_pangenomes()
- panorama.annotate.hmm_search module
- panorama.compare package
- Submodules
- panorama.compare.context module
check_context_comparison()clean_context_objects()compare_gene_contexts_graph_mp()compare_gene_contexts_on_cluster_families()compare_pair_of_context_graphs()compare_pair_of_contexts()compute_CCC()context_comparison()create_metanodes()get_connected_components()get_conserved_genomics_contexts()get_contexts_from_result()get_gene_contexts_from_results_mp()get_multigraph_edges()get_shortest_path_edges_cc_strategy()launch()launch_compare_pair_of_context_graphs()launch_context_comparison()launch_ppanggolin_context()make_gene_context_from_context_graph()make_gene_context_from_context_table()parse_context_results()parser_comparison_context()pass_graph_attribute_to_multigraph()subparser()write_context_summary()
- panorama.compare.spots module
add_systems_info()check_compare_spots_args()check_pangenome_cs()compare_spots()compute_gfrr_edges()create_pangenome_spots_graph()create_pangenome_system_graph()create_spots_graph()create_systems_graph()graph_systems_link_with_conserved_spots()launch()parser_comparison_spots()subparser()write_conserved_spots()
- panorama.compare.systems module
add_system_metadata_to_graph()check_compare_systems_args()compare_systems()compute_gfrr_edges()create_pangenome_system_graph()create_pangenome_systems_heatmaps()create_systems_graph()generate_heatmap()get_pangenomes_to_systems_data()launch()parser_comparison_systems()subparser()write_conserved_systems()- SystemsComparisonError
- panorama.compare.utils module
- panorama.format package
- panorama.info package
- panorama.systems package
- Submodules
- panorama.systems.detection module
check_detection_args()check_for_forbidden_unit()check_for_needed_units()check_pangenome_detection()get_functional_unit_gene_families()get_subcombinations()get_system_unit_combinations()launch()parser_detection()search_for_system()search_system()search_system_units()search_systems()search_systems_in_pangenomes()search_unit_in_cc()search_unit_in_combination()search_unit_in_context()subparser()write_systems_to_pangenome()write_systems_to_pangenomes()
- panorama.systems.models module
_BasicFeatures_FuFamFeatures_ModFuFeatures_ModFuFeatures.mandatory_ModFuFeatures.min_mandatory_ModFuFeatures.accessory_ModFuFeatures.min_total_ModFuFeatures.forbidden_ModFuFeatures.neutral_ModFuFeatures.same_strand_ModFuFeatures.__init__()_ModFuFeatures._check()_ModFuFeatures._child_names()_ModFuFeatures._duplicate()_ModFuFeatures._mk_child_getter()_ModFuFeatures.add()_ModFuFeatures.child_type_ModFuFeatures.get()
check_dict()check_key()check_parameters()- Models
- Model
- FuncUnit
- Family
- panorama.systems.system module
- panorama.systems.systems_association module
- panorama.systems.systems_partitions module
- panorama.systems.systems_projection module
_custom_agg()compute_gene_components()compute_genes_graph()custom_agg()custom_agg_unique()eliminate_empty()eliminate_systems()extract_numeric_for_sorting()get_org_df()get_org_df_one_unit_per_fam()get_partition()has_short_path()project_pangenome_systems()project_unit_on_organisms()system_projection()unit_projection()write_projection_systems()
- panorama.systems.utils module
- panorama.systems.write_systems module
- panorama.utility package
- panorama.workflow package
Submodules#
panorama.geneFamily module#
This module provides classes to represent gene families and study them
Represents a single gene family. |
|
Represents a group of gene families that are similar across multiple pangenomes. |
panorama.main module#
The script serves as the entry point for the Panorama software, a bioinformatics tool for analyzing pangenomes. It provides a command-line interface for various functionalities such as annotation, system detection, alignment, comparison, formatting, and utility workflows.
The script constructs a comprehensive command-line utility with subcommands and their corresponding options, encompassing bioinformatic tools ranging from annotations to workflows. A help system is embedded to guide users through the available subcommands and their usage.
- panorama.main.cmd_line()#
Configures and executes the command-line interface for the Panorama software package.
- Returns:
argparse.Namespace – Parsed command-line arguments and options for execution.
- Raises:
SystemExit – If invalid arguments are provided, or the help message needs to be displayed.
- panorama.main.main()#
The main function is the entry point for the panorama command line tool. It parses arguments and calls subcommands as appropriate.
- Returns:
The exit status
panorama.pangenomes module#
This module provides classes to represent a pangenome or a set of pangenomes
This is a class representing pangenome based on PPanGGOLLiN class. |
|
A collection of pangenome objects. |
panorama.region module#
This module contains classes to represent regions, spots, conserved spots, and modules in a pangenome.
Represents a region in a pangenome. |
|
Represents a spot in a pangenome. |
|
Represents a set of conserved spots across multiple pangenomes. |
|
Represents a module in a pangenome. |
|
A class used to represent a gene context |
panorama.utils module#
This module contains functions for managing files and directories, and checking the sanity of a TSV file.
- panorama.utils.add_common_arguments(subparser)#
Add common argument to the input subparser.
- Parameters:
subparser (
ArgumentParser) – A subparser object from any subcommand.- Return type:
None
- panorama.utils.check_log(name)#
Check if the output log is writable
- Parameters:
name (
str) – Path to the log output- Return type:
TextIO- Returns:
file object to write log
- panorama.utils.check_tsv_sanity(tsv_path)#
Check if the given TSV file is readable for the next PANORAMA step.
- Parameters:
tsv_path (
Path) – The path to the TSV file with the list of pangenomes.- Returns:
Dict[str, Dict[str, Union[int, str, Path]]] – A dictionary with pangenome name as key and a dictionary with path and taxid as values.
- Raises:
SyntaxError – If the TSV file has less than 2 columns.
ValueError – If there is a line with no value in pangenome name or if the pangenome names contain spaces.
FileNotFoundError – If unable to locate one or more pangenomes in the TSV file.
- Return type:
Dict[str,Dict[str,Union[int,str,Path]]]
- panorama.utils.init_lock(lock=None)#
Initialize the loading lock.
- Parameters:
lock (
Lock) – The lock object to be assigned toloading_lock. Defaults to None.- Returns:
Lock – The lock object assigned to
loading_lock.
- panorama.utils.is_empty(filepath)#
Checks if a file is empty.
- Parameters:
filepath (str) – The path to the file to check.
- Returns:
bool – True if the file is empty, False otherwise.
- panorama.utils.is_true_value(value)#
Check if a value represents a true condition.
True conditions are: 1, “True” or True
- Parameters:
value (
Union[str,int,bool]) – Value to check- Returns:
True if value represents a true condition
- Return type:
bool
- panorama.utils.mkdir(output, force=False, erase=False)#
Create a directory at the given path.
- Parameters:
output (
Path) – The path to the output directoryforce (
bool) – Whether to raise an exception if the directory already exists. Defaults to Falseerase (
bool) – Whether to erase the directory if it already exists and force is True. Defaults to False
- Returns:
Path – The path to the output directory.
- Raises:
FileExistsError – If the directory already exists and force is False.
Exception – If an unexpected error occurs.
- Return type:
Path
- panorama.utils.pop_specific_action_grp(sub, title)#
- Return type:
_SubParsersAction
- panorama.utils.resolve_path(path, relative_directory)#
Try the path from cwd first, then relative to the file location
- Parameters:
path (
Path) – path to solverelative_directory (
Path) – directory to resolve relative paths from
- Returns:
Path – resolved path
- Return type:
Path
- panorama.utils.set_verbosity_level(args)#
Set the verbosity level
- Parameters:
args (
Namespace) – argument pass by command line- Return type:
None