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

Error bel2rdf #130

Open
berenicew opened this issue Jan 17, 2017 · 1 comment
Open

Error bel2rdf #130

berenicew opened this issue Jan 17, 2017 · 1 comment

Comments

@berenicew
Copy link

berenicew commented Jan 17, 2017

Dear,

I am running the bel2rdf tool. I tried first the tool with small corpus and it proceed the file very well, but when using another BEL file, I get an error.
Please find below the stack trace of the error

Best regards,

bel2rdf.rb --bel all.bel --format turtle > all.ttl
/.rvm/gems/ruby-2.2.6/gems/bel_parser-1.0.8/lib/bel_parser/script/syntax/undefined_annotation_value.rb:46:in map': undefined method identifier' for nil:NilClass (NoMethodError)
from /.rvm/gems/ruby-2.2.6/gems/bel_parser-1.0.8/lib/bel_parser/script/validator.rb:33:in block (3 levels) in each' from /.rvm/gems/ruby-2.2.6/gems/bel_parser-1.0.8/lib/bel_parser/script/validator.rb:32:in each'
from /.rvm/gems/ruby-2.2.6/gems/bel_parser-1.0.8/lib/bel_parser/script/validator.rb:32:in flat_map' from /.rvm/gems/ruby-2.2.6/gems/bel_parser-1.0.8/lib/bel_parser/script/validator.rb:32:in block (2 levels) in each'
from /.rvm/gems/ruby-2.2.6/gems/bel_parser-1.0.8/lib/bel_parser/parsers/ast/node.rb:107:in traverse' from /.rvm/gems/ruby-2.2.6/gems/bel_parser-1.0.8/lib/bel_parser/script/validator.rb:31:in each'
from /.rvm/gems/ruby-2.2.6/gems/bel_parser-1.0.8/lib/bel_parser/script/validator.rb:31:in flat_map' from /.rvm/gems/ruby-2.2.6/gems/bel_parser-1.0.8/lib/bel_parser/script/validator.rb:31:in block in each'
from /.rvm/gems/ruby-2.2.6/gems/bel_parser-1.0.8/lib/bel_parser/script/state_aggregator.rb:25:in block in each' from /.rvm/gems/ruby-2.2.6/gems/bel_parser-1.0.8/lib/bel_parser/script/first_node.rb:13:in block in each'
from /.rvm/gems/ruby-2.2.6/gems/bel_parser-1.0.8/lib/bel_parser/ast_filter.rb:15:in block in each' from /.rvm/gems/ruby-2.2.6/gems/bel_parser-1.0.8/lib/bel_parser/ast_generator.rb:63:in block in each'
from /.rvm/gems/ruby-2.2.6/gems/bel_parser-1.0.8/lib/bel_parser/ast_generator.rb:52:in yield' from /.rvm/gems/ruby-2.2.6/gems/bel_parser-1.0.8/lib/bel_parser/ast_generator.rb:52:in each_line'
from /.rvm/gems/ruby-2.2.6/gems/bel_parser-1.0.8/lib/bel_parser/ast_generator.rb:52:in each' from /.rvm/gems/ruby-2.2.6/gems/bel_parser-1.0.8/lib/bel_parser/ast_generator.rb:52:in each'
from /.rvm/gems/ruby-2.2.6/gems/bel_parser-1.0.8/lib/bel_parser/ast_generator.rb:52:in each' from /.rvm/gems/ruby-2.2.6/gems/bel_parser-1.0.8/lib/bel_parser/ast_generator.rb:52:in each'
from /.rvm/gems/ruby-2.2.6/gems/bel_parser-1.0.8/lib/bel_parser/ast_generator.rb:52:in each' from /.rvm/gems/ruby-2.2.6/gems/bel_parser-1.0.8/lib/bel_parser/ast_filter.rb:13:in each'
from /.rvm/gems/ruby-2.2.6/gems/bel_parser-1.0.8/lib/bel_parser/script/filter.rb:28:in each' from /.rvm/gems/ruby-2.2.6/gems/bel_parser-1.0.8/lib/bel_parser/script/first_node.rb:12:in each'
from /.rvm/gems/ruby-2.2.6/gems/bel_parser-1.0.8/lib/bel_parser/script/state_aggregator.rb:19:in each' from /.rvm/gems/ruby-2.2.6/gems/bel_parser-1.0.8/lib/bel_parser/script/validator.rb:30:in each'
from /.rvm/gems/ruby-2.2.6/gems/bel_parser-1.0.8/lib/bel_parser/script/nanopub_mapper.rb:26:in each' from /.rvm/gems/ruby-2.2.6/gems/bel_parser-1.0.8/lib/bel/translator/plugins/bel_script/reader.rb:34:in each'
from /gitrep/bel.rb/lib/bel/translator/plugins/rdf2/translator.rb:30:in write' from /gitrep/bel.rb/lib/bel/translate.rb:53:in translate'
from /gitrep/bel.rb/bin/bel2rdf.rb:108:in `

'

A similar issue happened when converting large_corpus.bel file

/gitrep/bel.rb/bin/bel2rdf.rb --bel /gitrep/bel.rb/spec/unit/bel/large_corpus.bel --format turtle > large_corpus.ttl
/.rvm/gems/ruby-2.2.6/gems/bel_parser-1.0.8/lib/bel_parser/script/nanopub_mapper.rb:130:in domain_value': undefined method identifier' for nil:NilClass (NoMethodError)
from /.rvm/gems/ruby-2.2.6/gems/bel_parser-1.0.8/lib/bel_parser/script/nanopub_mapper.rb:114:in block in references' from /.rvm/gems/ruby-2.2.6/gems/bel_parser-1.0.8/lib/bel_parser/script/nanopub_mapper.rb:110:in each'
from /.rvm/gems/ruby-2.2.6/gems/bel_parser-1.0.8/lib/bel_parser/script/nanopub_mapper.rb:110:in map' from /.rvm/gems/ruby-2.2.6/gems/bel_parser-1.0.8/lib/bel_parser/script/nanopub_mapper.rb:110:in references'
from /.rvm/gems/ruby-2.2.6/gems/bel_parser-1.0.8/lib/bel_parser/script/nanopub_mapper.rb:52:in nanopub' from /.rvm/gems/ruby-2.2.6/gems/bel_parser-1.0.8/lib/bel_parser/script/nanopub_mapper.rb:39:in block in each'
from /.rvm/gems/ruby-2.2.6/gems/bel_parser-1.0.8/lib/bel_parser/script/validator.rb:39:in block in each' from /.rvm/gems/ruby-2.2.6/gems/bel_parser-1.0.8/lib/bel_parser/script/state_aggregator.rb:25:in block in each'
from /.rvm/gems/ruby-2.2.6/gems/bel_parser-1.0.8/lib/bel_parser/script/first_node.rb:13:in block in each' from /.rvm/gems/ruby-2.2.6/gems/bel_parser-1.0.8/lib/bel_parser/ast_filter.rb:15:in block in each'
from /.rvm/gems/ruby-2.2.6/gems/bel_parser-1.0.8/lib/bel_parser/ast_generator.rb:63:in block in each' from /.rvm/gems/ruby-2.2.6/gems/bel_parser-1.0.8/lib/bel_parser/ast_generator.rb:52:in yield'
from /.rvm/gems/ruby-2.2.6/gems/bel_parser-1.0.8/lib/bel_parser/ast_generator.rb:52:in each_line' from /.rvm/gems/ruby-2.2.6/gems/bel_parser-1.0.8/lib/bel_parser/ast_generator.rb:52:in each'
from /.rvm/gems/ruby-2.2.6/gems/bel_parser-1.0.8/lib/bel_parser/ast_generator.rb:52:in each' from /.rvm/gems/ruby-2.2.6/gems/bel_parser-1.0.8/lib/bel_parser/ast_generator.rb:52:in each'
from /.rvm/gems/ruby-2.2.6/gems/bel_parser-1.0.8/lib/bel_parser/ast_generator.rb:52:in each' from /.rvm/gems/ruby-2.2.6/gems/bel_parser-1.0.8/lib/bel_parser/ast_generator.rb:52:in each'
from /.rvm/gems/ruby-2.2.6/gems/bel_parser-1.0.8/lib/bel_parser/ast_filter.rb:13:in each' from /.rvm/gems/ruby-2.2.6/gems/bel_parser-1.0.8/lib/bel_parser/script/filter.rb:28:in each'
from /.rvm/gems/ruby-2.2.6/gems/bel_parser-1.0.8/lib/bel_parser/script/first_node.rb:12:in each' from /.rvm/gems/ruby-2.2.6/gems/bel_parser-1.0.8/lib/bel_parser/script/state_aggregator.rb:19:in each'
from /.rvm/gems/ruby-2.2.6/gems/bel_parser-1.0.8/lib/bel_parser/script/validator.rb:30:in each' from /.rvm/gems/ruby-2.2.6/gems/bel_parser-1.0.8/lib/bel_parser/script/nanopub_mapper.rb:26:in each'
from /.rvm/gems/ruby-2.2.6/gems/bel_parser-1.0.8/lib/bel/translator/plugins/bel_script/reader.rb:34:in each' from /gitrep/bel.rb/lib/bel/translator/plugins/rdf2/translator.rb:30:in write'
from /gitrep/bel.rb/lib/bel/translate.rb:53:in translate' from /gitrep/bel.rb/bin/bel2rdf.rb:108:in

'

@berenicew
Copy link
Author

berenicew commented Jan 17, 2017

Hi,

Please find more information, with a simple example.
The problem happened when referencing openBEL annotation files. Please find below a simple bel file that generate the error

##################################################################################
# Document Properties Section
###############################################################################
# Definitions Section
DEFINE ANNOTATION Species AS URL "https://resources.openbel.org/belframework/20131211/annotation/species-taxonomy-id.belanno"
##################################################################################
# Statements Section
SET Species = "9606"

And the command line bel2rdf.rb --bel sample.bel --format turtle > sample.ttl

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

1 participant