saveSBMLR: Save an R model object of class SBMLR to a file.

Description Usage Arguments Value Warning Note Author(s) References See Also Examples

Description

This function converts an SBMLR model object in R into an SBMLR model definition file. Rate laws are provided only in string form. Redundancy is eliminated to make the file easier to edit.

Usage

1
saveSBMLR(model,filename)

Arguments

model

The SBMLR model object to be mapped into the SBMLR model definition file.

filename

The file name of the destination SBMLR model definition file.

Value

No value returned.

Warning

SBML events and function definitions are NOT implemented.

Note

Similar to saveSBML, the file is written incrementally.

Author(s)

Tom Radivoyevitch

References

Radivoyevitch, T. A two-way interface between limited Systems Biology Markup Language and R. BMC Bioinformatics 5, 190 (2004).

See Also

saveSBML

Examples

1
2
3
4
5
6
7
library(SBMLR)
curto=readSBMLR(file.path(system.file(package="SBMLR"), "models/curto.r"))
saveSBMLR(curto,"curtoR.r")  
curtoR=readSBMLR("curtoR.r")  
curto==curtoR
summary(curtoR)
unlink("curtoR.r")

Example output

Loading required package: XML
Loading required package: deSolve
$species
     index initialConcentrations boundaryConditions
PRPP  TRUE                  TRUE               TRUE
IMP   TRUE                  TRUE               TRUE
SAMP  TRUE                  TRUE               TRUE
ATP   TRUE                  TRUE               TRUE
SAM   TRUE                  TRUE               TRUE
Ade   TRUE                  TRUE               TRUE
XMP   TRUE                  TRUE               TRUE
GTP   TRUE                  TRUE               TRUE
dATP  TRUE                  TRUE               TRUE
dGTP  TRUE                  TRUE               TRUE
RNA   TRUE                  TRUE               TRUE
DNA   TRUE                  TRUE               TRUE
HX    TRUE                  TRUE               TRUE
Xa    TRUE                  TRUE               TRUE
Gua   TRUE                  TRUE               TRUE
UA    TRUE                  TRUE               TRUE
R5P   TRUE                  TRUE               TRUE
Pi    TRUE                  TRUE               TRUE

$reactions
       index Laws initialFluxes
ada     TRUE TRUE          TRUE
ade     TRUE TRUE          TRUE
adna    TRUE TRUE          TRUE
adrnr   TRUE TRUE          TRUE
ampd    TRUE TRUE          TRUE
aprt    TRUE TRUE          TRUE
arna    TRUE TRUE          TRUE
asuc    TRUE TRUE          TRUE
asli    TRUE TRUE          TRUE
dada    TRUE TRUE          TRUE
den     TRUE TRUE          TRUE
dgnuc   TRUE TRUE          TRUE
dnaa    TRUE TRUE          TRUE
dnag    TRUE TRUE          TRUE
gdna    TRUE TRUE          TRUE
gdrnr   TRUE TRUE          TRUE
gmpr    TRUE TRUE          TRUE
gmps    TRUE TRUE          TRUE
gnuc    TRUE TRUE          TRUE
gprt    TRUE TRUE          TRUE
grna    TRUE TRUE          TRUE
gua     TRUE TRUE          TRUE
hprt    TRUE TRUE          TRUE
hx      TRUE TRUE          TRUE
hxd     TRUE TRUE          TRUE
impd    TRUE TRUE          TRUE
inuc    TRUE TRUE          TRUE
mat     TRUE TRUE          TRUE
polyam  TRUE TRUE          TRUE
prpps   TRUE TRUE          TRUE
pyr     TRUE TRUE          TRUE
rnaa    TRUE TRUE          TRUE
rnag    TRUE TRUE          TRUE
trans   TRUE TRUE          TRUE
ua      TRUE TRUE          TRUE
x       TRUE TRUE          TRUE
xd      TRUE TRUE          TRUE

$nSpecies
[1] 18

$sIDs
 [1] "PRPP" "IMP"  "SAMP" "ATP"  "SAM"  "Ade"  "XMP"  "GTP"  "dATP" "dGTP"
[11] "RNA"  "DNA"  "HX"   "Xa"   "Gua"  "UA"   "R5P"  "Pi"  

$S0
       PRPP         IMP        SAMP         ATP         SAM         Ade 
5.01742e+00 9.82634e+01 1.98189e-01 2.47535e+03 3.99187e+00 9.84730e-01 
        XMP         GTP        dATP        dGTP         RNA         DNA 
2.47930e+01 4.10223e+02 6.01413e+00 3.02581e+00 2.86805e+04 5.17934e+03 
         HX          Xa         Gua          UA         R5P          Pi 
9.51785e+00 5.05941e+00 5.50638e+00 1.00293e+02 1.80000e+01 1.40000e+03 

$BC
 PRPP   IMP  SAMP   ATP   SAM   Ade   XMP   GTP  dATP  dGTP   RNA   DNA    HX 
FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE 
   Xa   Gua    UA   R5P    Pi 
FALSE FALSE FALSE  TRUE  TRUE 

$nStates
[1] 16

$y0
       PRPP         IMP        SAMP         ATP         SAM         Ade 
5.01742e+00 9.82634e+01 1.98189e-01 2.47535e+03 3.99187e+00 9.84730e-01 
        XMP         GTP        dATP        dGTP         RNA         DNA 
2.47930e+01 4.10223e+02 6.01413e+00 3.02581e+00 2.86805e+04 5.17934e+03 
         HX          Xa         Gua          UA 
9.51785e+00 5.05941e+00 5.50638e+00 1.00293e+02 

$nReactions
[1] 37

$rIDs
 [1] "ada"    "ade"    "adna"   "adrnr"  "ampd"   "aprt"   "arna"   "asuc"  
 [9] "asli"   "dada"   "den"    "dgnuc"  "dnaa"   "dnag"   "gdna"   "gdrnr" 
[17] "gmpr"   "gmps"   "gnuc"   "gprt"   "grna"   "gua"    "hprt"   "hx"    
[25] "hxd"    "impd"   "inuc"   "mat"    "polyam" "prpps"  "pyr"    "rnaa"  
[33] "rnag"   "trans"  "ua"     "x"      "xd"    

$rLaws
                                                                   ada 
                                                      "aada*ATP^fada4" 
                                                                   ade 
                                                      "aade*Ade^fade6" 
                                                                  adna 
                                      "aadna*dATP^fdnap9*dGTP^fdnap10" 
                                                                 adrnr 
                       "aadrnr*ATP^fadrnr4*dATP^fadrnr9*dGTP^fadrnr10" 
                                                                  ampd 
                              "aampd*ATP^fampd4*GTP^fampd8*Pi^fampd18" 
                                                                  aprt 
                             "aaprt*PRPP^faprt1*ATP^faprt4*Ade^faprt6" 
                                                                  arna 
                                         "aarna*ATP^frnap4*GTP^frnap8" 
                                                                  asuc 
                   "aasuc*IMP^fasuc2*ATP^fasuc4*GTP^fasuc8*Pi^fasuc18" 
                                                                  asli 
                                        "aasli*SAMP^fasli3*ATP^fasli4" 
                                                                  dada 
                                                   "adada*dATP^fdada9" 
                                                                   den 
             "aden*PRPP^fden1*IMP^fden2*ATP^fden4*GTP^fden8*Pi^fden18" 
                                                                 dgnuc 
                                                "adgnuc*dGTP^fdgnuc10" 
                                                                  dnaa 
                                                   "adnaa*DNA^fdnan12" 
                                                                  dnag 
                                                   "adnag*DNA^fdnan12" 
                                                                  gdna 
                                      "agdna*dATP^fdnap9*dGTP^fdnap10" 
                                                                 gdrnr 
                       "agdrnr*GTP^fgdrnr8*dATP^fgdrnr9*dGTP^fgdrnr10" 
                                                                  gmpr 
                   "agmpr*IMP^fgmpr2*ATP^fgmpr4*XMP^fgmpr7*GTP^fgmpr8" 
                                                                  gmps 
                                         "agmps*ATP^fgmps4*XMP^fgmps7" 
                                                                  gnuc 
                                         "agnuc*GTP^fgnuc8*Pi^fgnuc18" 
                                                                  gprt 
                            "agprt*PRPP^fgprt1*GTP^fgprt8*Gua^fgprt15" 
                                                                  grna 
                                         "agrna*ATP^frnap4*GTP^frnap8" 
                                                                   gua 
                                                     "agua*Gua^fgua15" 
                                                                  hprt 
                             "ahprt*PRPP^fhprt1*IMP^fhprt2*HX^fhprt13" 
                                                                    hx 
                                                        "ahx*HX^fhx13" 
                                                                   hxd 
                                                      "ahxd*HX^fhxd13" 
                                                                  impd 
                              "aimpd*IMP^fimpd2*XMP^fimpd7*GTP^fimpd8" 
                                                                  inuc 
                                         "ainuc*IMP^finuc2*Pi^finuc18" 
                                                                   mat 
                                            "amat*ATP^fmat4*SAM^fmat5" 
                                                                polyam 
                                                "apolyam*SAM^fpolyam5" 
                                                                 prpps 
