Location: Single PASMC model (Gosak et al 2014) @ b36899a7522a / Components / buildsrc / txt2cellml.ps1

Author:
WeiweiAi <wai484@aucklanduni.ac.nz>
Date:
2022-05-04 14:11:45+12:00
Desc:
update the cellML files (removed the BOM); add validation scripts
Permanent Source URI:
https://staging.physiomeproject.org/workspace/83f/rawfile/b36899a7522a109aa114e002c34247cb768ffaa7/Components/buildsrc/txt2cellml.ps1

## Convert .txt to .cellml
# If this script cannot be loaded, type "Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope Process" in the PowerShell terminal
# The OpenCOR installation folder path
$dpath= 'C:/Users/wai484/Documents/OpenCOR'
# The text file name
$txtfiles="JVOCCi","JNCXi","JSERCAi","JCICRi","JPMCAi","Jleaki","JNKAi","JCli","Cai","Casr","Vm","Para","PASMC","JKi"
# The model directory where .txt files are saved
$tpath='C:/Users/wai484/Documents/SinglePASMC/Components/buildsrc'
# The model directory where .cellml files are saved
$cpath='C:/Users/wai484/Documents/SinglePASMC/Components'
# Execute the command to do the conversion
foreach ($txtfile in $txtfiles)
{
  .$dpath/OpenCOR -c CellMLTextView::export $tpath/$txtfile.txt | out-file $cpath/$txtfile.cellml -encoding utf8
}
$txtfile="PASMC_test"
$cpath='C:/Users/wai484/Documents/SinglePASMC/Experiments'
.$dpath/OpenCOR -c CellMLTextView::export $tpath/$txtfile.txt | out-file $cpath/$txtfile.cellml -encoding utf8