From 6e36129b79e58fcae3f027ca0b9822176f731d2a Mon Sep 17 00:00:00 2001 From: hunterckx <118154470+hunterckx@users.noreply.github.com> Date: Fri, 15 Nov 2024 16:09:40 -0800 Subject: [PATCH] refactor: make `isRef` calculation more specfic (#159) --- files/build-files-from-ncbi.py | 2 +- files/source/organisms-from-ncbi.tsv | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/files/build-files-from-ncbi.py b/files/build-files-from-ncbi.py index a34e732..37fdecb 100644 --- a/files/build-files-from-ncbi.py +++ b/files/build-files-from-ncbi.py @@ -47,7 +47,7 @@ def get_genome_row(genome_info): "taxon": genome_info["organism"]["organism_name"], "taxonomyId": genome_info["organism"]["tax_id"], "accession": genome_info["accession"], - "isRef": (not (refseq_category is None)) and ("reference" in refseq_category), + "isRef": refseq_category == "reference genome", "level": genome_info["assembly_info"]["assembly_level"], "chromosomeCount": genome_info["assembly_stats"].get("total_number_of_chromosomes"), "length": genome_info["assembly_stats"]["total_sequence_length"], diff --git a/files/source/organisms-from-ncbi.tsv b/files/source/organisms-from-ncbi.tsv index 50c59ad..a69212d 100644 --- a/files/source/organisms-from-ncbi.tsv +++ b/files/source/organisms-from-ncbi.tsv @@ -3,7 +3,7 @@ Anopheles gambiae 7165 7 Coccidioides immitis 5501 5 Coccidioides posadasii 199306 13 Culex pipiens 7175 5 -Mycobacterium tuberculosis 1773 7822 +Mycobacterium tuberculosis 1773 7823 Plasmodium falciparum 5833 67 Plasmodium vinckei 5860 10 Plasmodium vivax 5855 19