Skip to content
This repository has been archived by the owner on Sep 24, 2019. It is now read-only.

bel2rdf: handling of non-standard symbols #40

Closed
juliakozlovsky opened this issue Apr 13, 2015 · 1 comment
Closed

bel2rdf: handling of non-standard symbols #40

juliakozlovsky opened this issue Apr 13, 2015 · 1 comment
Assignees
Labels
Milestone

Comments

@juliakozlovsky
Copy link

Currently, there seem to be issues with certain symbols that may not have a certain ASCII representation (for example, if a symbol was cut-and-pasted from PDF, or other similar issues). Or maybe it is even limited to only a subset of non-ASCII symbols, it's been hard to tell..

Example:

abundance(mbCompounds:"17-Cyclopropylmethyl-4,5α-epoxy-3-hydroxy-14β-N-[(2′-pyridyl)-carboxamido]morphinan-6-one") directlyIncreases gtpBoundActivity(proteinAbundance(SPAC:P35372))

Currently, the error is:

MacBook-Pro:BEL user$ bel2rdf --bel /Users/file.bel >>test
/Library/Ruby/Gems/2.0.0/gems/rdf-1.1.7/lib/rdf/model/literal.rb:167:in encode': "\xCE" from ASCII-8BIT to UTF-8 (Encoding::UndefinedConversionError) from /Library/Ruby/Gems/2.0.0/gems/rdf-1.1.7/lib/rdf/model/literal.rb:167:ininitialize'
from /Library/Ruby/Gems/2.0.0/gems/rdf-1.1.7/lib/rdf/model/literal.rb:129:in new' from /Library/Ruby/Gems/2.0.0/gems/rdf-1.1.7/lib/rdf/model/statement.rb:116:ininitialize!'
from /Library/Ruby/Gems/2.0.0/gems/rdf-1.1.7/lib/rdf/model/statement.rb:96:in initialize' from /Library/Ruby/Gems/2.0.0/gems/rdf-1.1.7/lib/rdf.rb:170:innew'
from /Library/Ruby/Gems/2.0.0/gems/rdf-1.1.7/lib/rdf.rb:170:in Statement' from /Library/Ruby/Gems/2.0.0/gems/bel-0.3.0/bin/bel2rdf:85:in<<'
from /Library/Ruby/Gems/2.0.0/gems/bel-0.3.0/bin/bel2rdf:67:in block (2 levels) in initialize' from /Library/Ruby/Gems/2.0.0/gems/bel-0.3.0/bin/bel2rdf:66:ineach'
from /Library/Ruby/Gems/2.0.0/gems/bel-0.3.0/bin/bel2rdf:66:in block in initialize' from /Library/Ruby/Gems/2.0.0/gems/bel-0.3.0/lib/bel/script.rb:124240:inyield'
from /Library/Ruby/Gems/2.0.0/gems/bel-0.3.0/lib/bel/script.rb:124240:in each' from /Library/Ruby/Gems/2.0.0/gems/bel-0.3.0/bin/bel2rdf:64:ineach'
from /Library/Ruby/Gems/2.0.0/gems/bel-0.3.0/bin/bel2rdf:64:in each' from /Library/Ruby/Gems/2.0.0/gems/bel-0.3.0/bin/bel2rdf:64:ineach'
from /Library/Ruby/Gems/2.0.0/gems/bel-0.3.0/bin/bel2rdf:64:in initialize' from /Library/Ruby/Gems/2.0.0/gems/bel-0.3.0/bin/bel2rdf:132:innew'
from /Library/Ruby/Gems/2.0.0/gems/bel-0.3.0/bin/bel2rdf:132:in <top (required)>' from /usr/bin/bel2rdf:23:inload'
from /usr/bin/bel2rdf:23:in `

'

In the output, the compound name is rendered as:

http://www.openbel.org/bel/a_mbCompounds_17-Cyclopropylmethyl-4_5%CE%B1-epoxy-3-hydroxy-14%CE%B2-N-_2%E2%80%B2-pyridyl-carboxamidomorphinan-6-one http://www.w3.org/1999/02/22-rdf-syntax-ns#type http://www.openbel.org/vocabulary/Abundance

@abargnesi abargnesi added this to the 0.3.2 milestone Jun 23, 2015
@abargnesi abargnesi added the bug label Jul 23, 2015
@abargnesi abargnesi self-assigned this Jul 28, 2015
@abargnesi
Copy link
Member

The exception here was with encoding the object literal of the rdfs:label triples.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants