From d211eacb74522bc54468f191a2ec962eba894682 Mon Sep 17 00:00:00 2001 From: MarvinDo Date: Fri, 23 Feb 2024 11:29:14 +0100 Subject: [PATCH] bugfix --- .../annotation_jobs/heredicare_job.py | 3 +- .../annotation_jobs/spliceai_job.py | 29 +++++-------------- .../webapp/templates/index.html | 1 + 3 files changed, 9 insertions(+), 24 deletions(-) diff --git a/src/annotation_service/annotation_jobs/heredicare_job.py b/src/annotation_service/annotation_jobs/heredicare_job.py index 0c605de0..87a406d5 100644 --- a/src/annotation_service/annotation_jobs/heredicare_job.py +++ b/src/annotation_service/annotation_jobs/heredicare_job.py @@ -61,7 +61,7 @@ def save_to_db(self, info, variant_id, conn): err_msg += "There was an error during variant retrieval from heredicare: " + str(message) status_code = 1 else: - print(heredicare_variant) + #print(heredicare_variant) n_fam = heredicare_variant["N_FAM"] n_pat = heredicare_variant["N_PAT"] consensus_class = heredicare_variant["PATH_TF"] if heredicare_variant["PATH_TF"] != "-1" else None @@ -86,7 +86,6 @@ def save_to_db(self, info, variant_id, conn): for key in heredicare_variant: if key.startswith("PATH_Z") and heredicare_variant[key] is not None: zid = int(key[6:]) - print(zid) classification = heredicare_variant[key] if heredicare_variant[key] != "-1" else None conn.insert_heredicare_center_classification(heredicare_annotation_id, zid, classification, comment = None) # TODO! COMMENT! diff --git a/src/annotation_service/annotation_jobs/spliceai_job.py b/src/annotation_service/annotation_jobs/spliceai_job.py index 1b0fc154..09ac086d 100644 --- a/src/annotation_service/annotation_jobs/spliceai_job.py +++ b/src/annotation_service/annotation_jobs/spliceai_job.py @@ -22,18 +22,19 @@ def execute(self, inpath, annotated_inpath, **kwargs): self.print_executing() - spliceai_code, spliceai_stderr, splicai_stdout = self.annotate_missing_spliceai(inpath, annotated_inpath) - self.handle_result(inpath, annotated_inpath, spliceai_code) + return spliceai_code, spliceai_stderr, splicai_stdout def save_to_db(self, info, variant_id, conn): - for prefix in ['snv', 'indel']: - self.insert_annotation(variant_id, info, prefix + '_SpliceAI=', 7, conn, value_modifier_function= lambda value : ','.join(['|'.join(x.split('|')[1:]) for x in value.replace(',', '&').split('&')]) ) - self.insert_annotation(variant_id, info, prefix + '_SpliceAI=', 8, conn, value_modifier_function= lambda value : ','.join([str(max([float(x) for x in x.split('|')[2:6]])) for x in value.replace(',', '&').split('&')]) ) + recent_annotation_ids = conn.get_recent_annotation_type_ids() + + for prefix in ['snv_', 'indel_', '']: + self.insert_annotation(variant_id, info, prefix + 'SpliceAI=', recent_annotation_ids["spliceai_details"], conn, value_modifier_function= lambda value : ','.join(['|'.join(x.split('|')[1:]) for x in value.replace(',', '&').split('&')]) ) + self.insert_annotation(variant_id, info, prefix + 'SpliceAI=', recent_annotation_ids["spliceai_max_delta"], conn, value_modifier_function= lambda value : ','.join([str(max([float(x) for x in x.split('|')[2:6]])) for x in value.replace(',', '&').split('&')]) ) return 0, "" @@ -41,9 +42,6 @@ def save_to_db(self, info, variant_id, conn): def annotate_missing_spliceai(self, input_vcf_path, output_vcf_path): - #input_file = open(input_vcf_path, 'r') - #temp_path = tempfile.gettempdir() + '/' + str(uuid.uuid4()) + '.vcf' - #temp_file = open(temp_path, 'w') found_spliceai_header = False need_annotation = False @@ -54,7 +52,6 @@ def annotate_missing_spliceai(self, input_vcf_path, output_vcf_path): with open(input_vcf_path, 'r') as input_file: for line in input_file: if line.startswith('#'): - #temp_file.write(line) if line.startswith('##INFO=Changelog
  • A selected criterium would automatically uncheck if a mutually exclusive criterium was unselected and the mutually exclusive criterium itself is mutually exclusive with the selected criterium
  • Fixed default strength for supporting criteria in ACMG standard scheme
  • Fixed wrapping of PVS1_mod criterium
  • +
  • Fixed a bug where the SpliceAI scores would not show on longer indels
  • v 1.8 (21.02.2024)