Today's Posts (OFF) | Unanswered Posts (ON)

| Forum: jsbml-development |
|---|
| Topic: On-line SBML Validator |
|---|
Posts: 413
Registered: May 2004
|
|
| | Topic: New branch created |
|---|
Posts: 307
Location: Cambridge UK
Registered: February 2005
|
|
New branch created
|
20 Nov '09 08:17
|
 |
|
Just to inform you that we created a new branch with marine to allow her
to work on the XML parser and the framework to support level 3.
Nico
____________________________________________________________
To manage your jsbml-development list subscription, visit
https://utils.its.caltech.edu/mailman/listinfo/jsbml-development
For a web interface to the jsbml-development mailing list, visit
http://sbml.org/Forums/
For questions or feedback about the jsbml-development list,
contact sbml-team@caltech.edu
|
|
| | Topic: (no subject) |
|---|
Posts: 273
Registered: June 2006
|
|
(no subject)
|
23 Feb '10 10:50
|
 |
|
Dear all,
We played around with the SBMLWriter class in JSBML and recognized
some problems when writing notes elements.
The SBML specification 2.4 says that one can add XHTML formatted notes
in two ways. First, each element can get the in-fix "xhtml:" within
the regular HTML tag. Second, the body element may declare the XHTML
name space.
In our test, only the second form worked. Furthermore, it is a bit
unhandy if the user is required to declare the body tag. I think it
would be very convenient to check the notes for "<xhtml:" or
"</xhtml:" pre-fixes and to set the body tag as required if this is
missing.
Finally, we recognized several problems with Annotation. It is not
possible to add CVTerms without explicitly creating an Annotation
object first. To this end, we created a dummy Annotation by calling
the constructor with an empty String and then we HAD to call the
method setAbout("") for this Annotation object. Without an explicit
call of setAbout, even with an empty String, the Writer always crashed
with a NullPointerException because there is a call of getAbout()
somewhere. In my opinion, the user of JSBML shouldn't have to care
about whether or not there is already an Annotation object because the
first time, any annotation element is added, an Annotation object
should be initialized. With this trick we were able to write SBML into
a file. However, the result was that the file contained many tags such
as <none>...</none>. Maybe the result of our call to setAbout(""). In
libSBML it was not necessary to set an about element. However, I
cannot find any occurence of "<none>" in any JSBML class.
And, what confuses people when using JSBML are constructors and
model.create*() methods that do not require arguments that are
actually obligatory. For instance, it is possible to create a
Compartment without setting an ID. This leads to errors in places
where people don't expect that the missing ID is actually the reason.
What happens is, that for instance a species that refers to the
compartment without an ID causes a NullPointerException when trying to
getCompartmentInstance() because this calls getModel().getCompartment().
After writing SBML and removing the <none>...</none> elements, the
SBML validator still showed many errors, for instance, " the element
'species' is not part of the definition of SBML". The reason is that
the Writer does not insert <listOf*>... </listOf*> tags surrounding
compartments, species, etc. Furthermore, it writes "spatialDimension"
and forgets the plural "s". In case of our compartment, there was
neither a notes nor an annotation element. But still the writer
creates an opening and a closing compartment tag. The validator does
in this case, however, only accept a compartment element that ends
with "/>".
There are several other errors but I think this is enough for just one e-mail.
It would also be nice to indent the SBML output so that it becomes
better human-readable.
I think there is still a lot of work ahead of us ;-)
Cheers
Andreas
Dipl.-Bioinform. Andreas Dräger
Eberhard Karls University Tübingen
Center for Bioinformatics (ZBIT)
Sand 1
72076 Tübingen
Germany
Phone: +49-7071-29-70436
Fax: +49-7071-29-5091
____________________________________________________________
To manage your jsbml-development list subscription, visit
https://utils.its.caltech.edu/mailman/listinfo/jsbml-development
For a web interface to the jsbml-development mailing list, visit
http://sbml.org/Forums/
For questions or feedback about the jsbml-development list,
contact sbml-team@caltech.edu
|
|
| | Topic: Complete type hierarchy |
|---|
Posts: 273
Registered: June 2006
|
|
Complete type hierarchy
|
20 Apr '10 17:14
|
 |
|
Dear all,
it is not so easy to keep the overview, but I think the attached figure
really covers the complete type hierarchy. Last time I forgot to add the
arrow from MathContainer to AbstractSBase and also
ModifierSpeciesReference. Both is now included. Please also see
http://yuml.me/diagram/scruffy/class/[<<SBase>>]^-.-[<<NamedSBase>>],
[<<SBase>>]^-.-[<<SBaseWithDerivedUnit>>],
[<<SBaseWithDerivedUnit>>]^-.-[MathContainer],
[<<SBaseWithDerivedUnit>>]^-.-[Reaction],
[<<NamedSBase>>]^-.-[<<Quantity>>],
[<<SBaseWithDerivedUnit>>]^-.-[<<Quantity>>],
[MathContainer]^-[FunctionDefinition],
[<<NamedSBase>>]^-.-[FunctionDefinition], [MathContainer]^-[KineticLaw],
[<<SBase>>]^-.-[AbstractSBase], [AbstractSBase]^-[AbstractNamedSBase],
[<<NamedSBase>>]^-.-[AbstractNamedSBase],
[AbstractNamedSBase]^-[Reaction], [AbstractSBase]^-[ListOf],
[AbstractSBase]^-[SBMLDocument], [AbstractSBase]^-[Unit],
[AbstractSBase]^-[MathContainer], [MathContainer]^-[Constraint],
[MathContainer]^-[Delay], [MathContainer]^-[EventAssignment],
[MathContainer]^-[InitialAssignment], [MathContainer]^-[KineticLaw],
[MathContainer]^-[Rule], [MathContainer]^-[StoichiometryMath],
[MathContainer]^-[Trigger], [Rule]^-[AlgebraicRule],
[Rule]^-[AssignmentRule], [Rule]^-[RateRule],
[AbstractNamedSBase]^-[CompartmentType], [AbstractNamedSBase]^-[Event],
[AbstractNamedSBase]^-[Model],
[AbstractNamedSBase]^-[SimpleSpeciesReference],
[AbstractNamedSBase]^-[SpeciesType],
[AbstractNamedSBase]^-[UnitDefinition],
[SimpleSpeciesReference]^-[SpeciesReference],
[SimpleSpeciesReference]^-[ModifierSpeciesReference],
[<<Quantity>>]^-.-[QuantityWithDefinedUnit],
[<<Quantity>>]^-.-[<<Variable>>], [<<Variable>>]^-.-[Symbol],
[QuantityWithDefinedUnit]^-[Symbol], [Symbol]^-[Compartment],
[Symbol]^-[Species], [Symbol]^-[Parameter],
[<<Variable>>]^-.-[SpeciesReference],
[QuantityWithDefinedUnit]^-[LocalParameter],
[AbstractNamedSBase]^-[QuantityWithDefinedUnit].
Cheers
Andreas
--
Dipl.-Bioinform. Andreas Dräger
Eberhard Karls University Tübingen
Center for Bioinformatics (ZBIT)
Sand 1
72076 Tübingen
Germany
Phone: +49-7071-29-70436
Fax: +49-7071-29-5091
|
|
| | Topic: MathMLParser |
|---|
Posts: 273
Registered: June 2006
|
|
MathMLParser
|
13 May '10 21:58
|
 |
|
Dear all,
Currently, I am looking at the writing methods of JSBML. There I noticed
that currently, JSBML does not produce a nice indent as it is done in
libSBML. I just play around a little bit and try to improve this. Maybe
you have some idea about how to solve this?
Another question to this is, that Level and Version of An SBML document
can be undefined. What will happen in this case? Will we simply create
invalid SBML files? From my perspective, it would be much better to
throw an exception in such a situation. Otherwise users will have the
impression, everything is correct but then they will not be able to work
with their files.
The last thing I would like to mention is about the MathMLParser. I know
that it is not yet implemented. But, I would like to draw your attention
to the interface ASTNodeCompiler. This has already been implemented for
the TextEquation and also LaTeX export (both has to be improved but
should at least run). The ASTNodeCompiler recursively evaluates the
content of an abstract syntax tree. The same thing is necessary when
writing its content to an SBML file. Actually, what we simply have to do
is to implement the interface ASTNodeCompiler also for MathML export.
Should the class MathMLParser implement this interface? Or should we
implement another class for this purpose that is used by MathMLParser?
I am writing this e-mail just to make sure everybody knows about the
ASTNodeCompiler and to avoid that the same recursive function will be
implemented again.
Cheers
Andreas
--
Dipl.-Bioinform. Andreas Dräger
Eberhard Karls University Tübingen
Center for Bioinformatics (ZBIT)
Sand 1
72076 Tübingen
Germany
Phone: +49-7071-29-70436
Fax: +49-7071-29-5091
____________________________________________________________
To manage your jsbml-development list subscription, visit
https://utils.its.caltech.edu/mailman/listinfo/jsbml-development
For a web interface to the jsbml-development mailing list, visit
http://sbml.org/Forums/
For questions or feedback about the jsbml-development list,
contact sbml-team@caltech.edu
|
|
| | Topic: initDefaults |
|---|
Posts: 273
Registered: June 2006
|
|
initDefaults
|
10 Aug '10 06:23
|
 |