"aprpps*PRPP^fprpps1*ATP^fprpps4*GTP^fprpps8*R5P^fprpps17*Pi^fprpps18" 
                                                                   pyr 
                                                     "apyr*PRPP^fpyr1" 
                                                                  rnaa 
                                                   "arnaa*RNA^frnan11" 
                                                                  rnag 
                                                   "arnag*RNA^frnan11" 
                                                                 trans 
                                                  "atrans*SAM^ftrans5" 
                                                                    ua 
                                                        "aua*UA^fua16" 
                                                                     x 
                                                          "ax*Xa^fx14" 
                                                                    xd 
                                                        "axd*Xa^fxd14" 

$V0
         ada          ade         adna        adrnr         ampd         aprt 
2.079467e+00 9.915724e-03 1.003826e+01 2.011595e-01 5.640728e+00 9.980753e-01 
        arna         asuc         asli         dada          den        dgnuc 
1.985621e+03 8.003186e+00 8.003185e+00 2.004510e-01 2.403008e+00 1.008502e-01 
        dnaa         dnag         gdna        gdrnr         gmpr         gmps 
1.003756e+01 6.826370e+00 6.825859e+00 1.003440e-01 5.138721e-01 1.595763e+00 
        gnuc         gprt         grna          gua         hprt           hx 
4.807078e+00 3.753642e+00 1.323532e+03 1.154277e+00 3.683827e+00 4.730928e-02 
         hxd         impd         inuc          mat       polyam        prpps 
1.191281e+00 1.595762e+00 2.642505e+00 1.498849e+01 1.007991e+00 2.088274e+01 
         pyr         rnaa         rnag        trans           ua            x 
1.004416e+01 1.985551e+03 1.323605e+03 1.398050e+01 2.314825e+00 3.071716e-02 
          xd 
2.314841e+00 

$globalVec
NULL

$incid
     [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14]
PRPP    0    0    0    0    0   -1    0    0    0     0    -1     0     0     0
IMP     0    0    0    0    1    0    0   -1    0     0     1     0     0     0
SAMP    0    0    0    0    0    0    0    1   -1     0     0     0     0     0
ATP    -1    0    0   -1   -1    1   -1    0    1     0     0     0     0     0
SAM     0    0    0    0    0    0    0    0    0     0     0     0     0     0
Ade     0   -1    0    0    0   -1    0    0    0     0     0     0     0     0
XMP     0    0    0    0    0    0    0    0    0     0     0     0     0     0
GTP     0    0    0    0    0    0    0    0    0     0     0     0     0     0
dATP    0    0   -1    1    0    0    0    0    0    -1     0     0     1     0
dGTP    0    0    0    0    0    0    0    0    0     0     0    -1     0     1
RNA     0    0    0    0    0    0    1    0    0     0     0     0     0     0
DNA     0    0    1    0    0    0    0    0    0     0     0     0    -1    -1
HX      1    0    0    0    0    0    0    0    0     1     0     0     0     0
Xa      0    0    0    0    0    0    0    0    0     0     0     0     0     0
Gua     0    0    0    0    0    0    0    0    0     0     0     1     0     0
UA      0    0    0    0    0    0    0    0    0     0     0     0     0     0
     [,15] [,16] [,17] [,18] [,19] [,20] [,21] [,22] [,23] [,24] [,25] [,26]
