Skip to content

Commit

Permalink
actual fix for single quote
Browse files Browse the repository at this point in the history
  • Loading branch information
apriltuesday committed Mar 26, 2024
1 parent 249847d commit 0e3f90e
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 0e3f90e

Please sign in to comment.