From 708cd12b840a43a550e99282f7de64d8027ae2ba Mon Sep 17 00:00:00 2001 From: Rutger Vos Date: Thu, 7 Nov 2024 13:36:39 +0100 Subject: [PATCH] added comment for how to decide the translation table --- barcode_validator/core.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/barcode_validator/core.py b/barcode_validator/core.py index ac66964..1f97b36 100644 --- a/barcode_validator/core.py +++ b/barcode_validator/core.py @@ -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)