microbetag.pathway_complementarity¶
This script aims at calculating and exporting patwhay complementarities in case of running microbetag locally, with user-provided genomes.
Attributes¶
Functions¶
|
Build url to colorify the related to the module kegg map based on the KO terms |
|
Build the alts.json file |
|
Extract potential complementarities from other bins |
|
Get the KEGG maps in which a module takes part in |
|
Keep track of the KOs related to a module present on each bin |
|
Function to get all the KEGG pathway complements among a set of bins |
Module Contents¶
- microbetag.pathway_complementarity.build_kegg_url(kegg_map, clean_path, missing_kos, shortener=None)[source]¶
Build url to colorify the related to the module kegg map based on the KO terms of the beneficiary (pink) and those it gets from the donor (green)
- microbetag.pathway_complementarity.all_alternatives(bin_kos_per_module, modules_definitions_json_map, alts_output_file)[source]¶
Build the alts.json file list alternatives for a bin’s modules to be completed
- Inputs:
bin_kos_per_module (Dict): modules_definitions_json_map (str): path to
- microbetag.pathway_complementarity.all_complements(bin_kos_per_module, bins_alternatives, module_to_map, compl_output_file, tinyurl=False)[source]¶
Extract potential complementarities from other bins
- Inputs:
bin_kos_per_module bins_alternatives module_to_map
- microbetag.pathway_complementarity.a_modules_maps(kegg_modules_to_maps)[source]¶
Get the KEGG maps in which a module takes part in
- microbetag.pathway_complementarity.taxon_kos_per_module(bins_kos_df, ref_ko_per_module)[source]¶
Keep track of the KOs related to a module present on each bin Input:
bins_kos_df (pd.DataFrame):
- Return type:
bin_kos_per_module (Dict)
- microbetag.pathway_complementarity.export_pathway_complementarities(config, bins_kos_df)[source]¶
Function to get all the KEGG pathway complements among a set of bins
- Input:
config (Config): instance of the microbetag Config class with settings bins_kos_df (pd.DataFrame): dictionary with bin id as a key and the KOs found in the bin as the value
Returns: {beneficiary_bin: {donor_bin_A: {module_a: [], module_b: [],.. }}}