From 68a5f3cd8dd76b43830e1a008e5bc7322b4e474e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sara=20Monz=C3=B3n?= Date: Fri, 19 Apr 2024 17:47:11 +0200 Subject: [PATCH] variable renaming from allele to locus for clarity --- taranis/allele_calling.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/taranis/allele_calling.py b/taranis/allele_calling.py index 50c6a4a..8fab7ec 100644 --- a/taranis/allele_calling.py +++ b/taranis/allele_calling.py @@ -258,7 +258,7 @@ def _get_allele_details( ) return allele_details - def _classify_allele(allele_file: str, match_sequence: str) -> str: + def _classify_allele(locus_file: str, match_sequence: str) -> str: """Find the allele name in the schema that match the sequence Args: @@ -271,7 +271,7 @@ def _classify_allele(allele_file: str, match_sequence: str) -> str: # Read the fasta file and create a dictionary mapping sequences to their record IDs sequence_dict = { str(record.seq): record.id - for record in SeqIO.parse(allele_file, "fasta") + for record in SeqIO.parse(locus_file, "fasta") } # Check if the match_sequence is in the dictionary and return the corresponding record ID part @@ -417,6 +417,7 @@ def fix_protein(sample_allele_data): match_allele_schema = _classify_allele( locus_file, sample_allele_data["sample_allele_seq"] ) + # PLOT, TPR, ASM, ALM, INF, EXC are possible classifications if match_allele_schema: # exact match found labelled as EXC