euba / BacArena

agent based modelling
GNU General Public License v3.0
26 stars 11 forks source link

Unable to import .mat model #146

Closed yugi1001 closed 5 years ago

yugi1001 commented 5 years ago

Hi, I am trying to import a .mat file of a model that was built sometime ago. but unfortunately it throws an error when using the readMatmod function. The error is as shown below. Also the function was not available automatically on installation of BacArena and I had to run the code available on your Git acc. Would appreciate your help with this. Thanks

sau <- readMATmod("S_aureus.mat") user system elapsed 10.89 0.05 11.11 Error in dat.mat[[which(mod.var == "rxnGeneMat")]] : attempt to select less than one element in get1index

sessionInfo() R version 3.5.0 (2018-04-23) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows >= 8 x64 (build 9200)

Matrix products: default

locale: [1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C
[5] LC_TIME=English_United States.1252

attached base packages: [1] parallel stats graphics grDevices utils datasets methods base

other attached packages: [1] stringr_1.3.1 R.matlab_3.6.2 rsbml_2.40.0 BiocGenerics_0.28.0 BacArena_1.8
[6] ReacTran_1.4.3.1 shape_1.4.4 deSolve_1.21 rootSolve_1.7 sybil_2.1.5
[11] lattice_0.20-38 Matrix_1.2-15

loaded via a namespace (and not attached): [1] Rcpp_1.0.0 R.methodsS3_1.7.1 grid_3.5.0 stats4_3.5.0 magrittr_1.5
[6] graph_1.60.0 stringi_1.2.4 R.utils_2.7.0 R.oo_1.22.0 tools_3.5.0
[11] igraph_1.2.2 yaml_2.2.0 compiler_3.5.0 pkgconfig_2.0.2

jotech commented 5 years ago

sure I can have a look! could you please upload the matlab file?

yugi1001 commented 5 years ago

Sending the .mat file as an attachment.

Thanks for your time. appreciate it.

Yugandhar

On Thu, Aug 1, 2019 at 6:57 PM jo notifications@github.com wrote:

sure I can have a look! could you please upload the matlab file?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/euba/BacArena/issues/146?email_source=notifications&email_token=ACSYSLJ76EGPGQATUHEXQWLQCLQDNA5CNFSM4IIPWPM2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3KS5DI#issuecomment-517287565, or mute the thread https://github.com/notifications/unsubscribe-auth/ACSYSLOBI32YYS3UF6JKPBLQCLQDNANCNFSM4IIPWPMQ .

--

Yugandhar Reddy

jotech commented 5 years ago

im not sure if the mail attachment is working. do you mind adding the file directly? *.mat is not directly support by github, but gzip or zip should work!

jotech commented 5 years ago

I tried the S. aureus model from the bigg database and it worked without problems! The resulting R file is iSB619.RDS.gz

yugi1001 commented 5 years ago

S_aureus.zip

hope you are able to get the .mat file now. thanks

jotech commented 5 years ago

thanks for uploading! I added a fix, let me know if it helped you out :)

jotech commented 5 years ago

please reopen if still relevant