diff options
author | zsloan | 2020-07-14 12:12:21 -0500 |
---|---|---|
committer | BonfaceKilz | 2020-07-24 03:46:26 +0300 |
commit | 55221dca1c1adb6559957262cac21b023dfa11e7 (patch) | |
tree | 0ff184eee6a1096690e11bd91c426ccc68149294 /wqflask/base | |
parent | bd411b8de6dbc2f9b7f5592936c181c599afcdd6 (diff) | |
download | genenetwork2-55221dca1c1adb6559957262cac21b023dfa11e7.tar.gz |
Added binary casting to phenotype trait info query to fix unicode issue
Diffstat (limited to 'wqflask/base')
-rw-r--r-- | wqflask/base/trait.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/wqflask/base/trait.py b/wqflask/base/trait.py index ecb9dcd9..f9da7b87 100644 --- a/wqflask/base/trait.py +++ b/wqflask/base/trait.py @@ -395,11 +395,14 @@ def retrieve_trait_info(trait, dataset, get_qtl_info=False): query = """ SELECT PublishXRef.Id, InbredSet.InbredSetCode, Publication.PubMed_ID, - Phenotype.Pre_publication_description, Phenotype.Post_publication_description, Phenotype.Original_description, - Phenotype.Pre_publication_abbreviation, Phenotype.Post_publication_abbreviation, PublishXRef.mean, + CAST(Phenotype.Pre_publication_description AS BINARY), + CAST(Phenotype.Post_publication_description AS BINARY), + CAST(Phenotype.Original_description AS BINARY), + CAST(Phenotype.Pre_publication_abbreviation AS BINARY), + CAST(Phenotype.Post_publication_abbreviation AS BINARY), PublishXRef.mean, Phenotype.Lab_code, Phenotype.Submitter, Phenotype.Owner, Phenotype.Authorized_Users, - Publication.Authors, Publication.Title, Publication.Abstract, - Publication.Journal, Publication.Volume, Publication.Pages, + CAST(Publication.Authors AS BINARY), CAST(Publication.Title AS BINARY), CAST(Publication.Abstract AS BINARY), + CAST(Publication.Journal AS BINARY), Publication.Volume, Publication.Pages, Publication.Month, Publication.Year, PublishXRef.Sequence, Phenotype.Units, PublishXRef.comments FROM @@ -462,9 +465,6 @@ def retrieve_trait_info(trait, dataset, get_qtl_info=False): trait.haveinfo = True for i, field in enumerate(dataset.display_fields): holder = trait_info[i] - # if isinstance(trait_info[i], basestring): - # holder = unicode(holder.strip(codecs.BOM_UTF8), 'utf-8', "ignore") - setattr(trait, field, holder) if dataset.type == 'Publish': |