humann/store.py
def max_median_score(self,bug):
        """
        Compute an alternative median score using the max values for the reactions for each pathway
        """
        
        # Create a list of the max scores for each of the pathways
        all_scores=[]
        for item in self.__pathways.get(bug,{}).values():
            all_scores.append(max(item.values()))
        
        all_scores.sort()
        
        # Find the median score value from the list of max scores per reaction
        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 an alternative median score using the max values for the reactions for each pathway
        
Compute an alternative median score using the max values for the reactions for each pathway
Compute an alternative median score using the max values for the reactions for each pathway
def max_median_score(self,bug):
        all_scores=[]
        for item in self.__pathways.get(bug,{}).values():
            all_scores.append(max(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 max_median_score ( self , bug ) : all_scores = [ ] for item in self . __pathways . get ( bug , { } ) . values ( ) : all_scores . append ( max ( 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 an alternative median score using the max values for the reactions for each pathway
Compute an alternative median score using the max values for the reactions for each pathway
"""
        Compute an alternative median score using the max values for the reactions for each pathway
        """ # Create a list of the max scores for each of the pathways # Find the median score value from the list of max scores per reaction
self
bug