Open berenicew opened 7 years ago
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
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:inblock (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:inflat_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:intraverse' 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:inflat_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:inblock 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:inblock 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:inyield' 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:ineach' 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:ineach' 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:ineach' 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:ineach' 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:ineach' 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:ineach' 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:inwrite' 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:inblock 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:inmap' 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:innanopub' 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:inblock 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:inblock 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:inblock 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:ineach_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:ineach' 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:ineach' 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:ineach' 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:ineach' 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:ineach' 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:ineach' from /gitrep/bel.rb/lib/bel/translator/plugins/rdf2/translator.rb:30:in
write' from /gitrep/bel.rb/lib/bel/translate.rb:53:intranslate' from /gitrep/bel.rb/bin/bel2rdf.rb:108:in