diff --git a/scripts/newreference.py b/scripts/newreference.py index 0d7b9e5..c6b47ec 100644 --- a/scripts/newreference.py +++ b/scripts/newreference.py @@ -6,10 +6,12 @@ def new_reference(referencefile, outgenbank, outfasta, gene): ref = SeqIO.read(referencefile, "genbank") + startofgene = None + endofgene = None for feature in ref.features: if feature.type == 'source': ref_source_feature = feature - if feature.type =='gene': + if feature.type =='gene' or feature.type == 'CDS': a = list(feature.qualifiers.items())[0][-1][0] if a == gene: startofgene = int(list(feature.location)[0])