microbetag.helpersΒΆ

Handlers classes allowing the different steps

AttributesΒΆ

ClassesΒΆ

Emojis

PathwayComplementarity

Sets variables regarding pathway complementarity tasks based on user's config (.yml) file

MappingPaths

Sets paths to mapping files

Faprotax

Paths to FAPROTAX collapse_table.py script and database

NetworkHandler

Set network-related configuration variables based on whether a network is already available or not.

AbdTableHandler

Handles processing and validation of the abundance table related variables.

BinsHandler

Handles bin/genomes/MAGs related variables in case of using microbetag with local/custom genomes.

SeedComplementarityHandler

Handles variables related to building GENRES and the seed complementarity module.

FunctionsΒΆ

manta_input_net(β†’ bool)

Wrapper for building the intermediate network CYJSON file; input for manta

otf_seqid_ncbi_gtdb_map(β†’ tuple[dict, dict, ...)

Builds a dataframe with sequence ids of nodes A and B found associated in the

Module ContentsΒΆ

class microbetag.helpers.Emojis[source]ΒΆ
microbetag.helpers.emojis[source]ΒΆ
class microbetag.helpers.PathwayComplementarity(config: microbetag.config.Config)[source]ΒΆ

Sets variables regarding pathway complementarity tasks based on user’s config (.yml) file

Parameters:

config – An instance of the config.Config class.

Note

From the config.Config class, the following attributes are being used:
  • base_dir

  • ouput_dir

  • prev_path_compl

  • kofam_database

  • complement_max_length

  • ko_merged_file

  • pc_percentage

setup_kegg_annotations()[source]ΒΆ

Sets up KEGG annotations and directories.

get_kofam_db_path()[source]ΒΆ

Returns the KOfam database path.

handle_missing_kofam_db()[source]ΒΆ

Handles the case when the KOfam database path is missing.

initialize(conf)[source]ΒΆ

Main function to initialize pathway complementarity settings.

output_dirs()[source]ΒΆ

Paths to output folders and files

class microbetag.helpers.MappingPaths[source]ΒΆ

Sets paths to mapping files

class microbetag.helpers.Faprotax(config)[source]ΒΆ

Paths to FAPROTAX collapse_table.py script and database

class microbetag.helpers.NetworkHandler(config)[source]ΒΆ

Set network-related configuration variables based on whether a network is already available or not. Check whether all the sequence identifiers present in the network as nodes, are also among those of the abundance table.

process_network(config)[source]ΒΆ

Process network edgelist and check bin consistency.

class microbetag.helpers.AbdTableHandler(config)[source]ΒΆ

Handles processing and validation of the abundance table related variables.

Parameters:

config – Instance of the Config class

load_abundance_table(config)[source]ΒΆ

Reads and validates the abundance table.

load_metadata_file(config)[source]ΒΆ

Load metadata file if provided

class microbetag.helpers.BinsHandler(config)[source]ΒΆ

Handles bin/genomes/MAGs related variables in case of using microbetag with local/custom genomes.

class microbetag.helpers.SeedComplementarityHandler(config)[source]ΒΆ

Handles variables related to building GENRES and the seed complementarity module.

Parameters:

config – Instance of the Config class

reconstrucion_paths(config)[source]ΒΆ

Set pathways for seeds related files and folders

seeds_paths(config)[source]ΒΆ
microbetag.helpers.manta_input_net(config: microbetag.config.Config) bool[source]ΒΆ

Wrapper for building the intermediate network CYJSON file; input for manta

microbetag.helpers.otf_seqid_ncbi_gtdb_map(config: microbetag.config.Config) tuple[dict, dict, pandas.DataFrame][source]ΒΆ

Builds a dataframe with sequence ids of nodes A and B found associated in the co-occurrence network followed by their corresponding NCBI Taxonomy ids and the representative GTDB genomes.

Returns:

  • pairs_of_interest: {(β€œβ€,””). (β€œβ€,””)}

  • relative_genomes: {ncbi_id: [gc, gc, gc], ..}

  • mspecies_map_df: A data frame with the sequence ids of the abundance data and

    their mapped NCBI Taxonomy IDs and their corresponding GTDB representative genomes.

Return type:

A tuple containing

Note

Strictly for the on-the-fly version