Skip to content

Commit

Permalink
Split '_' in names
Browse files Browse the repository at this point in the history
Seems that in the text search the "_" is treated as a word character.
This means we don't get the sort of partial matches we would like. This
should fix that, but may require some tweaking.
  • Loading branch information
blakesweeney committed Sep 2, 2024
1 parent 14afc1d commit 617dd77
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions scripts/export/rfam_xml_dumper.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,17 @@
import timeit
import traceback
import xml.etree.ElementTree as ET
from sets import Set
from xml.dom import minidom

import django

from config import rfam_config as rfc
from config import rfam_search as rs
from config.rfam_config import RFAMREL, RFAMLIVE
from config.rfam_config import RFAMLIVE, RFAMREL
from rfam_schemas.RfamLive.models import Genome, Genseq
from sets import Set
from utils import RfamDB
from utils.parse_taxbrowser import *

from rfam_schemas.RfamLive.models import Genseq, Genome

"""
Description: This module exports Rfam data for the search engine
Expand Down Expand Up @@ -237,10 +235,10 @@ def family_xml_builder(name_dict, name_object, entries, rfam_acc=None, hfields=T
entry = ET.SubElement(entries, "entry", id=rfam_acc)

# entry name
ET.SubElement(entry, "name").text = str(fam_fields["name"])
ET.SubElement(entry, "name").text = str(fam_fields["name"]).replace("_", " ")

# entry description
ET.SubElement(entry, "description").text = str(fam_fields["description"])
ET.SubElement(entry, "description").text = str(fam_fields["description"]).replace("_", " ")

# entry dates - common to motifs and clans
dates = ET.SubElement(entry, "dates")
Expand Down

0 comments on commit 617dd77

Please sign in to comment.