da2a89e8c4b23469cb35ec86b066bca2c4504745 lrnassar Wed Aug 7 15:39:34 2024 -0700 Adding a new check to panelApp otto that started failing, before all panelApp genes had an OMIM ID associated with it, so that field of the JSON file was a list with (usually) just one OMIM ID. But now there is a single gene with no associated ID so it returns None instead of a list. No RM. diff --git src/hg/utils/otto/panelApp/tandRep.py src/hg/utils/otto/panelApp/tandRep.py index a38fa9f..b51584f 100644 --- src/hg/utils/otto/panelApp/tandRep.py +++ src/hg/utils/otto/panelApp/tandRep.py @@ -59,30 +59,33 @@ entity_type = res[count]['entity_type'] evidence = ' '.join(res[count]['evidence']) gene_data = res[count]['gene_data'] alias = ' '.join(gene_data['alias']) biotype = gene_data['biotype'] ensembl_id_37 = gene_data['ensembl_genes']['GRch37']['82']['ensembl_id'] #ensembl_location_37 = gene_data['ensembl_genes']['GRch37']['82']['location'] ensembl_id_38 = gene_data['ensembl_genes']['GRch38']['90']['ensembl_id'] #ensembl_location_38 = gene_data['ensembl_genes']['GRch38']['90']['location'] gene_name = gene_data['gene_name'] #gene_symbol = gene_data['gene_symbol'] #hgnc_date_symbol_changed = gene_data['hgnc_date_symbol_changed'] hgnc_id = gene_data['hgnc_id'] hgnc_symbol = gene_data['hgnc_symbol'] + if str(gene_data['omim_gene']) == "None": + omim_gene = "None" + else: omim_gene = ' '.join(gene_data['omim_gene']) grch37_coordinates = res[count]['grch37_coordinates'] if grch37_coordinates == None: coordinates = gene_data['ensembl_genes']['GRch37']['82']['location'] location = coordinates.split(':') grch37_coordinates = location[1].split('-') chromStart_19 = int(grch37_coordinates[0]) chromEnd_19 = int(grch37_coordinates[1]) # hg38 grch38_coordinates = res[count]['grch38_coordinates'] if grch38_coordinates == None: coordinates = gene_data['ensembl_genes']['GRch38']['90']['location'] location = coordinates.split(':') grch38_coordinates = location[1].split('-')