humann/store.py
def median_score(self, bug):
        """
        Compute the median score for all scores in all pathways for one bug
        """
        
        # Create a list of all of the scores in all pathways
        all_scores=[]
        for item in self.__pathways.get(bug,{}).values():
            all_scores+=item.values()
        
        all_scores.sort()
        
        # Find the median score value
        median_score_value=0
        if all_scores:
            if len(all_scores) % 2 == 0:
                index1=int(len(all_scores)/2)
                index2=index1-1
                median_score_value=(all_scores[index1]+all_scores[index2])/2.0
            else:
                median_score_value=all_scores[int(len(all_scores)/2)]
            
        return median_score_value

        Compute the median score for all scores in all pathways for one bug
        
Compute the median score for all scores in all pathways for one bug
Compute the median score for all scores in all pathways for one bug
def median_score(self, bug):
        all_scores=[]
        for item in self.__pathways.get(bug,{}).values():
            all_scores+=item.values()
        all_scores.sort()
        median_score_value=0
        if all_scores:
            if len(all_scores) % 2 == 0:
                index1=int(len(all_scores)/2)
                index2=index1-1
                median_score_value=(all_scores[index1]+all_scores[index2])/2.0
            else:
                median_score_value=all_scores[int(len(all_scores)/2)]
        return median_score_value
def median_score ( self , bug ) : all_scores = [ ] for item in self . __pathways . get ( bug , { } ) . values ( ) : all_scores += item . values ( ) all_scores . sort ( ) median_score_value = 0 if all_scores : if len ( all_scores ) % 2 == 0 : index1 = int ( len ( all_scores ) / 2 ) index2 = index1 - 1 median_score_value = ( all_scores [ index1 ] + all_scores [ index2 ] ) / 2.0 else : median_score_value = all_scores [ int ( len ( all_scores ) / 2 ) ] return median_score_value
Compute the median score for all scores in all pathways for one bug
Compute the median score for all scores in all pathways for one bug
"""
        Compute the median score for all scores in all pathways for one bug
        """ # Create a list of all of the scores in all pathways # Find the median score value
self
bug