PRPP     0     0     0     0     0    -1     0     0    -1     0     0     0
IMP      0     0     1     0     0     0     0     0     1     0     0    -1
SAMP     0     0     0     0     0     0     0     0     0     0     0     0
ATP      0     0     0     0     0     0     0     0     0     0     0     0
SAM      0     0     0     0     0     0     0     0     0     0     0     0
Ade      0     0     0     0     0     0     0     0     0     0     0     0
XMP      0     0     0    -1     0     0     0     0     0     0     0     1
GTP      0    -1    -1     1    -1     1    -1     0     0     0     0     0
dATP     0     0     0     0     0     0     0     0     0     0     0     0
dGTP    -1     1     0     0     0     0     0     0     0     0     0     0
RNA      0     0     0     0     0     0     1     0     0     0     0     0
DNA      1     0     0     0     0     0     0     0     0     0     0     0
HX       0     0     0     0     0     0     0     0    -1    -1    -1     0
Xa       0     0     0     0     0     0     0     1     0     0     1     0
Gua      0     0     0     0     1    -1     0    -1     0     0     0     0
UA       0     0     0     0     0     0     0     0     0     0     0     0
     [,27] [,28] [,29] [,30] [,31] [,32] [,33] [,34] [,35] [,36] [,37]
PRPP     0     0     0     1    -1     0     0     0     0     0     0
IMP     -1     0     0     0     0     0     0     0     0     0     0
SAMP     0     0     0     0     0     0     0     0     0     0     0
ATP      0    -1     0     0     0     1     0     1     0     0     0
SAM      0     1    -1     0     0     0     0    -1     0     0     0
Ade      0     0     1     0     0     0     0     0     0     0     0
XMP      0     0     0     0     0     0     0     0     0     0     0
GTP      0     0     0     0     0     0     1     0     0     0     0
dATP     0     0     0     0     0     0     0     0     0     0     0
dGTP     0     0     0     0     0     0     0     0     0     0     0
RNA      0     0     0     0     0    -1    -1     0     0     0     0
DNA      0     0     0     0     0     0     0     0     0     0     0
HX       1     0     0     0     0     0     0     0     0     0     0
Xa       0     0     0     0     0     0     0     0     0    -1    -1
Gua      0     0     0     0     0     0     0     0     0     0     0
UA       0     0     0     0     0     0     0     0    -1     0     1

$nRules
[1] 0

$ruleIDs
NULL

$species
     index initialConcentrations boundaryConditions
PRPP     1           5.01742e+00              FALSE
IMP      2           9.82634e+01              FALSE
SAMP     3           1.98189e-01              FALSE
ATP      4           2.47535e+03              FALSE
SAM      5           3.99187e+00              FALSE
Ade      6           9.84730e-01              FALSE
XMP      7           2.47930e+01              FALSE
GTP      8           4.10223e+02              FALSE
dATP     9           6.01413e+00              FALSE
dGTP    10           3.02581e+00              FALSE
RNA     11           2.86805e+04              FALSE
DNA     12           5.17934e+03              FALSE
HX      13           9.51785e+00              FALSE
Xa      14           5.05941e+00              FALSE
Gua     15           5.50638e+00              FALSE
UA      16           1.00293e+02              FALSE
R5P     17           1.80000e+01               TRUE
Pi      18           1.40000e+03               TRUE

$reactions
       index
ada        1
ade        2
adna       3
adrnr      4
ampd       5
aprt       6
arna       7
asuc       8
asli       9
dada      10
den       11
dgnuc     12
dnaa      13
dnag      14
gdna      15
gdrnr     16
gmpr      17
gmps      18
gnuc      19
gprt      20
grna      21
gua       22
hprt      23
hx        24
hxd       25
impd      26
inuc      27
mat       28
polyam    29
prpps     30
pyr       31
rnaa      32
rnag      33
trans     34
ua        35
x         36
xd        37
                                                                       Laws
