From 0e3f90e1dc4183db46238c18b0999efaf8640220 Mon Sep 17 00:00:00 2001 From: April Shen Date: Tue, 26 Mar 2024 15:54:27 +0000 Subject: [PATCH] actual fix for single quote --- .../run_release_in_embassy/create_release_tracking_table.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/eva-accession-release-automation/run_release_in_embassy/create_release_tracking_table.py b/eva-accession-release-automation/run_release_in_embassy/create_release_tracking_table.py index e02fbdb06..8329f2c2d 100644 --- a/eva-accession-release-automation/run_release_in_embassy/create_release_tracking_table.py +++ b/eva-accession-release-automation/run_release_in_embassy/create_release_tracking_table.py @@ -13,7 +13,6 @@ # See the License for the specific language governing permissions and # limitations under the License. import argparse -import re from collections import defaultdict from functools import cached_property from itertools import cycle @@ -112,7 +111,7 @@ def _fill_from_supported_assembly_tracker(self): def _insert_entry_for_taxonomy_and_assembly(self, tax, asm_acc, sources, sc_name=None, fasta_path=None, report_path=None, release_folder_name=None): sc_name = sc_name if sc_name else get_scientific_name_from_ensembl(tax) - sc_name = re.sub("'", "\\'", sc_name) # a special fix to insert Ambystoma 'unisexual hybrid' verbatim + sc_name = sc_name.replace("'", "\''") if asm_acc != 'Unmapped': ncbi_assembly = NCBIAssembly(asm_acc, sc_name, self.ref_dir) fasta_path = fasta_path if fasta_path else ncbi_assembly.assembly_fasta_path