|
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Dear all,
I just noticed that we have different opinions about what the method
initDefaults() in some classes should do. My opinion is that it always
knows what to do depending on the level and version properties. If, for
instance, neither level nor version are set, initDefaults will perform
the correct operations to set some elements to null and some isSet*
fields to false. If, however, level and/or version are set,
initDefaults() will also know how to initialize all fields of the
respective element for the given L/V combination.
In case of reactions I noticed that suddenly the empty constructor does
not call the initDefaults() method anymore, irrespective of that we
already agreed that ListOf* objects should always be initialized to
avoid the following source of unnecessary NullPointerExceptions:
Reaction r = new Reaction();
r.getListOfModifiers().size();
will throw a NullPointerException instead of returning 0.
InitDefaults() should be used to decide what to do if neither level nor
version is set. Instead of the current implementation
public void initDefaults() {
if (isSetLevel() && isSetVersion()) {
if (level < 3) {
reversible = new Boolean(true);
fast = new Boolean(false);
} else {
reversible = fast = null;
}
initReactantList();
initProductList();
initModifierList();
}
}
it should read
public void initDefaults() {
initReactantList();
initProductList();
initModifierList();
if (isSetLevel() && isSetVersion()) {
if (level < 3) {
reversible = new Boolean(true);
fast = new Boolean(false);
} else {
reversible = fast = null;
}
} else {
reversible = fast = null;
isSetReversible = isSetFast = false;
}
}
It should be totally secure to always call initDefaults(), which will
reset the object to the correct values for the given L/V combination. It
is particularly important to have this method because we have so many
differen constructors and can sometimes not call one constructor from
another one.
For instance,
public Reaction(int level, int version) {
super(level, version);
initDefaults();
}
and
public Reaction() {
super();
// Cannot call initDefaults() until the level and version is set
// initDefaults();
}
- -> Actually, the first constructor should call the second one before
calling the super constructor, but we cannot do this. Hence, we need
initDefaults to initialize all objects.
Cheers
Andreas
- --
Dipl.-Bioinform. Andreas Dräger
Eberhard Karls University Tübingen
Center for Bioinformatics (ZBIT)
Sand 1
72076 Tübingen
Germany
Phone: +49-7071-29-70436
Fax: +49-7071-29-5091
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iQEcBAEBAgAGBQJMYVLTAAoJEGvTRw2gArT9FkMH/jUOu8jAbtuIaCc2MNZNV82Z
cltkTKjqIGjmDjfkY8pQaDkNFvW6QKUYrbn812eA1fuJxuHh1FRfc9BjaAy+Y0dE
w1WHDwfpdcieDpogWGU8FWGKrkYfqyd/inOxO8uAiMcm/yu56s9jk8xun97Ri82N
XVJBEDPV5UCiAxQZ7eFQlSYpONnxBDCiHZW/8J/qI48444ay4T8xSWSH5By3Y8gq
hrkOEOUdGzGY1QRRwTKMkwJA1IvUtMhbEZwqsQOokIMdUnEvDHEgnhmUuHVguD8X
gK1YMIw2dlLKSi+Gqvxroc4jTZZ8jsVeyMQZv//FUFYJIhFTEtTQhOKgdixZDWY=
=/bZm
-----END PGP SIGNATURE-----
____________________________________________________________
To manage your jsbml-development list subscription, visit
https://utils.its.caltech.edu/mailman/listinfo/jsbml-development
For a web interface to the jsbml-development mailing list, visit
http://sbml.org/Forums/
For questions or feedback about the jsbml-development list,
contact sbml-team@caltech.edu
|
|
| | Topic: Survey for selecting JSBML logo |
|---|
Posts: 961
Registered: October 2003
|
|
Survey for selecting JSBML logo
|
17 Sep '10 08:37
|
 |
|
Hello SBML enthusiasts and developers,
The JSBML project has been trying to choose a logo. It is
time to get more opinions and put things to a vote. Here's
a survey for this purpose:
http://www.surveymonkey.com/s/choosing-jsbml-logo
The deadline is midnight, Sep. 22 (in your timezone).
Please help the project by rating the different logo
options. You can give them values from 1 to 10, with 10
being the highest/best score. You do not have to rate every
one, and you do not have to use a rating only once. (So,
for example, if you like 2 choices equally, you can give
them the same rating.)
The winning logo will be the one that gets the highest mean
rating from among all the votes cast.
Thanks for your help,
MH (on behalf of JSBML)
____________________________________________________________
To manage your jsbml-development list subscription, visit
https://utils.its.caltech.edu/mailman/listinfo/jsbml-development
For a web interface to the jsbml-development mailing list, visit
http://sbml.org/Forums/
For questions or feedback about the jsbml-development list,
contact sbml-team@caltech.edu
|
|
| | Topic: Yet another abstract super class |
|---|
Posts: 273
Registered: June 2006
|
|
Yet another abstract super class
|
21 Oct '10 03:20
|
 |
|
Dear all,
When starting the JSBML project it was one of our goals to introduce
common super types whenever elements share some common properties. Just
now we noticed that InitialAssignment, EventAssignment, and ExplicitRule
share a pointer to some variable field. I would therefore like to
introduce a new abstract data type Assignment as super type for all
these elements. However, as ExplicitRule has already an abstract class
as super type, the class Rule should become an interface. To make sure,
Rule is a MathContainer, we should therefore also introduce a new
abstract class AbstractMathContainer and change MathContainer to an
interface as the supertype of Rule. Assignment would then also extend
AbstractMathContainer and would serve as super type for all those
elements that assign the result of a mathematical expression to some
variable. What do you think?
Cheers
Andreas
--
Dipl.-Bioinform. Andreas Dräger
Eberhard Karls University Tübingen
Center for Bioinformatics (ZBIT)
Sand 1
72076 Tübingen
Germany
Phone: +49-7071-29-70436
Fax: +49-7071-29-5091
____________________________________________________________
To manage your jsbml-development list subscription, visit
https://utils.its.caltech.edu/mailman/listinfo/jsbml-development
For a web interface to the jsbml-development mailing list, visit
http://sbml.org/Forums/
For questions or feedback about the jsbml-development list,
contact sbml-team@caltech.edu
|
|
| | Topic: Re: problem loading SBML input with current version from trunk |
|---|
Posts: 307
Location: Cambridge UK
Registered: February 2005
|
|
Re: problem loading SBML input with current version from trunk
|
15 Nov '10 04:51
|
 |
