humann/store.py
def _find_reaction_list_and_key_reactions(self,items,reaction_names=None):
        """
        Find the reactions in the pathways items and also the key reactions
        """
        
        reaction_list=[]
        key_reactions=[]
        for item in items:
            # ignore items that are not reactions as they are part of pathway structure
            if not item in ["(",")","",config.pathway_AND,config.pathway_OR]:
                # check if the item name indicates an optional reaction
                # if so remove the optional reaction indicator at the beginning of the name                
                if self._is_optional_reaction(item, reaction_names):
                    item=item[1:]
                else:
                    # record that this is a key reaction
                    key_reactions.append(item)
                        
                reaction_list.append(item)      
        
        return reaction_list, key_reactions

        Find the reactions in the pathways items and also the key reactions
        
Find the reactions in the pathways items and also the key reactions
Find the reactions in the pathways items and also the key reactions
def _find_reaction_list_and_key_reactions(self,items,reaction_names=None):
        reaction_list=[]
        key_reactions=[]
        for item in items:
            if not item in ["(",")","",config.pathway_AND,config.pathway_OR]:
                if self._is_optional_reaction(item, reaction_names):
                    item=item[1:]
                else:
                    key_reactions.append(item)
                reaction_list.append(item)      
        return reaction_list, key_reactions
def _find_reaction_list_and_key_reactions ( self , items , reaction_names = None ) : reaction_list = [ ] key_reactions = [ ] for item in items : if not item in [ "(" , ")" , "" , config . pathway_AND , config . pathway_OR ] : if self . _is_optional_reaction ( item , reaction_names ) : item = item [ 1 : ] else : key_reactions . append ( item ) reaction_list . append ( item ) return reaction_list , key_reactions
Find the reactions in the pathways items and also the key reactions
Find the reactions in the pathways items and also the key reactions
"""
        Find the reactions in the pathways items and also the key reactions
        """ # ignore items that are not reactions as they are part of pathway structure # check if the item name indicates an optional reaction # if so remove the optional reaction indicator at the beginning of the name                 # record that this is a key reaction
self
items
reaction_names