ada                                                          aada*ATP^fada4
ade                                                          aade*Ade^fade6
adna                                         aadna*dATP^fdnap9*dGTP^fdnap10
adrnr                         aadrnr*ATP^fadrnr4*dATP^fadrnr9*dGTP^fadrnr10
ampd                                 aampd*ATP^fampd4*GTP^fampd8*Pi^fampd18
aprt                                aaprt*PRPP^faprt1*ATP^faprt4*Ade^faprt6
arna                                            aarna*ATP^frnap4*GTP^frnap8
asuc                      aasuc*IMP^fasuc2*ATP^fasuc4*GTP^fasuc8*Pi^fasuc18
asli                                           aasli*SAMP^fasli3*ATP^fasli4
dada                                                      adada*dATP^fdada9
den                 aden*PRPP^fden1*IMP^fden2*ATP^fden4*GTP^fden8*Pi^fden18
dgnuc                                                  adgnuc*dGTP^fdgnuc10
dnaa                                                      adnaa*DNA^fdnan12
dnag                                                      adnag*DNA^fdnan12
gdna                                         agdna*dATP^fdnap9*dGTP^fdnap10
gdrnr                         agdrnr*GTP^fgdrnr8*dATP^fgdrnr9*dGTP^fgdrnr10
gmpr                      agmpr*IMP^fgmpr2*ATP^fgmpr4*XMP^fgmpr7*GTP^fgmpr8
gmps                                            agmps*ATP^fgmps4*XMP^fgmps7
gnuc                                            agnuc*GTP^fgnuc8*Pi^fgnuc18
gprt                               agprt*PRPP^fgprt1*GTP^fgprt8*Gua^fgprt15
grna                                            agrna*ATP^frnap4*GTP^frnap8
gua                                                         agua*Gua^fgua15
hprt                                ahprt*PRPP^fhprt1*IMP^fhprt2*HX^fhprt13
hx                                                             ahx*HX^fhx13
hxd                                                          ahxd*HX^fhxd13
impd                                 aimpd*IMP^fimpd2*XMP^fimpd7*GTP^fimpd8
inuc                                            ainuc*IMP^finuc2*Pi^finuc18
mat                                                amat*ATP^fmat4*SAM^fmat5
polyam                                                 apolyam*SAM^fpolyam5
prpps  aprpps*PRPP^fprpps1*ATP^fprpps4*GTP^fprpps8*R5P^fprpps17*Pi^fprpps18
pyr                                                         apyr*PRPP^fpyr1
rnaa                                                      arnaa*RNA^frnan11
rnag                                                      arnag*RNA^frnan11
trans                                                    atrans*SAM^ftrans5
ua                                                             aua*UA^fua16
x                                                                ax*Xa^fx14
xd                                                             axd*Xa^fxd14
       initialFluxes
ada     2.079467e+00
ade     9.915724e-03
adna    1.003826e+01
adrnr   2.011595e-01
ampd    5.640728e+00
aprt    9.980753e-01
arna    1.985621e+03
asuc    8.003186e+00
asli    8.003185e+00
dada    2.004510e-01
den     2.403008e+00
dgnuc   1.008502e-01
dnaa    1.003756e+01
dnag    6.826370e+00
gdna    6.825859e+00
gdrnr   1.003440e-01
gmpr    5.138721e-01
gmps    1.595763e+00
gnuc    4.807078e+00
gprt    3.753642e+00
grna    1.323532e+03
gua     1.154277e+00
hprt    3.683827e+00
hx      4.730928e-02
hxd     1.191281e+00
impd    1.595762e+00
inuc    2.642505e+00
mat     1.498849e+01
polyam  1.007991e+00
prpps   2.088274e+01
pyr     1.004416e+01
rnaa    1.985551e+03
rnag    1.323605e+03
trans   1.398050e+01
ua      2.314825e+00
x       3.071716e-02
xd      2.314841e+00

SBMLR documentation built on Nov. 8, 2020, 6:50 p.m.