Skip to content

Commit

Permalink
added comment for how to decide the translation table
Browse files Browse the repository at this point in the history
  • Loading branch information
rvosa committed Nov 7, 2024
1 parent f72e505 commit 708cd12
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions barcode_validator/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,11 @@ def validate_sequence_quality(self, config: Config, record: SeqRecord, result: D
self.logger.warning(f"Alignment failed for {result.process_id}")
result.error = f"Alignment failed for sequence '{record.seq}'"
else:

# TODO: make it so that the translation table is inferred from the BCDM annotations of the sequence.
# This should be a combination of the taxonomy and the marker code, where the latter should tell us
# if the marker is nuclear or mitochondrial and the former should tell us the translation table.
# https://www.ncbi.nlm.nih.gov/Taxonomy/Utils/wprintgc.cgi
amino_acid_sequence = sh.translate_sequence(aligned_sequence, config.get('translation_table'))
result.stop_codons = sh.get_stop_codons(amino_acid_sequence)
result.seq_length = sh.marker_seqlength(aligned_sequence)
Expand Down

0 comments on commit 708cd12

Please sign in to comment.