humann/store.py
def process_chocophlan_length(self,location,gene):
        """
        Return the length given the sequence location
        """
        
        try:
            if config.chocophlan_multiple_location_delimiter in location:
                locations=location.split(config.chocophlan_multiple_location_delimiter)
            else:
                locations=[location]
            length=0
            for location in locations:
                start, end = re.sub(config.chocophlan_location_extra_characters,
                    '',location).split(config.chocophlan_location_delimiter)
                length=length+abs(int(end)-int(start))+1
        except (ValueError, IndexError):
            length=0
            logger.debug("Unable to compute length for gene: " + gene)
        
        return length

        Return the length given the sequence location
        
Return the length given the sequence location
Return the length given the sequence location
def process_chocophlan_length(self,location,gene):
        try:
            if config.chocophlan_multiple_location_delimiter in location:
                locations=location.split(config.chocophlan_multiple_location_delimiter)
            else:
                locations=[location]
            length=0
            for location in locations:
                start, end = re.sub(config.chocophlan_location_extra_characters,
                    '',location).split(config.chocophlan_location_delimiter)
                length=length+abs(int(end)-int(start))+1
        except (ValueError, IndexError):
            length=0
            logger.debug("Unable to compute length for gene: " + gene)
        return length
def process_chocophlan_length ( self , location , gene ) : try : if config . chocophlan_multiple_location_delimiter in location : locations = location . split ( config . chocophlan_multiple_location_delimiter ) else : locations = [ location ] length = 0 for location in locations : start , end = re . sub ( config . chocophlan_location_extra_characters , '' , location ) . split ( config . chocophlan_location_delimiter ) length = length + abs ( int ( end ) - int ( start ) ) + 1 except ( ValueError , IndexError ) : length = 0 logger . debug ( "Unable to compute length for gene: " + gene ) return length
Return the length given the sequence location
Return the length given the sequence location
"""
        Return the length given the sequence location
        """
self
location
gene