diff --git a/gff3tool/bin/gff3_fix.py b/gff3tool/bin/gff3_fix.py index 7ac8735..cbcf875 100755 --- a/gff3tool/bin/gff3_fix.py +++ b/gff3tool/bin/gff3_fix.py @@ -70,7 +70,7 @@ def script_main(): if line: try: lines = line.split("\t") - line_num_list = map(int,re.findall(r'\d+',lines[0])) + line_num_list = list(map(int,re.findall(r'\d+',lines[0]))) if lines[1] not in error_dict: error_dict[lines[1]] = [line_num_list] else: diff --git a/gff3tool/lib/gff3_fix/fix.py b/gff3tool/lib/gff3_fix/fix.py index 941f5f4..f67f320 100644 --- a/gff3tool/lib/gff3_fix/fix.py +++ b/gff3tool/lib/gff3_fix/fix.py @@ -419,7 +419,7 @@ def fix_phase(gff3, error_list, line_num_dict, logger): sorted_CDS_list = sorted(CDS_list, key=lambda x: x['start']) if sorted_CDS_list[0]['line_index']+1 in error: if 'Ema0006' in line_num_dict[sorted_CDS_list[0]['line_index']+1]: - phase = map(int,re.findall(r'\d',line_num_dict[sorted_CDS_list[0]['line_index']+1]['Ema0006']))[1] + phase = list(map(int,re.findall(r'\d',line_num_dict[sorted_CDS_list[0]['line_index']+1]['Ema0006']))[1]) else: try: phase = sorted_CDS_list[0]['phase'] @@ -491,7 +491,7 @@ def fix_attributes(gff3, error_list, logger): for error in error_list: for line_num in error: if gff3.lines[line_num-1]['line_status'] != 'removed': - tokens = map(str.strip, gff3.lines[line_num-1]['line_raw'].split('\t')) + tokens = list(map(str.strip, gff3.lines[line_num-1]['line_raw'].split('\t'))) if unescaped_field(tokens[8]): # don't know how to fix this pass