Data2Dynamics / d2d

a modeling environment tailored to parameter estimation in dynamical systems
https://github.com/Data2Dynamics/d2d
57 stars 29 forks source link

How to call the arImportSBML function? #100

Closed plakrisenko closed 6 years ago

plakrisenko commented 6 years ago

Hi, from the example in the function description: "ms = arImportSBML('BIOMD0000000379',100, true)". But this doesn't work. Specifying an option's name seems to be necessary. "ms = arImportSBML('BIOMD0000000379', 'tend' , 100)" works, but ms = arImportSBML('BIOMD0000000379', 'tend', 100, 'compartmentbyname', true) doesn't. Error message in this case is: "Error using argSwitch (line 40) Invalid switch argument was provided " ". Valid arguments are 'tend' 'overwrite' 'keepcompartments' 'compartmentbyname'"

Related question: What is the extraArgs argument for the argSwitch function?

Also in the description of arImportSBML it is said: "overwrite - Overwrite def file if it exists (default = false)". However the default behaviour is to overwrite the file, isn't it?

JoepVanlier commented 6 years ago

Some arguments passed to arImportSBML are flags, others require additional information. When it's just a flag, merely the flag suffices. That is: arImportSBML('BIOMD0000000379', 'Tend', 100, 'KeepCompartments')

The default is not to overwrite it. There was a bug in a previous version which did overwrite the file anyway. arImportSBML('BIOMD0000000379', 'Tend', 100, 'KeepCompartments', 'overwrite')