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

term.valid? returns false for parsed terms #70

Open
ncatlett opened this issue Aug 11, 2015 · 1 comment
Open

term.valid? returns false for parsed terms #70

ncatlett opened this issue Aug 11, 2015 · 1 comment
Milestone

Comments

@ncatlett
Copy link
Member

resource_index=ResourceIndex.openbel_published_index("20131211")
term=BEL::Script.parse("p(HGNC:AKT1", resource_index).to_a[-1].subject
term.valid? returns false
param=term.arguments[0].
param.valid? returns true - problem does not seem to be with the namespace value, maybe with accessing the encoding?

The same term entered directly is valid -
p(HGNC['AKT1']).valid? returns true

@abargnesi
Copy link
Member

This is due to missing term signature information on your parsed term. Specifically, the namespace value encoding is not retrieved for the term signature. We should be able to retrieve it from the correct BEL::Namespace::NamespaceDefinition object by calling ns.values[VALUE].

@abargnesi abargnesi added this to the 0.3.4 milestone Aug 31, 2015
@abargnesi abargnesi modified the milestones: 0.3.4, 0.4.0 Oct 21, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants