microbetag.seed_complementarity

Module Contents

class microbetag.seed_complementarity.ExportSeedComplementarities(config)[source]

Class to export seed complements. Needs a config object to initiate it.

# conda activate microbetag import yaml from config import Config from utils import ExportSeedComplementarities

config_file = “tests/dev_io_microbetag/config.yml” with open(config_file, ‘r’) as yaml_file:

config = Config(yaml.safe_load(yaml_file), config_file)

seed_complements = ExportSeedComplementarities(config) seed_complements.update()

update()[source]

PhyloMInt does not consider the Update seed sets returned by PhyloMint by: - removing compounds from seed sets that are related to environmental metabolites that can be produced in several ways within the cell. - removing from non seed sets compounds that cannot be produced in any other way than from entering the cell from the environment.

If both _c0 and _e0 exist in the seed list, _e0 is kept. If _c0 is missing from the model, _e0 is kept as a seed. If _c0 can be produced without _e0, _e0 is not a seed. Otherwise, _e0 is kept as a seed and _c0 is removed from non-seeds.

Get seed and non seed sets with terms related to KEGG MODULES.

NonSeedSet

BIN bin101-contigs [cpd02817, cpd00344, cpd03123, cpd00482, cpd11…

export_seed_complements()[source]

Export pairwise seed complmenents. Returns a df where beneficiary species are in the rows and potential donors in the columns.

example: BIN bin101-contigs bin151-contigs bin19-contigs bin189-contigs BIN bin101-contigs [] [cpd02678, cpd00094, cpd02893, cpd00641, cpd00… [cpd00259, cpd02678, cpd00641, cpd00200, cpd00… [cpd02678, cpd00641, cpd00200, cpd00142, cpd00… bin151-contigs [cpd03049, cpd00239, cpd03831, cpd11466, cpd00… [] [cpd03049, cpd00239, cpd03831, cpd11466, cpd00… [cpd03049, cpd00239, cpd03831, cpd11466, cpd00… bin19-contigs [cpd01777, cpd00055, cpd00121, cpd00482, cpd00… [cpd01777, cpd00055, cpd00121, cpd00338, cpd00… [] [cpd00145, cpd21480, cpd01777, cpd02160, cpd00…

map_carveme_seeds()[source]

https://www.metanetx.org/mnxdoc/mnxref.html map to modelseed and/or kegg.. [REMEMBER] MGG points to modelseed ids We will map

microbetag.seed_complementarity.process_seeds(seeds_dict, bigg2seed, int_suffix)[source]
microbetag.seed_complementarity.load_seed_complement_files(path_to_kegg_seed_mappings)[source]
microbetag.seed_complementarity.order_seed_complements(r)[source]

Order seed complements so they display based on their metabolism category which have been ranked according to what metabolic interactions we believe most common.

microbetag.seed_complementarity.build_url_with_seed_complements(seed_complements, nonseeds, kmap, shortener=None)[source]