humann/store.py
def _set_pathways_structure(self,reactions,reaction_names=None):
        """
        Determine the pathways structure from the input string
        """
        
        for pathway in reactions:
            # Check if the item is a list of items
            if isinstance(reactions[pathway], list):
                reactions[pathway]=config.pathways_database_stucture_delimiter.join(reactions[pathway])
            
            # Split the reactions information by the structured pathways delimiter
            reactions[pathway]=reactions[pathway].split(config.pathways_database_stucture_delimiter)
            
            # Find and store the structure for the pathway
            structure=self._find_structure(reactions[pathway],reaction_names)
            self.__pathways_structure[pathway]=structure
            
            # Find the list of reactions and the key reactions
            reaction_list, key_reactions = self._find_reaction_list_and_key_reactions(reactions[pathway],reaction_names)

            # Store the list of key reactions for the pathway
            self.__key_reactions[pathway]=key_reactions
            
            # Update the reactions dictionary to contain the list of reactions instead of the structure string
            reactions[pathway]=reaction_list
        
        return reactions

        Determine the pathways structure from the input string
        
Determine the pathways structure from the input string
Determine the pathways structure from the input string
def _set_pathways_structure(self,reactions,reaction_names=None):
        for pathway in reactions:
            if isinstance(reactions[pathway], list):
                reactions[pathway]=config.pathways_database_stucture_delimiter.join(reactions[pathway])
            reactions[pathway]=reactions[pathway].split(config.pathways_database_stucture_delimiter)
            structure=self._find_structure(reactions[pathway],reaction_names)
            self.__pathways_structure[pathway]=structure
            reaction_list, key_reactions = self._find_reaction_list_and_key_reactions(reactions[pathway],reaction_names)
            self.__key_reactions[pathway]=key_reactions
            reactions[pathway]=reaction_list
        return reactions
def _set_pathways_structure ( self , reactions , reaction_names = None ) : for pathway in reactions : if isinstance ( reactions [ pathway ] , list ) : reactions [ pathway ] = config . pathways_database_stucture_delimiter . join ( reactions [ pathway ] ) reactions [ pathway ] = reactions [ pathway ] . split ( config . pathways_database_stucture_delimiter ) structure = self . _find_structure ( reactions [ pathway ] , reaction_names ) self . __pathways_structure [ pathway ] = structure reaction_list , key_reactions = self . _find_reaction_list_and_key_reactions ( reactions [ pathway ] , reaction_names ) self . __key_reactions [ pathway ] = key_reactions reactions [ pathway ] = reaction_list return reactions
Determine the pathways structure from the input string
Determine the pathways structure from the input string
"""
        Determine the pathways structure from the input string
        """ # Check if the item is a list of items # Split the reactions information by the structured pathways delimiter # Find and store the structure for the pathway # Find the list of reactions and the key reactions # Store the list of key reactions for the pathway # Update the reactions dictionary to contain the list of reactions instead of the structure string
self
reactions
reaction_names