Mercurial > repos > iuc > progressivemauve
diff xmfa2gff3.py @ 13:71e6dd9198dc draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/progressivemauve commit e0cd7ae10ce97bed51594e7cc0b969a803d698b7
author | iuc |
---|---|
date | Fri, 07 Sep 2018 10:55:36 -0400 |
parents | 272c6e61dd0c |
children | 7ea1fa36f3f4 |
line wrap: on
line diff
--- a/xmfa2gff3.py Sun Jun 28 22:50:47 2015 -0400 +++ b/xmfa2gff3.py Fri Sep 07 10:55:36 2018 -0400 @@ -1,12 +1,17 @@ #!/usr/bin/env python +import argparse +import logging import sys + +from BCBio import GFF from Bio import SeqIO from Bio.Seq import Seq +from Bio.SeqFeature import ( + FeatureLocation, + SeqFeature +) from Bio.SeqRecord import SeqRecord -from Bio.SeqFeature import SeqFeature, FeatureLocation -import argparse -from BCBio import GFF -import logging + logging.basicConfig(level=logging.INFO) log = logging.getLogger(__name__) @@ -131,6 +136,10 @@ # Ignore 0% identity sequences if pid == 0: continue + + # Support for Biopython 1.68 and above, which removed sub_features + if not hasattr(other['feature'], "sub_features"): + other['feature'].sub_features = [] other['feature'].sub_features.append( SeqFeature( FeatureLocation(real_start, real_end),