|
Hi Paulo,
On 11/12/2010 04:54 PM, Paulo Maia wrote:
> Hi Nicolas,
>
> I was unsure wether to submit a bug report for this or not...
>
> I was trying to create an SBML loader for OptFlux using your current
> implementation of JSBML since, to my knowledge, MathML support is now
> available.
>
Yes, it is.
> The problem I'm having is still before the actual xml parsing begins:
>
> Exception in thread "main" java.lang.NullPointerException
> at java.util.Properties.loadFromXML(Properties.java:851)
> at
> org.sbml.jsbml.xml.stax.SBMLReader.initializePackageParserNamespaces(SBMLReader.java:242)
> at
> org.sbml.jsbml.xml.stax.SBMLReader.getInitializedPackageParsers(SBMLReader.java:145)
> at
> org.sbml.jsbml.xml.stax.SBMLReader.readSBMLFromStream(SBMLReader.java:412)
> at org.sbml.jsbml.xml.stax.SBMLReader.readSBML(SBMLReader.java:329)
> at org.sbml.jsbml.xml.stax.SBMLReader.readSBMLFile(SBMLReader.java:358)
> at org.sbml.jsbml.xml.stax.SBMLReader.readSBML(SBMLReader.java:343)
> at org.sbml.jsbml.JSBML.readSBMLFromFile(JSBML.java:265)
> at
> metabolic.io.readers.OptFluxJSBMLReader.getContainer(OptFluxJSBMLReader.java:51)
> at test.OptFluxJSBMLReaderTest.main(OptFluxJSBMLReaderTest.java:16)
>
>
> When analyzing the code, I found out that the
> org.sbml.jsbml.xml.stax.SBMLReader.initializePackageParserNamespaces
> method was trying to access a
> "org/sbml/jsbml/resources/cfg/PackageParserNamespaces.xml file. This
> file does not exist in that location and the process dies immediately
> with the a nullpointer exception...
>
> public static void initializePackageParserNamespaces() {
> Properties p = new Properties();
> try {
> p.loadFromXML(Resource.getInstance()
> .getStreamFromResourceLocation("org/sbml/jsbml/resources/cfg/PackageParserNamespaces.xml"));
>
>
> I am not sure if am using the correct method to load the SBML file,
> thus this e-mail... I am using the JSBML.readSBMLFromFile() method to
> give me the SBMLDocument instance...
>
> Is this correct or am I missing something?
>
Do you used ant to create the jsbml jar file ? Or are you trying to run
it directly from a JDE ?
The problem is that you probably did not add the resources folder to
your CLASSPATH, this is there that the different configuration files are.
I guess this is one more point that we need to add in our future
documentation.
Let me know if it solve your problem,
Thanks,
Nico
____________________________________________________________
To manage your jsbml-development list subscription, visit
https://utils.its.caltech.edu/mailman/listinfo/jsbml-development
For a web interface to the jsbml-development mailing list, visit
http://sbml.org/Forums/
For questions or feedback about the jsbml-development list,
contact sbml-team@caltech.edu
|
|
| | Topic: org.sbml.jsbml.xml.stax.SBMLReader |
|---|
Posts: 307
Location: Cambridge UK
Registered: February 2005
|
|
org.sbml.jsbml.xml.stax.SBMLReader
|
18 Nov '10 08:06
|
 |
|
Hi,
Can I ask people not to make any changes to the SBMLReader ?
I will restructure it as the readSBMLFromStream is a bit too long and
try to modify it to allow to keep whitespace when reading the notes.
As I will change the structure of the class, it will be a pain
(probably) to merge the changes.
Thanks,
Nico
____________________________________________________________
To manage your jsbml-development list subscription, visit
https://utils.its.caltech.edu/mailman/listinfo/jsbml-development
For a web interface to the jsbml-development mailing list, visit
http://sbml.org/Forums/
For questions or feedback about the jsbml-development list,
contact sbml-team@caltech.edu
|
|
| | Topic: Level/Version checks |
|---|
Posts: 273
Registered: June 2006
|
|
Level/Version checks
|
24 Nov '10 10:45
|
 |
|
Hi all,
Just to make sure people know about some recent changes in JSBML, I am
writing this short e-mail.
Instead of keeping one field for "level" and another one for "version",
AbstractSBase now contains both fields in a ValuePair<Integer, Integer>,
which implements the Comparable interface. Therefore, it is possible to
check if a level/version combination is higher than another one.
For instance, you can implement checks such as
if (getLevelAndVersion().compareTo(2, 4) < 0) {
// do something
}
In this way, comparisons are much easier. This compareTo method will
return a value smaller then, equal to or larger than zero if the given
level/version combination is greater, equal or smaller than the
level/version combination of this instance of SBase.
I hope you like it.
Cheers
Andreas
--
Dipl.-Bioinform. Andreas Dräger
Eberhard Karls University Tübingen
Center for Bioinformatics (ZBIT)
Sand 1
72076 Tübingen
Germany
Phone: +49-7071-29-70436
Fax: +49-7071-29-5091
____________________________________________________________
To manage your jsbml-development list subscription, visit
https://utils.its.caltech.edu/mailman/listinfo/jsbml-development
For a web interface to the jsbml-development mailing list, visit
http://sbml.org/Forums/
For questions or feedback about the jsbml-development list,
contact sbml-team@caltech.edu
|
|
| | Topic: Status |
|---|
Posts: 307
Location: Cambridge UK
Registered: February 2005
|
|
Status
|
26 Nov '10 06:44
|
 |
|
Hi all,
I manage to commit my code for reading the notes, it is basically
working with few unimplemented methods like SBase .appendNotes(String)
or SBase.setNotes(String) that I will finish later.
I have added support for log4j, so you need to edit the log4j.properties
file to have more or less output, now the level is set to DEBUG but I
have disabled most of the logger producing a lot of output. So if you
want to see for example the output of SimpleSBaseChangeListener, you
have to edit the properties file, I have added some explanations on the
file to help knowing what logger are there.
During the beginning of next week, I will try to review the code and
list all of the tasks that are left to do. We can then sort them out,
add tracker item and decide if they have to go on the first release or
if they can wait later.
May be, we could do an evo meeting for this if people are interested
and/or if they have any other questions/requests ?
I think we could do an official beta release at the end of next week so
that people can start testing it.
Thanks,
Nico
____________________________________________________________
To manage your jsbml-development list subscription, visit
https://utils.its.caltech.edu/mailman/listinfo/jsbml-development
For a web interface to the jsbml-development mailing list, visit
http://sbml.org/Forums/
For questions or feedback about the jsbml-development list,
contact sbml-team@caltech.edu
|
|
| | Topic: JSBML interface |
|---|
Posts: 307
Location: Cambridge UK
Registered: February 2005
|
|
| | Topic: Short User Guide |
|---|
Posts: 9
Registered: April 2010
|
|
Short User Guide
|
24 Feb '11 06:39
|
 |
|
Hi,
I've added a new document "Short User Guide" to the repository. This
could be added to the publication as supplement. It is mainly a merged
document of the Short User Guide from the JSBML Homepage and the
"Differences between libSBML and JSBML" document.
The purpose of this document is on the one side, to give new SBML users
a documentation with examples to quickly building the first (J)SBML
applications. And on the other side, to support people who switch from
libSBML to JSBML (that's why i included the "differences" document).
Feel free to modify/ discuss this document.
Regards,
Clemens
--
Dipl.-Inform. (Bioinform.) Clemens Wrzodek
Univ. Tuebingen, WSI-CogSys, Sand 1, D-72076 Tuebingen, Germany
Phone: (+49/0) 7071 / 29 78985 Fax: (+49/0) 7071 / 29 5091
____________________________________________________________
To manage your jsbml-development list subscription, visit
https://utils.its.caltech.edu/mailman/listinfo/jsbml-development
For a web interface to the jsbml-development mailing list, visit
http://sbml.org/Forums/
For questions or feedback about the jsbml-development list,
contact sbml-team@caltech.edu
|
|
| | Topic: Validation using libsbml online validator |
|---|
Posts: 413
Registered: May 2004
|
|
Validation using libsbml online validator
|
08 Mar '11 03:00
|
 |
|
Hi Nico
I remember you asked somewhere about what to disable when passing things
to the online validator. but I don't remember anyone answering you so ...
Sorry if I am repeating something.
Firstly it is best to turn off unit checking as this is the most
intensive. Also at the moment the online validator will time out and
report a crash if it takes longer than 5 minutes; which for a very big
file it might.
In the case of a big file turning off the math check may speed it up;
although you are obviously loosing an important check.
If you wanted to go for very minimal checking - the id check is a vital
one. Then the general consistency check.
Sarah
____________________________________________________________
To manage your jsbml-development list subscription, visit
https://utils.its.caltech.edu/mailman/listinfo/jsbml-development
For a web interface to the jsbml-development mailing list, visit
http://sbml.org/Forums/
For questions or feedback about the jsbml-development list,
contact sbml-team@caltech.edu
|
|
| | Topic: Re: Parsing SBML file from BioModels |
|---|
Posts: 307
Location: Cambridge UK
Registered: February 2005
|
|
Re: Parsing SBML file from BioModels
|
27 May '11 01:44
|
 |
|
Hi Anushya,
Anushya Muruganujan wrote:
> Hello,
>
> My name is Anushya Muruganujan. I work with the PANTHER group. II am trying to use the JSBML parser to create a SBMLDocument object from a SBML string returned by the BioModels web service. am using both the biomodels and jsbml packages (biomodels-wslib-1.12.jar and jsbml-0.8-b2-with-dependencies.jar).
>
> I have retrieved the sbml string object for a biomodels object using method (client.getModelSBMLById(BIOMD0000000301). When I attempt to parse the SBML object into a SBMLDocument, I am getting a parsing exception.
>
> I have attached a code snippet.
> try {
> BioModelsWSClient client = new BioModelsWSClient();
> String sbmlStr = client.getModelSBMLById(BIOMD0000000301);
> // System.out.println(sbmlStr);
> SBMLReader reader = new SBMLReader();
> SBMLDocument doc = reader.readSBMLFromString(sbmlStr);
> System.out.println(doc.getNotesString());
> }
> catch (Exception e) {
>
> }
>
> Is the SBML object returned by the biomodels web service valid or is there a parsing problem. I have attached the string object returned by the biomodels database.
>
>
The SBML returned by the biomodels web service is fine and in fact, this
code snippet work fine on my computer, using the latest jsbml sources
from svn.
I don't think there as been changes since the b2 release that would
affect this code anyway so before I ask you to try again using a svn
checkout, I will try
to guess what is your problem :-)
As you are from the Panther group, one question I have is : do you have
the big paxtool jar will all dependencies in your CLASSPATH ? Or many
other jar files, including some
related to XML parsing ? If that is the case, your exception might come
from there. If you are using eclipse, you can put the jsbml jar file at
the top of the build path or try to put only the jsbml and biomodelws
jar files in the CLASSPATH/Build path and see if the problem disappear.
Also, as a general rule, it is always good to join the exception
stacktrace that you are getting, that might help us a lot to guess what
is going wrong.
I have corrected a bit your example code to get the model notes :
public static void main(String[] args) {
try {
BioModelsWSClient client = new BioModelsWSClient();
String sbmlStr = client.getModelSBMLById("BIOMD0000000301");
// System.out.println(sbmlStr);
SBMLReader reader = new SBMLReader();
SBMLDocument doc = reader.readSBMLFromString(sbmlStr);
System.out.println(doc.getModel().getNotesString());
}
catch (Exception e) {
e.printStackTrace();
}
}
Let us know if that solves your problem and if not, please join the
exception stacktrace that you are getting,
Nico
____________________________________________________________
To manage your jsbml-development list subscription, visit
https://utils.its.caltech.edu/mailman/listinfo/jsbml-development
For a web interface to the jsbml-development mailing list, visit
http://sbml.org/Forums/
For questions or feedback about the jsbml-development list,
contact sbml-team@caltech.edu
|
|
| | Topic: jsbml - LayoutParser |
|---|
Posts: 1
Registered: August 2011
|
|
jsbml - LayoutParser
|
02 Aug '11 03:33
|
 |
|
Dear Andreas and Nico,
I continue the implementation of the class LayoutParser currently.
I have a suggestion for changing the parsing-process of "SBMLCoreParser".
First i describe the problem:
To use the Layout-Extension easier we have to bind the Layout-Elements
to the SBML-Core-Elements.
For instance: Binding of a speciesGlyphObj with speciesObj with the
command
speciesObj.addExtention(("http://www.sbml.org/sbml/level3/version1/layout/version1",
speciesGlyphObj).
The user can then get the speicesGlyphObj with the command:
speciesObj.getExtention("http://www.sbml.org/sbml/level3/version1/layout/version1");
The class LayoutParser is used at the beginning of the parsing process.
After parsing the layout-information the "SBMLCoreParser" will create
the "Species" objects.
So the "LayoutParser" can not bind the speciesGlyphs-Objects to the
species-Objects.
This problem occurs for every extension we want to implement. The
easiest way to manage the problem is to parse all Annotation-Tags at the
end of parsing the SBML-Core-Elements.
What do you think.
Cheers
Sebastian Fröhlich
____________________________________________________________
To manage your jsbml-development list subscription, visit
https://utils.its.caltech.edu/mailman/listinfo/jsbml-development
For a web interface to the jsbml-development mailing list, visit
http://sbml.org/Forums/
For questions or feedback about the jsbml-development list,
contact sbml-team@caltech.edu
|
|
| | Topic: jsbml - LayoutParser |
|---|
Posts: 307
Location: Cambridge UK
Registered: February 2005
|
|
jsbml - LayoutParser
|
02 Aug '11 07:19
|
 |
|
> I continue the implementation of the class LayoutParser currently.
> I have a suggestion for changing the parsing-process of "SBMLCoreParser".
> First i describe the problem:
> To use the Layout-Extension easier we have to bind the Layout-Elements
> to the SBML-Core-Elements.
> For instance: Binding of a speciesGlyphObj with speciesObj with the
> command
> speciesObj.addExtention(("http://www.sbml.org/sbml/level3/version1/layout/version1
> <http://www.sbml.org/sbml/level3/version1/layout/version1>",
> speciesGlyphObj).
> The user can then get the speicesGlyphObj with the command:
> speciesObj.getExtention("http://www.sbml.org/sbml/level3/version1/layout/version1
> <http://www.sbml.org/sbml/level3/version1/layout/version1>");
>
> The class LayoutParser is used at the beginning of the parsing
> process. After parsing the layout-information the "SBMLCoreParser"
> will create the "Species" objects.
> So the "LayoutParser" can not bind the speciesGlyphs-Objects to the
> species-Objects.
>
> This problem occurs for every extension we want to implement. The
> easiest way to manage the problem is to parse all Annotation-Tags at
> the end of parsing the SBML-Core-Elements.
>
For that, you have to use the processEndDocument methods of the
ReadingParser interface.
see
http://jsbml.svn.sourceforge.net/viewvc/jsbml/trunk/src/org/sbml/jsbml/xml/parsers/ReadingParser.java?revision=750&view=markup
The best is to create a HashMap or what you like to store the
SpeciesGlyph object you are creating and then in the
processEndDocument() method,
the XML document is finished reading and all the objects should be
created, you can associate the SpeciesGlyph with the Species.
It should work fine, I don't think there is any need to change anything,
if I unsderstodd correctly your problem.
Nico
ps: replying before the mail got to the list :-)
I can see mails that are being moderated but cannot accept them
____________________________________________________________
To manage your jsbml-development list subscription, visit
https://utils.its.caltech.edu/mailman/listinfo/jsbml-development
For a web interface to the jsbml-development mailing list, visit
http://sbml.org/Forums/
For questions or feedback about the jsbml-development list,
contact sbml-team@caltech.edu
|
|
| | Topic: New listener framework for all elements within the SBML tree |
|---|
Posts: 273
Registered: June 2006
|
|
New listener framework for all elements within the SBML tree
|
31 Aug '11 07:25
|
 |
|
Dear all,
I just wanted to make you aware of the recent changes in the JSBML
library. The way how we notify listeners about changes in JSBML's data
structure has massively been changed, thanks to Sarah Müller vom Hagen
for her help. I hope that we didn't forget anything. If it is all right,
all elements within the SBML tree should now be listening to dedicated
change listeners that have been renamed and also inherit from the
PropertyChangeListener from standard Java beans. These can now be found
in the util package (cf. TreeNodeChangeListener and
TreeNodeChangeEvent). Please have a look on it and let us know if you
encounter any problems. We hope, everything is more logical and better now.
Cheers
Sarah and Andreas
--
Dr. Andreas Dräger
University of Tuebingen
Center for Bioinformatics Tuebingen (ZBIT)
Sand 1
72076 Tübingen
Germany
Phone: +49-7071-29-78982
Fax: +49-7071-29-5091
____________________________________________________________
To manage your jsbml-development list subscription, visit
https://utils.its.caltech.edu/mailman/listinfo/jsbml-development
For a web interface to the jsbml-development mailing list, visit
http://sbml.org/Forums/
For questions or feedback about the jsbml-development list,
contact sbml-team@caltech.edu
|
|
| | Topic: Release of JSBML-rc1 |
|---|
Posts: 307
Location: Cambridge UK
Registered: February 2005
|
|
Release of JSBML-rc1
|
14 Dec '11 03:56
|
 |
|
-------------------------
JSBML-0.8-rc1
-------------------------
We are pleased to announce the first release candidate of JSBML-0.8
which is
available for download from
https://sourceforge.net/projects/jsbml/files/jsbml/0.8-rc1
JSBML is a community-driven project to create a free, open-source, pure
Java library for reading,
writing, and manipulating SBML files and data streams. It is an
alternative to the mixed Java/native code-based interface provided in
libSBML.
For more details, please visit http://sbml.org/Software/JSBML
================================================
Version 0.8-rc1 (12-12-2011)
================================================
Please try it and report any problems you encounter using jSBML either
to the
mailing list jsbml-development@caltech.edu or using the issue tracker
for jSBML at
http://sourceforge.net/tracker/?group_id=279608&atid=1186776
Below is a summary of the changes visible to the users :
* New Features:
- Where necessary, initDefaults has been complemented with an
additional method, for which the level/version combination can be
directly specified, i.e., it is now possible for those elements to
set their defaults as these would be for the specified
level/version combination.
- A check for duplicate id and metaid has been implemented. The new
interface UniqueNamedSBase as been added to tag all the elements
whose id is intended to be unique within one model.
- When adding an element with undefined Level/Version combination
or at least with undefined Version to an element whose L/V
configuration has been defined, JSBML now recursively updates this
configuration for the child element. In case of differing L/V
configurations an exception will be thrown on adding the element.
- The SBMLReader now provides static methods to directly read SBML
content
from Files, InputStreams, or Strings. Thanks to Martin Gräßlin for
this
idea in tracker issue #3300433.
- ASTNode has now a userObject attribute through which any
computation result or any additional information can be stored
in the tree.
- The compile method in ASTNode has become more efficient now by
restructuring its case distinctions.
- JSBML now provides a Maven script file. Thanks to Igor Rodchenkov
for contributing this file.
- Every exceptions in JSBML are now extending the java.lang.Exception
class even if they are named XXXError to be closer to the libSBML API.
- The utilities classes that helped to catch changes in SBase elements
have been updated to work on TreeNode instead of SBase to make them
more
generic. Now changes in annotation, notes or ASTNode can be watched.
Thanks to Sarah Rachel Müller vom Hagen to support this effort.
* Bug Fixes:
- [Tracker item #3434930]: the constraint message element should be
written properly to XML now.
- Corrected the way created and modified dates where written and made
them
mandatory only for the model element.
- Added the java system properties
javax.xml.stream.XML[Output|Event|Input]Factory directly before
starting
to write or read an SBML file. This will ensure that the correct XML
parser is used and prevent some exceptions to happen if a different
parser was present in the java classpath.
- [Tracker item #3380106]: the getAnnotationString() should now always
return the same XML as when the model is written to a file.
- Corrected the org.sbml.jsbml.util.Maths class, where some
trigonometric
functions were incorrectly calculated.
- When writing SBML Level 1 the name attribute was never written because
JSBML uses the id only as an internal representation. The check for
Level 1 name attributes was not correct.
- In SBML Level 1 math code was written in MathML although
in this SBML version math are represented in infix notation only
and are stored in the 'formula' attribute.
- When creating a Parameter object using the constructor that takes
a LocalParameter as its only argument, a call to setConstant(true)
was always performed, irrespective of the fact that for Level = 1
models this method throws a PropertyNotAvailableError. Thanks to
Sarah Rachel Müller vom Hagen for reporting this problem.
- [Tracker issue #3323886]: The units of Species were not derived
correctly because if the units were not explicitly defined, the method
getDerivedUnitsInstance() always returned the predefined unit
"substance", or null for models in Level 3. Now it considers the
surrounding compartment, the hasOnlySubstanceUnits, and
spatialSizeUnits
attributes depending on the Level/Version configuration.
- When reading SBML content from a file or writing JSBML data structures
as SBML to a file, the SBMLReader/Writer did not close streams after
finishing. This caused that sometimes files could not be opened by
other
programs although writing was already done. Unfortunately, by
correcting
this bug, an IOException needs to be thrown, previously only a
FileNotFoundException was thrown. Hence, users need to catch
a different exception now when reading/writing SBML.
- Renamed the getters for Creator and ModifiedDates in History to
getListOfCreators() and getListOfModifiedDates.
- If the Level/Version combination was not set, the identifier of
NamedSBases was sometimes not written to an SBML file.
- [Tracker issue #3300430]: In some condition, the JVM was not checking
the type of an Object before adding it to a typed variable which later
lead to some ClassCastException that prevented jsbml to save some
models. Thanks to Martin Gräßlin to report the bugs alongside some
unit tests and to help resolved it.
- [Tracker issue #3300490] : The method SBase.getNotesString() was
returning null instead of the empty String, as stated in the Java
documentation. This has been corrected and the empty String is
returned
now. Thanks to Martin Gräßlin to report the bugs alongside some
unit tests.
- The SBML level 1 rules were incorrectly read, now when the 'type'
attribute is set to 'rate', a RateRule is properly created.
- The SubModel utility class was fixed and an example of how to use it
added.
- Corrected the clone method for listOf objects. The typeOfList was
not set in the clone so it was not possible to save a model that
contain
a cloned list.
- [Tracker item #3306135] : the handling to the number NaN
(NotANumber) has
been improved and the correct mathML element is created when saving
the
formula to XML.
- The attribute denominator on SpeciesReferences, in SBML Level 1
Version 2, was never read. Thanks to the many models in the SBML Test
Suite to help us detecting this problem.
- Implemented the hashCode method for all elements belonging to the
hierarchical SBML data structure (SBase, Annotation, ASTNode
etc.).
- The ASTNode.setParentSBMLObject has been corrected.
* Known issues :
- Reading of more than one RDF Description elements in the RDF
annotation
block (the official SBML annotation scheme) is not supported at the
moment. Planned for the next major release.
Thanks
The jSBML team.
____________________________________________________________
To manage your jsbml-development list subscription, visit
https://utils.its.caltech.edu/mailman/listinfo/jsbml-development
For a web interface to the jsbml-development mailing list, visit
http://sbml.org/Forums/
For questions or feedback about the jsbml-development list,
contact sbml-team@caltech.edu
|
|
| | Topic: New How-To for writing extensions added to the repository |
|---|
Posts: 2
Registered: January 2012
|
|
New How-To for writing extensions added to the repository
|
16 Jan '12 08:17
|
 |
|
Hello jSBML developers,
During our work on the implementation of sbml-qual on jSBML, Andreas
Dräger, Finja Büchel and I also worked on an How-To for writing
extensions in jSBML.
It is supposed to give developers a quick summary of what needs to be
done in order to implement an extension for jSBML, which classes and
methods to create, and other things that need to be accounted for.
We are thankful for all comments, critics, or improvements from the
developr community, so that this How-To will become a useful
contribution to jSBML.
The How-To can be found in the jsbml repository under
/doc/tutorials/tex/JSBML_howto_write_extensions.tex and is already
included in the User Guide.
Best regards
Florian
--
Dipl.-Inf. Florian Mittag
University of Tuebingen
Cognitive Systems, Sand 1
72076 Tuebingen, Germany
Phone: +49 7071 / 29 78985 Fax: +49 7071 / 29 5091
Homepage: http://www.ra.cs.uni-tuebingen.de/mitarb/mittag/
____________________________________________________________
To manage your jsbml-development list subscription, visit
https://utils.its.caltech.edu/mailman/listinfo/jsbml-development
For a web interface to the jsbml-development mailing list, visit
http://sbml.org/Forums/
For questions or feedback about the jsbml-development list,
contact sbml-team@caltech.edu
|
|
| | Topic: Re: [sbml-qual] Using jSBML with SBML-Qual |
|---|
Posts: 307
Location: Cambridge UK
Registered: February 2005
|
|
Re: [sbml-qual] Using jSBML with SBML-Qual
|
23 Jan '12 01:57
|
 |
|
Hi Ben,
On 20/01/12 21:44, Wicks, Benjamin wrote:
> Hello all,
>
> I am working on a project to export boolean model data to SBML. I have
> been using jSBML to export some of the information to an SBML file. I
> now need to export the data that will go in the /listOfTransitions/
> tag. As far as I can tell, jSBML does not have this functionality (as
> well as for other SBML-Qual-specific tags).
>
> Do you know of any plans to add SBML-Qual abilities to jSBML?
> Has anyone used jSBML and found ways to export SBML-Qual data around
> this limitation?
> Should I use jSBML in conjunction with my own algorithms to export to
> SBML-Qual?
> Or should I wait to use jSBML until it more fully supports SBML-Qual?
>
This is a question that will fit well in the jsbml-development mailing
list. Don't hesitate to ask questions there if you have any problems
with jsbml.
So, to answer your questions : yes, jsbml support the current sbml-qual
specifications proposal.
To get it working, you need to modify one file and add one folder to
your CLASSPATH.
You need to checkout the current trunk of jsbml :
svn co https://jsbml.svn.sourceforge.net/svnroot/jsbml/trunk jsbml
Then on the file
resources/org/sbml/jsbml/resources/cfg/PackageParserNamespaces.xml
you need to uncomment or add the line
<entry
key="http://www.sbml.org/sbml/level3/version1/qual/version1">org.sbml.jsbml.xml.parsers.QualParser</entry>
To finish, you need to compile some extra code :
If you use a java IDE, you just need to add extensions/qual/src to your
list of source folders.
If you want to generate a jar file :
cd extensions/qual
ant jar
That will generate currently extensions/qual/build/jsbml-qual-2.1-a1.jar
that you can include in your CLASSPATH.
From there, you can use jsbml to read and write sbml-qual. For
informations, the other SBML L3 packages that are implemented in jsbml at
the moment are groups, layout, fbc. Also the spatial package support is
started but not finished.
Hope this help and don't hesitate to ask if you have any problems.
Nico
____________________________________________________________
To manage your jsbml-development list subscription, visit
https://utils.its.caltech.edu/mailman/listinfo/jsbml-development
For a web interface to the jsbml-development mailing list, visit
http://sbml.org/Forums/
For questions or feedback about the jsbml-development list,
contact sbml-team@caltech.edu
|
|
| | Topic: Re: [jsbml-team] JSBML for GWT |
|---|
Posts: 307
Location: Cambridge UK
Registered: February 2005
|
|
Re: [jsbml-team] JSBML for GWT
|
16 Feb '12 02:02
|
 |
|
On 15/02/12 23:19, Stanley Gu wrote:
> Hello ,
>
> I was interested in using the Google Web Toolkit (GWT) for building a web
> application that uses JSBML.
>
> GWT operates in Java, but requires some additional packaging of the jar for
> it to work. Is there any way to get a GWT compatible version of JSBML jar
> packaged?
>
> Thanks!
>
> http://code.google.com/webtoolkit/overview.html
> http://www.vogella.de/articles/GWTModules/article.html
> http://code.google.com/p/google-web-toolkit-incubator/wiki/PathsHandlingFAQ
I thing it will not be possible to use directly JSBML on the client
side, you will have to do some client/server code.
Here is an example that show how to use GWT with Hibernate :
http://code.google.com/webtoolkit/articles/using_gwt_with_hibernate.html
This is a good example as like jsbml, you need plenty of external jar
files to use hibernate and this not really realistic to compile all of
that to javascript.
So I thing, you need to use GWT-RPC in order to use JSBML inside a GWT
application.
see
http://code.google.com/webtoolkit/doc/1.6/DevGuideServerCommunication.html#DevGuideRemoteProcedureCalls
Hope this help,
Nico
____________________________________________________________
To manage your jsbml-development list subscription, visit
https://utils.its.caltech.edu/mailman/listinfo/jsbml-development
For a web interface to the jsbml-development mailing list, visit
http://sbml.org/Forums/
For questions or feedback about the jsbml-development list,
contact sbml-team@caltech.edu
|
|
| | Topic: Re: [jsbml-team] Clonging of SBML elements |
|---|
Posts: 307
Location: Cambridge UK
Registered: February 2005
|
|
Re: [jsbml-team] Clonging of SBML elements
|
16 Feb '12 04:58
|
 |
|
On 16/02/12 12:49, Andreas Dräger wrote:
> Dear all,
>
> Just now I am observing a strange behavior in graphical user
> interfaces when cloning SBML elements that have
> TreeNodeChangeListeners assigned to it. Currently, the class
> AbstractTreeNode assignes all registered TreeNodeChangeListeners to
> the clone (see clone constructor in AbstractTreeNode):
>
> if (node instanceof AbstractTreeNode) {
> this.listOfListeners.addAll(((AbstractTreeNode)
> node).listOfListeners);
> }
>
> When cloning an entire SBMLdocument, all of its components are deeply
> cloned. This causes that all TreeNodeChangeListeners are called again
> and again whilst cloning. Instead of notifying listeners about changes
> in the actual SBMLDocument to which the listeners are assigned, they
> do now observe change events from a different (new) SBMLDocument but
> all the values are actually not changing (because we are cloning).
>
> Therefore, I come to the conclusion that adding change listeners when
> cloning causes unexpected behavior. Furthermore, the only thing that
> is not deeply cloned here is the list of change listeners. We should
> either try to deep clone the change listeners as well (this would also
> avoid that the original listeners are called whilst cloning), or we
> should not add change listeners here at all.
>
> If you agree, I would like to uncomment this block or to try deep
> cloning of the listeners. Please let me know what you think. Should
> this change also be done in the 0.8 branch?
>
I would be for uncommenting the code and adapt the documentation,
javadoc and user guide to explain that when cloning, you should take
care of the listeners yourself.
I think it would be possible to use the same listeners for all the
objects (at least if they are in the same model) so we should not create
automatically many new objects when they are may be not needed.
Nico
____________________________________________________________
To manage your jsbml-development list subscription, visit
https://utils.its.caltech.edu/mailman/listinfo/jsbml-development
For a web interface to the jsbml-development mailing list, visit
http://sbml.org/Forums/
For questions or feedback about the jsbml-development list,
contact sbml-team@caltech.edu
|
|
| | Topic: Re: [jsbml-team] Google Summer of Code |
|---|
Posts: 273
Registered: June 2006
|
|
Re: [jsbml-team] Google Summer of Code
|
27 Feb '12 23:44
|
 |
|
Dear all,
Google has announced its 8th Google Summer of Code (GSoC) 2012 at
February 4th. For more information, please see the following web site:
http://www.google-melange.com/gsoc/events/google/gsoc2012.
Here is the timeline for the next steps in order to participate in this
program:
February 4:
Program announced.
February 27:
19:00 UTC
Mentoring organizations can begin submitting applications to Google.
March 9:
23:00 UTC
Mentoring organization application deadline.
March 12-15:
Google program administrators review organization applications.
I would like to propose to launch a student's program, in which an
exhaustive off-line validation for SBML documents could be implemented.
The aim would be to provide the same SBML validation capability in JSBML
as it is already implemented in libSBML.
Other suggestions are welcome. From my perspective, the Google Summer of
Code would be a great chance to improve JSBML in a internationally
coordinated competition.
Since the deadline for sending an application for a project to Google
will already be Friday in one week, we should start writing within the
next few days.
Please let me know in case you are interested in participation, whether
as a potential mentor, with an own JSBML-related project idea, or as an
interested student who would like to work for the project.
Best regards
Andreas Dräger
--
Dr. Andreas Dräger
University of Tuebingen
Center for Bioinformatics Tuebingen (ZBIT)
Sand 1
72076 Tübingen
Germany
Phone: +49-7071-29-78982
Fax: +49-7071-29-5091
____________________________________________________________
To manage your jsbml-development list subscription, visit
https://utils.its.caltech.edu/mailman/listinfo/jsbml-development
For a web interface to the jsbml-development mailing list, visit
http://sbml.org/Forums/
For questions or feedback about the jsbml-development list,
contact sbml-team@caltech.edu
|
|
| | Topic: Re: [jsbml-team] JSBML doubt |
|---|
Posts: 307
Location: Cambridge UK
Registered: February 2005
|
|
Re: [jsbml-team] JSBML doubt
|
28 Feb '12 07:05
|
 |
|
Hi Hector,
On 28/02/12 14:22, Hector A. Rodriguez Arias wrote:
> Hello, i am a student from the University of Informatics Science in
> Cuba. I am working in my thesis with your library, because i am
> developing a graphic modelator for biological systems and i use SBML
> as standard. I have a problem with the library, i create three
> lists for Species,Compartments and Reactions. The type of that lists
> is ListOf, but when i load a SBML and try to put, for example, some
> species into the species's list i got an error "Exception in thread
> "AWT-EventQueue-0" Version mismatch between none in V -1 and
> compartment in V 2.",
> but when i create a new file and the user draws an specie into the
> modelator none error occurs. Please help me to understand that.
>
When creating SBML objects, you have to make sure that they are create
for the same SBML level and version of SBML.
One easy way to avoid dealing with these kind of problem is to use the
createXXX methods in the Model class. This method will create a new
Species, Compartment or Reaction, set properly the SBML level and
version, according to the level and version of the Model element, add it
to the correct ListOf and return it to you.
If you are not using the createXXX methods, make sure that you create
your SBML objects with the correct level and version.
See also the answer from Andreas below for a typical example on how to
create SBML objects properly in jsbml :
> Thanks for using JSBML. It seems you use the empty constructor of
> ListOf<? extends SBase>() to create your ListOf objects. This
> constructor will initialize the SBML Level and Version attributes with
> -1 each. It is therefore recommended not to directly call the
> constructors. Please try something like
>
> SBMLDocument myDoc = new SBMLDocument(3, 1); // creates a new
> SBMLDocument with Level 3 Version 1
> Model myModel = myDoc.createModel() /* this will internally call the
> constructor of Model with the correct Level/Version combination. Now
> you can create your lists as follows */
>
> ListOf<Compartment> myListOfCompartments =
> myModel.createListOfCompartments();
>
> Similarly, create lists for Species and Reactions. This is much more
> convenient than using the constructor. Alternatively, you could say
>
> ListOf<Compartment> myListOfCompartments = new ListOf<Compartment>(3,
> 1); /* This creates a list with identical Level/Version configuration */
>
> JSBML must throw an exception if the Level/Version attributes within
> the data structure are not consistent. This should actually be a help
> for the programmer.
>
> I hope this helps.
>
> Cheers
> Andreas
Cheers,
Nico
____________________________________________________________
To manage your jsbml-development list subscription, visit
https://utils.its.caltech.edu/mailman/listinfo/jsbml-development
For a web interface to the jsbml-development mailing list, visit
http://sbml.org/Forums/
For questions or feedback about the jsbml-development list,
contact sbml-team@caltech.edu
|
|
| | Topic: Release of SBMLsimulator 1.0-rc2 |
|---|
Posts: 273
Registered: June 2006
|
|
Release of SBMLsimulator 1.0-rc2
|
02 Mar '12 05:45
|
 |
|
-------------------------
SBMLsimulator 1.0-rc2
-------------------------
We are pleased to announce the release of SBMLsimulator 1.0-rc2
which is available for download from:
http://www.cogsys.cs.uni-tuebingen.de/software/SBMLsimulator/
SBMLsimulator is a fast, accurate, and easily usable program for
dynamic model simulation and heuristic parameter optimization of
models encoded in the Systems Biology Markup Language (SBML). In
order to ensure a high reliability of this software, it has been
benchmarked against the entire SBML Test Suite and all models
from the Biomodels.net database. It includes a large collection
of nature-inspired heuristic optimization procedures for efficient
model calibration. SBMLsimulator provides an intuitive Graphical
User Interface (GUI) and several command-line options. Therefore,
it is suitable for large-scale batch processing and model calibration.
SBMLsimulator runs on all platforms that provide a standard Java
Virtual Machine and is based on the open-source library JSBML.
The simulation core library of SBMLsimulator can be obtained as a
separate application programming library.
***********************************************************************
Please try it and report any problems you encounter using SBMLsimulator
either to andreas.draeger@uni-tuebingen.de or
roland.keller@uni-tuebingen.de
A bug-tracker for the internal simulation core can be found here:
http://sourceforge.net/tracker/?group_id=578484&atid=2345182
Thanks
The SBMLsimulator team.
--
Dr. Andreas Dräger
University of Tuebingen
Center for Bioinformatics Tuebingen (ZBIT)
Sand 1
72076 Tübingen
Germany
Phone: +49-7071-29-78982
Fax: +49-7071-29-5091
____________________________________________________________
To manage your jsbml-development list subscription, visit
https://utils.its.caltech.edu/mailman/listinfo/jsbml-development
For a web interface to the jsbml-development mailing list, visit
http://sbml.org/Forums/
For questions or feedback about the jsbml-development list,
contact sbml-team@caltech.edu
|
|
| | Topic: infix survey |
|---|
Posts: 183
Registered: July 2008
|
|
infix survey
|
03 Apr '12 10:59
|
 |
|
Andreas asked me to bring this up here: we are writing a new level 3
infix-to-mathml parser for libsbml, and have a survey about it:
http://www.surveymonkey.com/s/YG76BDG
One of the main questions there is 'what do we do about 'log(x)'? Some
traditions set the base as 10, some as e, and (Andreas tells me) still
others as 2! I understand there's a jsbml infix parser; what does it do?
If anyone here would like to fill out the survey, please do.
-Lucian
____________________________________________________________
To manage your jsbml-development list subscription, visit
https://utils.its.caltech.edu/mailman/listinfo/jsbml-development
For a web interface to the jsbml-development mailing list, visit
http://sbml.org/Forums/
For questions or feedback about the jsbml-development list,
contact sbml-team@caltech.edu
|
|
| | Topic: Please register for HARMONY 2012 |
|---|
Posts: 961
Registered: October 2003
|
|
Please register for HARMONY 2012
|
15 Apr '12 17:27
|
 |
|
For all who are planning on attending HARMONY 2012, please register soon. Please don't wait until the last minute! The organizers need to make plans for the number of people who will be attending.
Here is a direct link to the registration page:
http://harmony2012.eventbrite.com/
Here is the event home page:
http://co.mbine.org/events/HARMONY_2012
H A R M O N Y 2012
May 21-25, 2012
Maastricht, The Netherlands
Thanks!
--
Mike Hucka, Ph.D. -- mhucka@caltech.edu -- http://www.cds.caltech.edu/~mhucka
Computing and Mathematical Sciences, California Institute of Technology,
Pasadena, California, USA -- Twitter: @mhucka -- Skype: michaelhucka
____________________________________________________________
To manage your jsbml-development list subscription, visit
https://utils.its.caltech.edu/mailman/listinfo/jsbml-development
For a web interface to the jsbml-development mailing list, visit
http://sbml.org/Forums/
For questions or feedback about the jsbml-development list,
contact sbml-team@caltech.edu
|
|
| | Topic: [jsbml-team] jsbml-rc2 to test |
|---|
Posts: 307
Location: Cambridge UK
Registered: February 2005
|
|
[jsbml-team] jsbml-rc2 to test
|
17 Apr '12 03:41
|
 |
|
-------------------------
JSBML-0.8-rc2
-------------------------
We are pleased to announce the second release candidate of JSBML-0.8
which is available for download from
https://sourceforge.net/projects/jsbml/files/jsbml/0.8-rc2
This will be a short release and we are planning to do the final 0.8
during the next few weeks if no major problems are found.
=============================================
Version 0.8-rc2 (11-04-2012)
=============================================
Please try it and report any problems you encounter using JSBML either
to the mailing list jsbml-development@caltech.edu or using the issue
tracker for JSBML at
http://sourceforge.net/tracker/?group_id=279608&atid=1186776
Below is a summary of the changes visible to the users :
* User visible changes :
- Major improvements of the reading and writing speed for large
models.
* Bug Fixes:
- It was forgotten to implement an unsetSubstanceUnits method on the
Model class. Thanks to Robert Byrnes for reporting this problem.
- In the Reaction class, the setReversible method only accepted
Boolean, no boolean.
- Several bug fixes and improvements to units derivation, merging and
simplifying.
- There was a bug in KineticLaw that prevented a correct iteration
through all child elements.
- When cloning JSBML wrongly assigned the same TreeNodeChangeListeners
to the new data structure. Now, the TreeNodeChangeListeners are not
copied when cloning a JSBML object.
- The clone methods were corrected to register properly all entities
with an id.
- QuantityWithUnit did not fire update events when changing its value
because of an incorrect comparison between the previous and the new
value.
- Corrected a bug that made it impossible to set a kinetic law with an
existing list of local parameters as the new kinetic law in a
different reaction.
- Meike Aichele detected and fixed the problem that some Listeners
were set too soon in the Model class, so that no Event was detected.
- One rdf namespace declaration was missing when creating an History
element from scratch.
- [Tracker item #3511439] : Model.getSpeciesType(String) was
corrected and it's speed improved. Thanks to Thomas Bernard who
noticed and reported the problem.
- Annotation elements that are missing a proper namespace declaration
will be correctly read and not considered as improper SBML elements.
- [Tracker item #3487517] : If one empty rdf Bag element was present
in an annotation read by jsbml, an XML element was not closed
properly, resulting in an invalid generated SBML. Thanks to Anna
Zhukova to report this problem.
- [Tracker item #3434930] : The parsing of a Message as an XML String
was incorrect as the method was expecting only a notes element to
enclose the HTML.
* Known issues :
- Reading of more than one RDF Description elements in the RDF
annotation block (the official SBML annotation scheme) is not
supported at the moment. Planned for the next major release.
- The RDF block at the top level of the annotation is considered to
be the official SBML annotation.
- SBML L3 packages are not supported and not kept.
____________________________________________________________
To manage your jsbml-development list subscription, visit
https://utils.its.caltech.edu/mailman/listinfo/jsbml-development
For a web interface to the jsbml-development mailing list, visit
http://sbml.org/Forums/
For questions or feedback about the jsbml-development list,
contact sbml-team@caltech.edu
|
|
| | Topic: Re: [sbml-render] Ids and names on elements |
|---|
Posts: 273
Registered: June 2006
|
|
Re: [sbml-render] Ids and names on elements
|
14 May '12 23:29
|
 |
|
Am 5/11/12 8:27 PM, schrieb Michael Hucka:
> On Thu, 10 May 2012 07:31:26 +0200, Andreas Dräger wrote:
>> My question is therefore, first, why it was actually decided not to have
>> a name attribute in addition to the id for several elements in
>> SBML-render, and second, if you have some proposal what we can do for
>> our implementation?
> I don't remember the precise reasons, but layout& render are the two oldest packages, predating even the final L3 specification. It probably has more than one oddity as a result of the fact that many principles were never fully worked out at the time they were first developed.
>
> These specifications are not 100% final, and small details like this could probably be adjusted.
>
>
Hi all,
In this case, I propose to let all classes from SBML-Render that have
just an ID but no name in the specification extend AbstractNamedSBase,
which gives the possibility to also set a name. The important point of
this will be that then the model will be able to register links to these
elements and take care to avoid duplicate identifiers. Otherwise, we
would have to split the interface NamdeSBase (and AbstractNamedSBase as
well) from JSBML's core into two distinct classes, one caring about the
ID and a derived class that also has a name tag. This would make JSBML
again a bit more complicated and would also cause additional effort. The
easier way seems to be to introduce an optional name attribute on some
Render elements. By making this optional, all existing render files
would still be valid, no real change.
Cheers
Andreas
--
Dr. Andreas Dräger
University of Tuebingen
Center for Bioinformatics Tuebingen (ZBIT)
Sand 1
72076 Tübingen
Germany
Phone: +49-7071-29-78982
Fax: +49-7071-29-5091
____________________________________________________________
To manage your jsbml-development list subscription, visit
https://utils.its.caltech.edu/mailman/listinfo/jsbml-development
For a web interface to the jsbml-development mailing list, visit
http://sbml.org/Forums/
For questions or feedback about the jsbml-development list,
contact sbml-team@caltech.edu
|
|
| | Topic: Release of JSBML-0.8 |
|---|
Posts: 307
Location: Cambridge UK
Registered: February 2005
|
|
Release of JSBML-0.8
|
24 Aug '12 15:56
|
 |
|
-------------------------
JSBML-0.8
-------------------------
We are pleased to announce the first stable release of JSBML-0.8,
which is available for downloading from
https://sourceforge.net/projects/jsbml/files/jsbml/0.8
JSBML is a community-driven project to create a free, open-source, pure
Java library for reading, writing, and manipulating SBML files and data
streams. It is an alternative to the mixed Java/native code-based
interface provided in libSBML.
For more details, please visit http://sbml.org/Software/JSBML
======================================================================
Version 0.8 (24-08-2012)
======================================================================
* New Features:
- The new specialized EventObject TreeNodeRemovedEvent has been
implemented in order to make sure that deleted nodes do no longer
have a pointer to their previous parent within the tree. At the
same time, it is still possible to identify their previous
location using the field in the new EventObject. For people using
already the change listeners it means one API change that could
break existing code.
* Bug Fixes:
- The ASTNode methods insertChild, replaceChild, prependChild have
been corrected to setup correctly the parentSBMLObject in the
added ASTNode tree. Thanks to Jason Stevens who reported the
problem.
- When creating an ASTNode with a CallableSBase or using the
setVariable method, the reference to the id of the CallableSBase
was not stored.
- There is now a rounding correction for multipliers when merging
units that tries to shift multipliers to the scale of a unit. This
can only be done if the logarithm to the base 10 of the multiplier
is nearly an integer number. Nearly means that the distance to the
next integer is not larger than the ensured double precision.
- [Tracker item #3511439] : The cloning of a Species was not copying
the speciesType attribute. Thanks to Thomas Bernard who noticed and
reported the problem.
- The units attribute on ASTNode was sometimes not written out and the
SBML namespace was sometimes missing from the MathML. It should be
fine now.
- Improved the registration/un-registration of elements in particular
for local parameters.
- Modified the parser to be able to read invalid notes, anything
inside the notes element will be read even if not in the html
namespace.
- Corrected several other clone methods. The Reaction clone
constructor was not cloning the compartment attribute. The Model
clone was not cloning the new L3 attributes. The Constraint.clone()
was not properly cloning the Message. When cloning ASTNodes, the
direct pointer to referenced variables (instances of CallableSBase)
are set to null.
- An other small API change: the species.setBoundaryCondition method
was expecting a Boolean instead of a boolean, this has been
modified. It should not break any existing code as the JVM will
autocast the Boolean.
- Added the biological qualifier hasTaxon.
- Submodel generation corrections related to event and namespace
* Known issues :
- Reading of more than one RDF Description elements in the RDF
annotation block (the official SBML annotation scheme) is not
supported at the moment. Planned for the next major release.
- The RDF block at the top level of the annotation is considered to
be the official SBML annotation.
- SBML L3 packages are not supported and not kept.
Thanks
The JSBML team.
____________________________________________________________
To manage your jsbml-development list subscription, visit
https://utils.its.caltech.edu/mailman/listinfo/jsbml-development
For a web interface to the jsbml-development mailing list, visit
http://sbml.org/Forums/
For questions or feedback about the jsbml-development list,
contact sbml-team@caltech.edu
|
|
| | Topic: Re: JSBML and simple non rdf annotations. |
|---|
Posts: 307
Location: Cambridge UK
Registered: February 2005
|
|
Re: JSBML and simple non rdf annotations.
|
08 Apr '13 08:19
|
 |
|
Hi Pablo,
I have to say that this part is a bit obscure at the moment and I am not
sure that it is documented in the user guide as well.
I attached an example code that do what you want.
Basically at the moment, the rest of the annotation, meaning what is not
described on the SBML specs is stored as a StringBuilder internally and
you can access it and modify it through a String. And we call it the non
RDF part of the annotation, so you have several methods to access it.
We are planning to re-implement all of that for 1.0 to store and XMLNode
instead of a String and the best for java developers would be if I
manage to integrate it with DOM somehow as well.
cheers,
Nico
On 04/08/2013 03:05 PM, Pablo Moreno wrote:
> Hi Nicolas,
>
> I need to write an annotation block for an SBML model, but cannot
> figure how to do it using the JSBML API. Basically I need to write
> something like this in the <annotation> block of the model:
>
> <sidecompounds xmlns=http://sbml.org/annotations/sidecompounds>
> <compound id="atp" />
> <compound id="adp" />
> …
> </sidecomounds>
>
> So I have written something like this in the code:
>
> Annotation sideCompAnnot = new Annotation();
> Map<String,String> namespace = new HashMap<String, String>();
> namespace.put("sidecompounds",
> "http://sbml.org/annotations/sidecompounds");
> sideCompAnnot.setAnnotationNamespaces(namespace);
>
> how should I get on with this? Do you add one annotation per each of
> the lines of "compound" that I have. If that is the case, how do you
> add them then to the model? There is a model.setAnnotation(annot), but
> I would think that that would replace what you have added.
>
> Thanks!
> Pablo
>
>
>
>
|
|
|
|