0

I'm trying to read a SBML file (Test.xml) using the R package SBMLR. Below is the code I executed.

library(SBMLR)
file <- system.file("models","Test.xml",package = "SBMLR")
doc <- readSBML(file)

When I execute the 3rd line I get an error message saying:

Error in xmlEventParse(filename, handlers = sbmlHandler(), ignoreBlanks = TRUE) : File does not exist

I have tried to read the file using rsbml library as well.. But still I'm getting an error saying

Error: File unreadable.

I'm following this guide at the moment. Any help regarding the issue is highly appreciated!

mhucka
  • 2,143
  • 26
  • 41
SriniShine
  • 1,089
  • 5
  • 26
  • 46
  • Have you tried `doc <- readSBML("Test.xml")` . This gives errors regarding the file content itself: one error ***Opening and ending tag mismatch: reaction line 14 and listOfReactions*** – user20650 Jun 21 '15 at 14:05
  • There were some errors in the xml file. I corrected it and was able to load the model into a list using readSBML(). However still the above mentioned method didn't work. Thank you for your suggestion. – SriniShine Jun 23 '15 at 10:52
  • Thats good you got it working. Btw are you saying that `file <- system.file("models","Test.xml",package = "SBMLR")` didnt work? ... it shouldnt. What that does it it looks for a file called `Test.xml `in the `models` directory of your SBMLR library,(which is automatically generated on SBMLR installation), and then creates a file path to it. Unless you saved it there it wont be found, and so there will be nothing to pass to readSBML. So you justneed to directly pass the path of your `Test.xml` file to `readSBML`. – user20650 Jun 23 '15 at 14:24
  • I have voted to close as error was based on a typo in the input file – user20650 Jun 23 '15 at 14:25
  • 1
    I thought the first parameter in system.files() is the xml tag I want to start reading from. I see this is the mistake. Thanks alot :) ! – SriniShine Jun 23 '15 at 14:41

0 Answers0