Skip to content

Commit

Permalink
fix wrong stop codon clipping in partial CDS #340
Browse files Browse the repository at this point in the history
  • Loading branch information
oschwengers committed Oct 29, 2024
1 parent b2b2223 commit 3884268
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bakta/features/cds.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def create_cdss(genes, sequence):
else:
aa = gene.translate(translation_table=cfg.translation_table).upper()

if('truncated' not in cds or cds['truncated'] == bc.FEATURE_END_5_PRIME):
if(aa[-1] == '*'):
aa = aa[:-1] # discard trailing asterisk
cds['aa'] = aa
cds['aa_digest'], cds['aa_hexdigest'] = bu.calc_aa_hash(aa)
Expand Down

0 comments on commit 3884268

Please sign in to comment.