COPASI API
4.16.103
|
#include <SEDMLImporter.h>
Public Member Functions | |
void | deleteCopasiModel () |
const std::string | getArchiveFileName () |
CProcessReport * | getImportHandlerAddr () |
CModel * | importFirstSBMLModel (CProcessReport *pImportHandler, SBMLDocument *&pSBMLDocument, std::map< CCopasiObject *, SBase * > &copasi2sbmlmap, CListOfLayouts *&prLol, CCopasiDataModel *pDataModel) |
void | importTasks (std::map< CCopasiObject *, SedBase * > &copasi2sedmlmap) |
CModel * | parseSEDML (const std::string &sedmlDocumentText, CProcessReport *pImportHandler, SBMLDocument *&pSBMLDocument, SedDocument *&pSEDMLDocument, std::map< CCopasiObject *, SedBase * > &copasi2sedmlmap, std::map< CCopasiObject *, SBase * > &copasi2sbmlmap, CListOfLayouts *&prLol, COutputDefinitionVector *&plotList, CCopasiDataModel *pDataModel) |
void | readListOfPlotsFromSedMLOutput (COutputDefinitionVector *pPlotList, CModel *pModel, SedDocument *pSedDocument, std::map< CCopasiObject *, SedBase * > &copasi2sedmlmap) |
CModel * | readSEDML (std::string filename, CProcessReport *pImportHandler, SBMLDocument *&pSBMLDocument, SedDocument *&pSedDocument, std::map< CCopasiObject *, SedBase * > &copasi2sedmlmap, std::map< CCopasiObject *, SBase * > &copasi2sbmlmap, CListOfLayouts *&prLol, COutputDefinitionVector *&plotList, CCopasiDataModel *pDataModel) |
void | restoreFunctionDB () |
SEDMLImporter () | |
void | setImportHandler (CProcessReport *pHandler) |
void | updateCopasiTaskForSimulation (SedSimulation *sedmlsim, std::map< CCopasiObject *, SedBase * > &copasi2sedmlmap) |
~SEDMLImporter () | |
Static Protected Member Functions | |
static bool | areApproximatelyEqual (const double &x, const double &y, const double &t=1e-9) |
static C_FLOAT64 | round (const C_FLOAT64 &x) |
Protected Attributes | |
std::string | mArchiveFileName |
size_t | mhImportStep |
std::set< unsigned int > | mIgnoredSEDMLMessages |
std::string | mImportedModel |
unsigned C_INT32 | mImportStep |
bool | mIncompleteModel |
unsigned int | mLevel |
unsigned int | mOriginalLevel |
CModel * | mpCopasiModel |
CCopasiDataModel * | mpDataModel |
CProcessReport * | mpImportHandler |
SedDocument * | mpSEDMLDocument |
std::map< CReportDefinition *, std::string > | mReportMap |
unsigned C_INT32 | mTotalSteps |
std::set< std::string > | mUsedSEDMLIds |
bool | mUsedSEDMLIdsPopulated |
unsigned int | mVersion |
Definition at line 37 of file SEDMLImporter.h.
SEDMLImporter::SEDMLImporter | ( | ) |
Constructor that initializes speciesMap and the FunctionDB object
Definition at line 953 of file SEDMLImporter.cpp.
References mIgnoredSEDMLMessages.
SEDMLImporter::~SEDMLImporter | ( | ) |
Destructor that does nothing.
Definition at line 982 of file SEDMLImporter.cpp.
References mReportMap.
|
staticprotected |
void SEDMLImporter::deleteCopasiModel | ( | ) |
This call deletes an existing COPASI model. The method can e.g. be called to clean up if an import fails.
Definition at line 987 of file SEDMLImporter.cpp.
References mpCopasiModel.
const std::string SEDMLImporter::getArchiveFileName | ( | ) |
CProcessReport * SEDMLImporter::getImportHandlerAddr | ( | ) |
CModel * SEDMLImporter::importFirstSBMLModel | ( | CProcessReport * | pImportHandler, |
SBMLDocument *& | pSBMLDocument, | ||
std::map< CCopasiObject *, SBase * > & | copasi2sbmlmap, | ||
CListOfLayouts *& | prLol, | ||
CCopasiDataModel * | pDataModel | ||
) |
Imports the first viable SBML model
Definition at line 805 of file SEDMLImporter.cpp.
References applyAttributeChange(), SBMLImporter::deleteCopasiModel(), CDirEntry::dirName(), CCopasiMessage::EXCEPTION, CDirEntry::exist(), CLocaleString::fromUtf8(), CCopasiRootContainer::getFunctionList(), CModel::getModelParameterSet(), MCSEDML, mImportedModel, mpCopasiModel, mpDataModel, mpSEDMLDocument, SBMLImporter::parseSBML(), SBMLImporter::restoreFunctionDB(), CDirEntry::Separator, SBMLImporter::setImportCOPASIMIRIAM(), SBMLImporter::setImportHandler(), CCopasiDataModel::setSBMLFileName(), and CCopasiMessage::WARNING.
Referenced by parseSEDML().
void SEDMLImporter::importTasks | ( | std::map< CCopasiObject *, SedBase * > & | copasi2sedmlmap | ) |
Import all tasks for the imported SBML model
Definition at line 613 of file SEDMLImporter.cpp.
References CCopasiVectorN< CType >::add(), CScanProblem::addScanItem(), CCopasiParameterGroup::getParameter(), CCopasiTask::getProblem(), CCopasiDataModel::getReportDefinitionList(), CCopasiDataModel::getTaskList(), CCopasiParameter::getValue(), mImportedModel, mpCopasiModel, mpDataModel, mpSEDMLDocument, mReportMap, CCopasiParameter::Value::pBOOL, CCopasiParameter::Value::pDOUBLE, SEDMLUtils::resolveXPath(), CScanProblem::SCAN_LINEAR, CScanProblem::SCAN_REPEAT, CReport::setAppend(), CReport::setConfirmOverwrite(), CScanProblem::setContinueFromCurrentState(), CScanProblem::setOutputInSubtask(), CReport::setReportDefinition(), CCopasiTask::setScheduled(), CScanProblem::setSubtask(), CReport::setTarget(), CCopasiTask::steadyState, CCopasiTask::timeCourse, updateCopasiTaskForSimulation(), and CCopasiMessage::WARNING.
Referenced by parseSEDML().
CModel * SEDMLImporter::parseSEDML | ( | const std::string & | sedmlDocumentText, |
CProcessReport * | pImportHandler, | ||
SBMLDocument *& | pSBMLDocument, | ||
SedDocument *& | pSEDMLDocument, | ||
std::map< CCopasiObject *, SedBase * > & | copasi2sedmlmap, | ||
std::map< CCopasiObject *, SBase * > & | copasi2sbmlmap, | ||
CListOfLayouts *& | prLol, | ||
COutputDefinitionVector *& | pPlotList, | ||
CCopasiDataModel * | pDataModel | ||
) |
Function parses an SEDML document with libsedml and converts it to a COPASI CModel object which is returned. Deletion of the returned pointer is up to the caller.
Definition at line 435 of file SEDMLImporter.cpp.
References CProcessReport::addItem(), C_INT32, C_INVALID_INDEX, CCopasiMessage::ERROR, CCopasiMessage::ERROR_FILTERED, CCopasiMessage::EXCEPTION, CProcessReport::finishItem(), importFirstSBMLModel(), importTasks(), MCSEDML, MCXML, mhImportStep, mIgnoredSEDMLMessages, mImportStep, mLevel, mOriginalLevel, mpCopasiModel, mpDataModel, mpImportHandler, mpSEDMLDocument, mReportMap, mTotalSteps, mUsedSEDMLIdsPopulated, mVersion, CCopasiMessage::RAW, readListOfPlotsFromSedMLOutput(), CProcessReport::setName(), CCopasiMessage::WARNING, and CCopasiMessage::WARNING_FILTERED.
Referenced by readSEDML().
void SEDMLImporter::readListOfPlotsFromSedMLOutput | ( | COutputDefinitionVector * | pPlotList, |
CModel * | pModel, | ||
SedDocument * | pSedDocument, | ||
std::map< CCopasiObject *, SedBase * > & | copasi2sedmlmap | ||
) |
Definition at line 233 of file SEDMLImporter.cpp.
References CPlotItem::addChannel(), CPlotSpecification::createItem(), COutputDefinitionVector::createPlotSpec(), CPlotItem::curve2d, CCopasiMessage::EXCEPTION, CReportDefinition::getBodyAddr(), CCopasiObject::getCN(), CCopasiDataModel::getCopasi2SBMLMap(), CReportDefinition::getHeaderAddr(), SEDMLUtils::getNextId(), CCopasiObject::getObjectDataModel(), CCopasiObject::getObjectDisplayName(), CCopasiDataModel::getReportDefinitionList(), CReportDefinition::getSeparator(), isScan(), isTC(), mpDataModel, mpSEDMLDocument, mReportMap, CPlotItem::plot2d, SEDMLUtils::resolveDatagenerator(), CReportDefinition::setComment(), CReportDefinition::setIsTable(), CPlotSpecification::setLogX(), CPlotSpecification::setLogY(), CReportDefinition::setSeparator(), and CCopasiParameterGroup::setValue().
Referenced by parseSEDML().
CModel * SEDMLImporter::readSEDML | ( | std::string | filename, |
CProcessReport * | pImportHandler, | ||
SBMLDocument *& | pSBMLDocument, | ||
SedDocument *& | pSedDocument, | ||
std::map< CCopasiObject *, SedBase * > & | copasi2sedmlmap, | ||
std::map< CCopasiObject *, SBase * > & | copasi2sbmlmap, | ||
CListOfLayouts *& | prLol, | ||
COutputDefinitionVector *& | plotList, | ||
CCopasiDataModel * | pDataModel | ||
) |
Function reads an SEDML file with libsedml and converts it to a Copasi CModel
Definition at line 388 of file SEDMLImporter.cpp.
References CCopasiMessage::EXCEPTION, CLocaleString::fromUtf8(), MCSEDML, and parseSEDML().
void SEDMLImporter::restoreFunctionDB | ( | ) |
Definition at line 975 of file SEDMLImporter.cpp.
: Revision of last commit
: Author of last commit
: Date of last commit
Definition at line 75 of file SEDMLImporter.cpp.
void SEDMLImporter::setImportHandler | ( | CProcessReport * | pHandler | ) |
void SEDMLImporter::updateCopasiTaskForSimulation | ( | SedSimulation * | sedmlsim, |
std::map< CCopasiObject *, SedBase * > & | copasi2sedmlmap | ||
) |
Updates COPASI tasks for a given SedML Simulation
Creates and returns a COPASI CTrajectoryTask from the SEDML simulation given as argument.
Definition at line 94 of file SEDMLImporter.cpp.
References CCopasiMessage::EXCEPTION, CCopasiTask::getProblem(), CCopasiDataModel::getTaskList(), mpDataModel, SEDML_KISAO_STOCHASTIC, CTrajectoryProblem::setContinueSimultaneousEvents(), CTrajectoryProblem::setDuration(), CTrajectoryTask::setMethodType(), CTrajectoryProblem::setOutputStartTime(), CCopasiTask::setScheduled(), CTrajectoryProblem::setStepNumber(), and CCopasiMethod::stochastic.
Referenced by importTasks().
|
protected |
Definition at line 48 of file SEDMLImporter.h.
Referenced by getArchiveFileName().
|
protected |
Definition at line 62 of file SEDMLImporter.h.
Referenced by parseSEDML().
|
protected |
Definition at line 49 of file SEDMLImporter.h.
Referenced by parseSEDML(), and SEDMLImporter().
|
protected |
Definition at line 68 of file SEDMLImporter.h.
Referenced by importFirstSBMLModel(), and importTasks().
|
protected |
Definition at line 61 of file SEDMLImporter.h.
Referenced by parseSEDML().
|
protected |
Definition at line 50 of file SEDMLImporter.h.
|
protected |
Definition at line 51 of file SEDMLImporter.h.
Referenced by parseSEDML().
|
protected |
Definition at line 52 of file SEDMLImporter.h.
Referenced by parseSEDML().
|
protected |
Definition at line 56 of file SEDMLImporter.h.
Referenced by deleteCopasiModel(), importFirstSBMLModel(), importTasks(), and parseSEDML().
|
protected |
Definition at line 55 of file SEDMLImporter.h.
Referenced by importFirstSBMLModel(), importTasks(), parseSEDML(), readListOfPlotsFromSedMLOutput(), and updateCopasiTaskForSimulation().
|
protected |
Definition at line 60 of file SEDMLImporter.h.
Referenced by getImportHandlerAddr(), parseSEDML(), and setImportHandler().
|
protected |
Definition at line 58 of file SEDMLImporter.h.
Referenced by importFirstSBMLModel(), importTasks(), parseSEDML(), and readListOfPlotsFromSedMLOutput().
|
protected |
Definition at line 70 of file SEDMLImporter.h.
Referenced by importTasks(), parseSEDML(), readListOfPlotsFromSedMLOutput(), and ~SEDMLImporter().
|
protected |
Definition at line 63 of file SEDMLImporter.h.
Referenced by parseSEDML().
|
protected |
Definition at line 65 of file SEDMLImporter.h.
|
protected |
Definition at line 66 of file SEDMLImporter.h.
Referenced by parseSEDML().
|
protected |
Definition at line 53 of file SEDMLImporter.h.
Referenced by parseSEDML().