Commit ac7da9a1 authored by Mayo Roettger's avatar Mayo Roettger
Browse files

removed Makevars and config.h. Version 3.1.0

parent af146e30
Package: sybilSBML
Type: Package
Title: SBML Integration in Package 'Sybil'
Version: 3.0.8
Date: 2020-03-10
Version: 3.1.0
Date: 2020-03-23
Authors@R: c(person("Mayo", "Roettger", role = "cre", email = "mayo.roettger@hhu.de"),
person("Gabriel", "Gelius-Dietrich", role = c("aut", "ctb")),
person(c("C.", "Jonathan"), "Fritzemeier", role = "ctb", email = "clausjonathan.fritzemeier@uni-duesseldorf.de"),
......@@ -17,7 +17,7 @@ License: GPL-3 | file LICENSE
LazyLoad: yes
Collate: generics.R sbmlPtrClass.R sbmlErrorClass.R sybilSBML.R
uglyHack.R readSBMLmod.R zzz.R
Packaged: 2020-03-10 09:00:00 UTC; mayo
Packaged: 2020-03-23 12:00:00 UTC; mayo
Author: Mayo Roettger [cre],
Gabriel Gelius-Dietrich [aut, ctb],
C. Jonathan Fritzemeier [ctb],
......
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for sybilSBML 3.0.8.
# Generated by GNU Autoconf 2.69 for sybilSBML 3.1.0.
#
# Report bugs to <mayo.roettger@hhu.de>.
#
......@@ -580,8 +580,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='sybilSBML'
PACKAGE_TARNAME='sybilsbml'
PACKAGE_VERSION='3.0.8'
PACKAGE_STRING='sybilSBML 3.0.8'
PACKAGE_VERSION='3.1.0'
PACKAGE_STRING='sybilSBML 3.1.0'
PACKAGE_BUGREPORT='mayo.roettger@hhu.de'
PACKAGE_URL=''
......@@ -623,6 +623,8 @@ ac_includes_default="\
ac_subst_vars='LTLIBOBJS
LIBOBJS
HAVE_FBC_PLUGIN
HAVE_GROUPS_PLUGIN
PKG_CPPFLAGS
PKG_LIBS
PKG_CFLAGS
......@@ -1241,7 +1243,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures sybilSBML 3.0.8 to adapt to many kinds of systems.
\`configure' configures sybilSBML 3.1.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
......@@ -1303,7 +1305,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of sybilSBML 3.0.8:";;
short | recursive ) echo "Configuration of sybilSBML 3.1.0:";;
esac
cat <<\_ACEOF
......@@ -1390,7 +1392,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
sybilSBML configure 3.0.8
sybilSBML configure 3.1.0
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
......@@ -1759,7 +1761,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by sybilSBML $as_me 3.0.8, which was
It was created by sybilSBML $as_me 3.1.0, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
......@@ -2108,6 +2110,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
ac_config_headers="$ac_config_headers src/config.h"
......@@ -3050,11 +3056,6 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
ac_config_headers="$ac_config_headers src/config.h"
ARGS_OK="FALSE"
if test -n "$PKG_CPPFLAGS" -a -n "$PKG_LIBS" ; then
......@@ -3741,7 +3742,11 @@ done
ac_config_files="$ac_config_files src/Makevars"
ac_config_files="$ac_config_files src/Makevars.tmp:src/Makevars.in"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
......@@ -4249,7 +4254,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by sybilSBML $as_me 3.0.8, which was
This file was extended by sybilSBML $as_me 3.1.0, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
......@@ -4311,7 +4316,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
sybilSBML config.status 3.0.8
sybilSBML config.status 3.1.0
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
......@@ -4433,7 +4438,7 @@ for ac_config_target in $ac_config_targets
do
case $ac_config_target in
"src/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/config.h" ;;
"src/Makevars") CONFIG_FILES="$CONFIG_FILES src/Makevars" ;;
"src/Makevars.tmp") CONFIG_FILES="$CONFIG_FILES src/Makevars.tmp:src/Makevars.in" ;;
*) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
esac
......@@ -4979,6 +4984,24 @@ $as_echo "$as_me: $ac_file is unchanged" >&6;}
esac
case $ac_file$ac_mode in
"src/Makevars.tmp":F)
if test -f src/Makevars && cmp -s src/Makevars.tmp src/Makevars; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: creating src/Makevars" >&5
$as_echo "$as_me: creating src/Makevars" >&6;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: src/Makevars is unchanged" >&5
$as_echo "$as_me: src/Makevars is unchanged" >&6;}
rm src/Makevars.tmp
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: creating src/Makevars" >&5
$as_echo "$as_me: creating src/Makevars" >&6;}
mv src/Makevars.tmp src/Makevars
fi
;;
esac
done # for ac_tag
......
AC_INIT([sybilSBML], [3.0.8], [mayo.roettger@hhu.de])
AC_INIT([sybilSBML], [3.1.0], [mayo.roettger@hhu.de])
dnl # --------------------------------------------------------------------
dnl # template config.h.in
dnl # --------------------------------------------------------------------
AC_CONFIG_HEADERS([src/config.h])
dnl # --------------------------------------------------------------------
dnl # global (environment) variables
......@@ -28,13 +34,6 @@ AC_PROG_CC
AC_PROG_CPP
dnl # --------------------------------------------------------------------
dnl # template config.h.in
dnl # --------------------------------------------------------------------
AC_CONFIG_HEADERS([src/config.h])
dnl # --------------------------------------------------------------------
dnl # test for global variables
dnl # --------------------------------------------------------------------
......@@ -280,6 +279,21 @@ dnl # --------------------------------------------------------------------
AC_SUBST(PKG_CFLAGS)
AC_SUBST(PKG_LIBS)
AC_SUBST(PKG_CPPFLAGS)
AC_OUTPUT(src/Makevars)
AC_SUBST(HAVE_GROUPS_PLUGIN)
AC_SUBST(HAVE_FBC_PLUGIN)
AC_CONFIG_FILES([src/Makevars.tmp:src/Makevars.in], [
if test -f src/Makevars && cmp -s src/Makevars.tmp src/Makevars; then
AC_MSG_NOTICE([creating src/Makevars])
AC_MSG_NOTICE([src/Makevars is unchanged])
rm src/Makevars.tmp
else
AC_MSG_NOTICE([creating src/Makevars])
mv src/Makevars.tmp src/Makevars
fi
]
)
AC_OUTPUT
exit 0
......@@ -80,4 +80,7 @@ all: $(SHLIB)
with the environment variable LIB_SBML being the installation directory
of libSBML.
If you want to build the package with libSBML FBC and Groups plugins functionality,
please exchange the the first row in the Makevars.win file in src/ into
PKG_CPPFLAGS= -D_R_=1 -DUSE_R=1 -DHAVE_FBC_PLUGIN=1 -DHAVE_GROUPS_PLUGIN=1 -I"$(LIB_SBML)/include"
......@@ -6,7 +6,7 @@
\newcommand{\CRANpkg}{\href{https://cran.r-project.org/package=#1}{\pkg{#1}}}
% ---------------------------------------------------------------------------- %
\section{Changes in version 3.0.4 - 3.0.8 2020-03-10}{
\section{Changes in version 3.0.4 - 3.1.0 2020-03-23}{
\itemize{
\item Maintainer change.
\item Changes to be able to build package without libSBML FBC and Groups
......
PKG_CFLAGS=
PKG_CPPFLAGS=-I/usr/include -I/usr/local/include -I/usr/include/sbml -I/usr/local/include/sbml
PKG_LIBS= -L/usr/local/lib -L/usr/lib -L/usr/lib64 -lsbml
\ No newline at end of file
PKG_CFLAGS=@PKG_CFLAGS@
PKG_CPPFLAGS=@PKG_CPPFLAGS@
PKG_CPPFLAGS=@DEFS@ @PKG_CPPFLAGS@
PKG_LIBS=@PKG_LIBS@
/* src/config.h. Generated from config.h.in by configure. */
/* src/config.h.in. Generated from configure.ac by autoheader. */
/* Define to 1 if you have the `FbcReactionPlugin_getLowerFluxBound' function.
*/
#define HAVE_FBCREACTIONPLUGIN_GETLOWERFLUXBOUND 1
/* define if FBC plugin is available */
#define HAVE_FBC_PLUGIN 1
/* Define to 1 if you have the `GeneProductAssociation_setAssociation'
function. */
#define HAVE_GENEPRODUCTASSOCIATION_SETASSOCIATION 1
/* define if Groups plugin is available */
#define HAVE_GROUPS_PLUGIN 1
/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1
/* Define to 1 if you have the `sbml' library (-lsbml). */
#define HAVE_LIBSBML 1
/* Define to 1 if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1
/* Define to 1 if you have the `SBase_getPlugin' function. */
#define HAVE_SBASE_GETPLUGIN 1
/* Define to 1 if you have the `SBMLExtensionRegistry_getRegisteredPackages'
function. */
#define HAVE_SBMLEXTENSIONREGISTRY_GETREGISTEREDPACKAGES 1
/* Define to 1 if you have the <sbml/packages/fbc/common/FbcExtensionTypes.h>
header file. */
#define HAVE_SBML_PACKAGES_FBC_COMMON_FBCEXTENSIONTYPES_H 1
/* Define to 1 if you have the
<sbml/packages/groups/common/GroupsExtensionTypes.h> header file. */
#define HAVE_SBML_PACKAGES_GROUPS_COMMON_GROUPSEXTENSIONTYPES_H 1
/* Define to 1 if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1
/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
/* Define to 1 if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1
/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1
/* Define to 1 if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1
/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1
/* Define to 1 if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT "mayo.roettger@hhu.de"
/* Define to the full name of this package. */
#define PACKAGE_NAME "sybilSBML"
/* Define to the full name and version of this package. */
#define PACKAGE_STRING "sybilSBML 3.0.6"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "sybilsbml"
/* Define to the home page for this package. */
#define PACKAGE_URL ""
/* Define to the version of this package. */
#define PACKAGE_VERSION "3.0.6"
/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1
......@@ -21,7 +21,9 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with sybilSBML. If not, see <http://www.gnu.org/licenses/>.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif /* HAVE_CONFIG_H */
#include "sybilSBML.h"
......@@ -397,7 +399,7 @@ SEXP getSBMLFbcversion(SEXP sbmldoc) {
unsigned int version;
checkDocument(sbmldoc);
//hierher
SBasePlugin_t * modelPlug= NULL;
modelPlug = SBase_getPlugin((SBase_t *)(R_ExternalPtrAddr(sbmldoc)), "fbc");
if( modelPlug != NULL)
......@@ -1284,17 +1286,17 @@ SEXP getSBMLReactionsList(SEXP sbmlmod) {
int objcount=0;
int annocount=0;
int notescount=0;
#ifdef HAVE_FBC_PLUGIN
/* Help Var for Fbc Objective*/
double Objcoeff = 0;
const char* Objreaction = NULL;
char* objActiv = NULL;
int fbcversion = 0;
SBasePlugin_t * modelPlug= NULL;
#ifdef HAVE_FBC_PLUGIN
/* FBC OBJECTIV @Ardalan*/
Objective_t * objective = NULL;
FluxObjective_t * fluxObjective = NULL;
......@@ -2156,147 +2158,148 @@ SEXP exportSBML (SEXP version, SEXP level, SEXP FbcLevel, SEXP filename, SEXP sy
if( i+1 == INTEGER(ex_react)[k])
isexchange=1;
int j=0;
for (j=0; j<LENGTH(met_id); j++)
int j=0;
for (j=0; j<LENGTH(met_id); j++)
{
int hash = LENGTH(met_id) * i + j;
if (REAL(SMatrix)[hash] != 0.00 )
{
int hash = LENGTH(met_id) * i + j;
if (REAL(SMatrix)[hash] != 0.00 )
if(REAL(SMatrix)[hash] < 0.00)
{
spr = Reaction_createReactant(reaction);
SpeciesReference_setConstant(spr, 1);
SpeciesReference_setSpecies(spr,CHAR(STRING_ELT(met_id, j)));
SpeciesReference_setStoichiometry(spr, fabs(REAL(SMatrix)[hash]));
if(REAL(SMatrix)[hash] < 0.00)
//is Exchange Reaction
if(isexchange==1 && !Rf_isNull(ex_react))
{
spr = Reaction_createReactant(reaction);
SpeciesReference_setConstant(spr, 1);
SpeciesReference_setSpecies(spr,CHAR(STRING_ELT(met_id, j)));
SpeciesReference_setStoichiometry(spr, fabs(REAL(SMatrix)[hash]));
/* Create boundary Species */
sp = Model_createSpecies(model);
//is Exchange Reaction
if(isexchange==1 && !Rf_isNull(ex_react))
{
/* Create boundary Species */
sp = Model_createSpecies(model);
Species_setId(sp, append_strings(CHAR(STRING_ELT(met_id, j)),"BOUNDARY","_") );
Species_setName(sp,append_strings(CHAR(STRING_ELT(met_name, j)),"BOUNDARY"," ") );
Species_setCompartment(sp,"BOUNDARY");
Species_setHasOnlySubstanceUnits(sp, 0);
Species_setBoundaryCondition(sp, 1);
Species_setConstant(sp, 1);
/* Add boundary Species as Product */
spr = Reaction_createProduct(reaction);
SpeciesReference_setSpecies(spr,append_strings(CHAR(STRING_ELT(met_id, j)),"BOUNDARY","_") );
SpeciesReference_setStoichiometry(spr,1);
SpeciesReference_setConstant(spr, 1);
}
Species_setId(sp, append_strings(CHAR(STRING_ELT(met_id, j)),"BOUNDARY","_") );
Species_setName(sp,append_strings(CHAR(STRING_ELT(met_name, j)),"BOUNDARY"," ") );
Species_setCompartment(sp,"BOUNDARY");
Species_setHasOnlySubstanceUnits(sp, 0);
Species_setBoundaryCondition(sp, 1);
Species_setConstant(sp, 1);
}else{
/* Add boundary Species as Product */
spr = Reaction_createProduct(reaction);
SpeciesReference_setSpecies(spr,append_strings(CHAR(STRING_ELT(met_id, j)),"BOUNDARY","_") );
SpeciesReference_setStoichiometry(spr,1);
SpeciesReference_setConstant(spr, 1);
SpeciesReference_setSpecies(spr,CHAR(STRING_ELT(met_id, j)));
SpeciesReference_setStoichiometry(spr, fabs(REAL(SMatrix)[hash]));
}
}else{
spr = Reaction_createProduct(reaction);
SpeciesReference_setConstant(spr, 1);
SpeciesReference_setSpecies(spr,CHAR(STRING_ELT(met_id, j)));
SpeciesReference_setStoichiometry(spr, fabs(REAL(SMatrix)[hash]));
}
}
}
}
}
/*Annotation*/
if (!Rf_isNull(react_anno) && Rf_length(react_anno) > 1 )
{ char *Manno = (char*) CHAR(STRING_ELT(react_anno, i));
if((Manno != NULL) && (Manno[0] != '\0' ))
{
SBase_setMetaId((SBase_t*)reaction, CHAR(STRING_ELT(react_id, i)));
char Mannocopy[strlen(Manno)+1];
strcpy(Mannocopy,Manno);
// PARSING
ParseModtoAnno((SBase_t*)reaction, Mannocopy);
}
/*Annotation*/
if (!Rf_isNull(react_anno) && Rf_length(react_anno) > 1 )
{
char *Manno = (char*) CHAR(STRING_ELT(react_anno, i));
if((Manno != NULL) && (Manno[0] != '\0' ))
{
SBase_setMetaId((SBase_t*)reaction, CHAR(STRING_ELT(react_id, i)));
char Mannocopy[strlen(Manno)+1];
strcpy(Mannocopy,Manno);
// PARSING
ParseModtoAnno((SBase_t*)reaction, Mannocopy);
}
}
/* FBC LEVEL 2 */
if(SBMLfbcversion == 2)
{
// Get a SBasePlugin_t object plugged in the reaction object.
reactionPlug = SBase_getPlugin((SBase_t *)(reaction), "fbc");
const char* para_lb;
const char* para_ub;
/* FBC LEVEL 2 */
if(SBMLfbcversion == 2)
{
// Get a SBasePlugin_t object plugged in the reaction object.
reactionPlug = SBase_getPlugin((SBase_t *)(reaction), "fbc");
//default Parameter or new one
if (lower_bnd[i]<= sybilmin)
{
para_lb="default_lb";
}
else if (lower_bnd[i] == 0)
{
para_lb="default_0";
}
else
{ //creacte Lower_bound Paramater
para = Model_createParameter(model);
Parameter_setId(para, append_strings(CHAR(STRING_ELT(react_id, i)),"lower_bound","_"));
Parameter_setConstant(para, 1);
Parameter_setValue(para, lower_bnd[i]);
SBase_setSBOTerm((SBase_t *)para,625);
const char* para_lb;
const char* para_ub;
para_lb=append_strings(CHAR(STRING_ELT(react_id, i)),"lower_bound","_");
//default Parameter or new one
if (lower_bnd[i]<= sybilmin)
{
para_lb="default_lb";
}
else if (lower_bnd[i] == 0)
{
para_lb="default_0";
}
else
{ //creacte Lower_bound Paramater
para = Model_createParameter(model);
Parameter_setId(para, append_strings(CHAR(STRING_ELT(react_id, i)),"lower_bound","_"));
Parameter_setConstant(para, 1);
Parameter_setValue(para, lower_bnd[i]);
SBase_setSBOTerm((SBase_t *)para,625);
para_lb=append_strings(CHAR(STRING_ELT(react_id, i)),"lower_bound","_");
}
}
if (upper_bnd[i] >= sybilmax)
{
para_ub="default_ub";
}
else if (upper_bnd[i] == 0)
{
para_ub="default_0";
}
else
{
//creacte upper_bound Paramater
para = Model_createParameter(model);
Parameter_setId(para, append_strings(CHAR(STRING_ELT(react_id, i)),"upper_bound","_"));
Parameter_setConstant(para, 1);
Parameter_setValue(para, upper_bnd[i]);
SBase_setSBOTerm((SBase_t *)para,625);
if (upper_bnd[i] >= sybilmax)
{
para_ub="default_ub";
}
para_ub=append_strings(CHAR(STRING_ELT(react_id, i)),"upper_bound","_");
}
// set the flux bounds for this reaction
FbcReactionPlugin_setLowerFluxBound(reactionPlug, para_lb);
FbcReactionPlugin_setUpperFluxBound(reactionPlug, para_ub);
// OBJECTIVES
if (INTEGER(obj_coef)[i]!=0)
{
objective = Objective_create(3, 1, 2);
Objective_setId(objective, "obj");
Objective_setType(objective, "maximize");
else if (upper_bnd[i] == 0)
{
para_ub="default_0";
}
fluxObjective = Objective_createFluxObjective(objective);
FluxObjective_setReaction(fluxObjective, CHAR(STRING_ELT(react_id, i)));
FluxObjective_setCoefficient(fluxObjective, INTEGER(obj_coef)[i]);
else
{
//creacte upper_bound Paramater
para = Model_createParameter(model);
Parameter_setId(para, append_strings(CHAR(STRING_ELT(react_id, i)),"upper_bound","_"));
Parameter_setConstant(para, 1);
Parameter_setValue(para, upper_bnd[i]);
SBase_setSBOTerm((SBase_t *)para,625);
para_ub=append_strings(CHAR(STRING_ELT(react_id, i)),"upper_bound","_");
}
FbcModelPlugin_addObjective(modelPlug, objective);
// set the flux bounds for this reaction
FbcReactionPlugin_setLowerFluxBound(reactionPlug, para_lb);
FbcReactionPlugin_setUpperFluxBound(reactionPlug, para_ub);
// mark obj1 as active objective
FbcModelPlugin_setActiveObjectiveId(modelPlug, "obj");
// OBJECTIVES
if (INTEGER(obj_coef)[i]!=0)
{
objective = Objective_create(3, 1, 2);
Objective_setId(objective, "obj");
Objective_setType(objective, "maximize");
fluxObjective = Objective_createFluxObjective(objective);
FluxObjective_setReaction(fluxObjective, CHAR(STRING_ELT(react_id, i)));
FluxObjective_setCoefficient(fluxObjective, INTEGER(obj_coef)[i]);
FbcModelPlugin_addObjective(modelPlug, objective);
// mark obj1 as active objective
FbcModelPlugin_setActiveObjectiveId(modelPlug, "obj");
}
}
}
}