Forums

F.A.Q. F.A.Q.    Register Register    Login Login    Home Home
Search Search
SBML Discussions » sbml-interoperability » question about CVTerms
Show: Today's Posts  :: Message Navigator
| Subscribe to topic 
Return to the default flat view Create a new topic Submit Reply
AuthorTopic
Sarah Keating


Posts: 413
Registered:
May 2004
Re: question about CVTerms 09 Sep '09 04:46 Go to previous messageGo to previous message

Hi Allyson

I think we have a break down in documentation :-)

The return value -2 will be returned if the object on which you are
attempting to set the CVTerm has no metaid value. The annotation is
required to refer to the metaid and thus it doesn't make sense to add
the CVTerm if the object has no metaid set.

Sarah

Allyson Lister wrote:
> Hi all,
>
> I've had some odd behaviour with my CVTerms, and was wondering if someone
> could tell me what I was doing wrong. :)
>
> (Jaunty, libsbml4.0.0, Java version of libsbml)
>
> Basically, I'm trying to create some new CVTerms and add them to the model
> element. However, I'm in a method that only knows that model element is an
> SBase object.
>
> // retrieveCVTerm adds qualifiertype and either modelqualifiertype or
> biologicalqualifiertype, depending.
> // In this case it adds a modelqualifiertype as described by the second
> argument
> // It then sends back the cvTerm created. While it uses the sBase object, it
> DOES NOT modify it.
> CVTerm cvTerm = retrieveCVTerm( sBase,
> libsbmlConstants.MODEL_QUALIFIER, key );
> // add uri to cvTerm
> cvTerm.addResource( bqm );
> System.err.println( "cvTerm.getNumResources() m = " +
> cvTerm.getNumResources() );
> int returnvalue = sBase.addCVTerm( cvTerm );
> System.err.println( "sBase.getNumCVTerms() m : " +
> sBase.getNumCVTerms() );
> System.err.println( "Return value: " + returnvalue );
> if ( returnvalue ==
> libsbmlConstants.LIBSBML_OPERATION_SUCCESS ) {
> System.err.println( "return value OK." );
> } else if ( returnvalue ==
> libsbmlConstants.LIBSBML_OPERATION_FAILED ) {
> System.err.println( "addition failed." );
> } else {
> System.err.println( "Unknown error value" );
> }
>
> However, no matter how I run this, the CVTerm simply isn't getting added to
> the sBase object, as evidenced by the output:
>
> cvTerm.getNumResources() m = 1
> sBase.getNumCVTerms() m : 0
>
> When I try to load model qualifiers, the error value is odd:
> Return value: -2
> Unknown error value
>
> When I try to use the same code, but for biological qualifiers, the error
> value is OK, *but* the CVTerm still isn't added to the sBase object:
> Return value: 0
> return value OK.
>
>
> And the resulting SBML file does not have any MIRIAM annotations. The cvTerm
> object is created, then added to sBase, but somehow the addition is failing.
>
> The docs (
> http://sbml.org/Software/libSBML/docs/cpp-api/class_c_v_term.html#567c2728d8b1a9d7ee2b34ffc00a7f67)
> say the only possible return values are
> libsbmlConstants.LIBSBML_OPERATION_FAILED or
> libsbmlConstants.LIBSBML_OPERATION_SUCCESS, but from the message above, it
> looks like neither values are returned.
>
> Any help would be most appreciated!
>
> Thanks!
>

____________________________________________________________
To manage your sbml-interoperability list subscription, visit
https://utils.its.caltech.edu/mailman/listinfo/sbml-interoperability

For a web interface to the sbml-interoperability mailing list, visit
http://sbml.org/Forums/

For questions or feedback about the sbml-interoperability list,
contact sbml-team@caltech.edu

      

SubjectPosterDate
Read Message   question about CVTerms Allyson Lister09 Sep '09 03:00
Read Message   Re: question about CVTerms  Sarah Keating09 Sep '09 04:46
Read Message   Re: question about CVTerms Allyson Lister09 Sep '09 05:10
Read Message   Re: question about CVTerms Allyson Lister17 Sep '09 01:06
Read Message   Re: question about CVTerms Sarah Keating17 Sep '09 02:09
Read Message   Re: question about CVTerms Allyson Lister17 Sep '09 02:19
Read Message   Re: question about CVTerms Sarah Keating17 Sep '09 04:13
Read Message   Re: question about CVTerms Allyson Lister17 Sep '09 04:21
Read Message   Re: question about CVTerms Stefan.Hoops17 Sep '09 07:54
Read Message   Re: question about CVTerms Allyson Lister17 Sep '09 08:06
Read Message   Re: question about CVTerms Sarah Keating17 Sep '09 08:10
Read Message   Re: question about CVTerms Stefan.Hoops17 Sep '09 11:05
Read Message   Re: question about CVTerms Mike Hucka19 Sep '09 19:14
Read Message   Re: question about CVTerms curoli20 Sep '09 16:24
Read Message   Re: question about CVTerms Stefan.Hoops17 Sep '09 05:31
Read Message   Re: question about CVTerms curoli17 Sep '09 08:40
Read Message   Re: question about CVTerms Stefan.Hoops17 Sep '09 11:03
Read Message   Re: question about CVTerms curoli17 Sep '09 11:59
Read Message   Re: question about CVTerms curoli17 Sep '09 12:19
Previous Topic:Extracting All SBase objects
Next Topic:removal of CV terms from annotation
Go to forum:
-=] Back to Top [=-

Powered by FUDforum. (Copyright Advanced Internet Designs Inc.)

Please use our issue tracking system for any questions or suggestions about this website.