From c6635eb90bea8d3a3b7678c2372fcf2654d2d965 Mon Sep 17 00:00:00 2001 From: Rori Cremer <6863459+RoriCremer@users.noreply.github.com> Date: Mon, 6 Jan 2025 23:28:57 -0500 Subject: [PATCH] clean up if statement --- .../scripts/create_vt_bqloadjson_from_annotations.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/variantstore/scripts/create_vt_bqloadjson_from_annotations.py b/scripts/variantstore/scripts/create_vt_bqloadjson_from_annotations.py index b89c434fcd6..54618f56f4c 100644 --- a/scripts/variantstore/scripts/create_vt_bqloadjson_from_annotations.py +++ b/scripts/variantstore/scripts/create_vt_bqloadjson_from_annotations.py @@ -239,7 +239,9 @@ def make_annotated_json_row(row_position, row_ref, row_alt, variant_line, transc ## TODO add clinvar star rating!!! for clinvar_obj in clinvar_objs: # get only the clinvar objs with right variant and the id that starts with RCV - if (clinvar_obj.get("refAllele") == var_ref) and (clinvar_obj.get("altAllele") == var_alt) and (clinvar_obj.get("id")[:3] == "RCV"): + if (((clinvar_obj.get("refAllele") == var_ref) and (clinvar_obj.get("altAllele") == var_alt)) or + ((clinvar_obj.get("refAllele") == Bio.Seq.reverse_complement(variant_line["refAllele"])) and (clinvar_obj.get("altAllele") == Bio.Seq.reverse_complement(variant_line["altAllele"])))) + and (clinvar_obj.get("id")[:3] == "RCV"): clinvar_ids.append(clinvar_obj.get("id")) significance_values.extend([x.lower() for x in clinvar_obj.get("significance")]) updated_dates.append(clinvar_obj.get("lastUpdatedDate"))