humann/store.py
def add(self, bug, pathway, score):
        """
        Add the pathway score for the bug
        """
        
        # Try to convert the score to a float
        try:
            score=float(score)
        except ValueError:
            score=0
            logger.debug("Non-float value found for pathway: " + pathway)
        
        # Store all scores greater than 0
        if score>0:
            if bug == "all":
                self.__pathways[pathway]=score
            else:
                if pathway in self.__pathways_per_bug:
                    self.__pathways_per_bug[pathway][bug]=score
                else:
                    self.__pathways_per_bug[pathway]={bug:score}

        Add the pathway score for the bug
        
Add the pathway score for the bug
Add the pathway score for the bug
def add(self, bug, pathway, score):
        try:
            score=float(score)
        except ValueError:
            score=0
            logger.debug("Non-float value found for pathway: " + pathway)
        if score>0:
            if bug == "all":
                self.__pathways[pathway]=score
            else:
                if pathway in self.__pathways_per_bug:
                    self.__pathways_per_bug[pathway][bug]=score
                else:
                    self.__pathways_per_bug[pathway]={bug:score}
def add ( self , bug , pathway , score ) : try : score = float ( score ) except ValueError : score = 0 logger . debug ( "Non-float value found for pathway: " + pathway ) if score > 0 : if bug == "all" : self . __pathways [ pathway ] = score else : if pathway in self . __pathways_per_bug : self . __pathways_per_bug [ pathway ] [ bug ] = score else : self . __pathways_per_bug [ pathway ] = { bug : score }
Add the pathway score for the bug
Add the pathway score for the bug
"""
        Add the pathway score for the bug
        """ # Try to convert the score to a float # Store all scores greater than 0
self
bug
pathway
score