def _parse_duration(self, duration_string):
        duration_seconds_to_return = 0
        duration_string_segments = re.findall('[0-9]+[a-zA-Z]+',
                                              duration_string)

        if duration_string_segments:
            for segment in duration_string_segments:
                numerical_amount = int(re.search('[0-9]+', segment).group(0))
                duration_type = re.search('[a-zA-Z]+', segment).group(0)

                if duration_type == 'd':
                    duration_seconds_to_return += (
                        datetime.timedelta(
                            days=numerical_amount).total_seconds())
                elif duration_type == 'h':
                    duration_seconds_to_return += (
                        datetime.timedelta(
                            hours=numerical_amount).total_seconds())
                elif duration_type == 'm':
                    duration_seconds_to_return += (
                        datetime.timedelta(
                            minutes=numerical_amount).total_seconds())
                elif duration_type == 's':
                    duration_seconds_to_return += numerical_amount
                else:
                    raise SelectorParseError('UnsupportedSelectorDurationType')
        else:
            raise SelectorParseError('UnsupportedSelectorDuration')

        return duration_seconds_to_return
Export list of conserved genes associated with feature for each species
dataset/ETHPy150Open m-lab/telescope/telescope/selector.py/SelectorFileParser._parse_duration--crossover with--dataset/ETHPy150Open CGATOxford/cgat/obsolete/pipeline_species_conservation.py/exportConservedGeneListPerSpecies