diff --git a/gff3toembl/EMBLContig.py b/gff3toembl/EMBLContig.py index f662b4d..74d856c 100644 --- a/gff3toembl/EMBLContig.py +++ b/gff3toembl/EMBLContig.py @@ -58,7 +58,7 @@ def compare_features(feature_1, feature_2): elif feature_1.start > feature_2.start: return 1 else: - return feature_2.end - feature_1.end + return int(feature_2.end - feature_1.end) return sorted(self.features.values(), cmp=compare_features) class EMBLFeature(object): diff --git a/gff3toembl/EMBLWriter.py b/gff3toembl/EMBLWriter.py index b215907..2d87680 100644 --- a/gff3toembl/EMBLWriter.py +++ b/gff3toembl/EMBLWriter.py @@ -71,7 +71,7 @@ def create_chromosome_list(self, chromosome_list_filename, embl_filename): def sort_and_tidy_gff_file(self): try: - subprocess.check_call("gt gff3 -sort -retainids -tidy -o "+str(self.fixed_gff_file)+" "+str(self.gff3_file), shell=True) + subprocess.check_call("gt gff3 -force -sort -retainids -tidy -o "+str(self.fixed_gff_file)+" "+str(self.gff3_file), shell=True) except: sys.exit("Failed to sort and tidy gff file with GT")