diff --git a/networkComplexityBigg/modelchecks/readModels.R b/networkComplexityBigg/modelchecks/readModels.R new file mode 100644 index 0000000000000000000000000000000000000000..3c4d31a4363f60274d575fe773bee84fe8a5fd5e --- /dev/null +++ b/networkComplexityBigg/modelchecks/readModels.R @@ -0,0 +1,25 @@ +#!/usr/bin/Rscript + +library(methods) +library(sybilSBML) +library(parallel) + +f <- dir("../sourceData/models", pattern="*.xml", full.names=T) + +m <- mclapply(f, function(x){ + tryCatch(readSBMLmod(x), error=function(e) NULL ) + } +) + +names(m) <- gsub("\\.xml", "", gsub(".*/models/", "", f)) + +cat("Problem with following models:\n") +err <- !sapply(m, is, "modelorg") +print(f[err]) + +m <- m[sapply(m, is, "modelorg")] + + +save(m, file="models.Rdata") + +